Bug 105199 - Inserting images into Photo Gallery crashes when image file name contains hash (#)
Summary: Inserting images into Photo Gallery crashes when image file name contains has...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium normal
Assignee: Stephan Bergmann
URL:
Whiteboard: target:5.4.0 target:5.2.5 target:5.3.0.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2017-01-09 00:17 UTC by Oblong
Modified: 2017-01-13 04:09 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oblong 2017-01-09 00:17:14 UTC
Description:
Inserting images into Photo Gallery crashes when imported image file name contains hash (#) character. 

Steps to Reproduce:
1. Name an image file as, for example, #1.jpg
2.In Impress: Insert|Media|Photo Album|Add
3.select the image
4.Open|Insert Slides

Actual Results:  
Impress closes down with no error message. Restarting Impress goes through recovery process.

Expected Results:
Image(s) should have been imported. If for some reason the file name is deemed to invalid, a warning to that effect should be given, instead of crashing the program.


Reproducible: Always

User Profile Reset: No

Additional Info:
If the file name to be imported does not contain a "#", then the import works.

5.1.4.2 program crashes and disappears.

Same problem occurs in 5.2.3.3 (via Flatpak) but in that case program hangs and does not respond. Windows 5.1.6.2 gives "Fatal error" dialog without further explanation.


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Comment 1 Xisco Faulí 2017-01-09 09:55:25 UTC
In GTK3 it crashes, in GTK+ it freezes.

Confirmed in:

Version: 5.4.0.0.alpha0+
Build ID: 75d963bc7bb87429f304d29138c27178880c039a
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

but not in

Version: 5.0.0.0.alpha1+
Build ID: 0db96caf0fcce09b87621c11b584a6d81cc7df86
Locale: ca-ES (ca_ES.UTF-8
Comment 2 Xisco Faulí 2017-01-09 09:59:01 UTC
crash also reproducible in

Version: 5.4.0.0.alpha0+
Build ID: 6bd7451ecd66417a4e8b8dff3874c15ba4d1536e
CPU Threads: 1; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-01-05_23:24:16
Locale: es-ES (es_ES); Calc: group
Comment 3 Aron Budea 2017-01-09 23:21:20 UTC Comment hidden (bibisection)
Comment 4 Aron Budea 2017-01-09 23:22:20 UTC
This issue started at the commit referenced below. Adding Cc: to Stephan Bergmann, please take a look.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=d3248d1fd83cca67a11dd593c124694382bf5f34
author	Stephan Bergmann <sbergman@redhat.com>	2015-11-04 07:39:35 (GMT)
committer	Stephan Bergmann <sbergman@redhat.com>	2015-11-04 09:19:59 (GMT)

"Handle URLs with query or fragment (or containing NUL chars)"
Comment 5 Commit Notification 2017-01-10 14:33:05 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6a68e364faa0d384f1e3bf397f5decaadecf9b3b

tdf#105199: Keep URL intact

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Stephan Bergmann 2017-01-10 14:39:56 UTC
(In reply to Aron Budea from comment #4)
> This issue started at the commit referenced below. Adding Cc: to Stephan
> Bergmann, please take a look.
> 
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=d3248d1fd83cca67a11dd593c124694382bf5f34
> author	Stephan Bergmann <sbergman@redhat.com>	2015-11-04 07:39:35 (GMT)
> committer	Stephan Bergmann <sbergman@redhat.com>	2015-11-04 09:19:59 (GMT)
> 
> "Handle URLs with query or fragment (or containing NUL chars)"

The problem was probably introduced with <https://cgit.freedesktop.org/libreoffice/core/commit/?id=97a055dfa7c85c8795dc9b55fb39a5b3448b29f2> "Related fdo#35546: Cosmetic fixes for Photo Album Dialog".  On Windows, that problem just happened to be hidden by broken (Windows-specific) code elsewhere, which was in turn fixed by my commit mentioned above, causing this issue to become visible.  On non-Windows, the problem should have been visible all the time.
Comment 7 Commit Notification 2017-01-11 11:38:18 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=96e0beb0ef99a0840ecf434c3d726eebaa3c745e&h=libreoffice-5-2

tdf#105199: Keep URL intact

It will be available in 5.2.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2017-01-11 20:12:03 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=192ea4c3a85dd5cb8ffa6dab38b8764fee73d223&h=libreoffice-5-3

tdf#105199: Keep URL intact

It will be available in 5.3.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Oblong 2017-01-13 03:23:41 UTC
I tried development version from libreoffice-5-2~2017-01-11_11.51.06_LibreOfficeDev_5.2.5.0.0_Linux_x86-64_deb.tar.gz and the problem is fixed.

Thanks to those who worked on this.
Comment 10 Aron Budea 2017-01-13 04:09:04 UTC
Setting status to VERIFIED, thanks for the feedback!