Bug 117468 - FILESAVE Writer crashes trying to save image as BMP, PNG, TIFF, JPEG
Summary: FILESAVE Writer crashes trying to save image as BMP, PNG, TIFF, JPEG
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks: Graphics-Export
  Show dependency treegraph
 
Reported: 2018-05-07 05:35 UTC by Emil Tanev
Modified: 2019-05-20 09:19 UTC (History)
5 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 Emil Tanev 2018-05-07 05:35:46 UTC
Open Writer
Import an image
Right-click the image
Save
Choose BMP format
In the BMP Options dialog, set Resolution to 999
Set Width to 999 (note that the message says "... needs about 0.0 KB of memory..." now (sec 30 in the screencast)
Click OK

Issue: Writer hangs

https://screencast-o-matic.com/watch/cFhihvbOcs

Version: 6.1.0.0.alpha1+ (x64)
Build ID: 08441d466dd70c203a519a133aaf1a5997adbbd3
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-05-07_01:12:11
Locale: en-US (en_US); Calc: group
Comment 1 Emil Tanev 2018-05-07 05:44:47 UTC
PNG as well, changed the title

https://screencast-o-matic.com/watch/cFhihEbOVt
Comment 2 Emil Tanev 2018-05-07 05:52:06 UTC
TIFF, steps are slightly different. I confirmed that these new steps cause immediate crash (not a hang) with BMP as well (sec 24 in the new screencast)

https://screencast-o-matic.com/watch/cFhihEbOVt

New steps 

Open Writer
Import an image
Right-click the image
Save
Choose BMP format
In the BMP Options dialog, set Resolution to 999
Set Width to 999 
Set Height to 999
Click OK
Comment 3 Julien Nabet 2018-05-07 09:26:15 UTC
On pc Debian x86-64 with master sources updated yesterday, I could reproduce this.
Comment 4 Xisco Faulí 2018-05-08 08:52:35 UTC
The dialog was introduced in https://cgit.freedesktop.org/libreoffice/core/commit/?id=f715c6cfa41ad5a552181bad5e36e8e03f96f480

@Marco Cecchetti, would you mind taking a look at this one?
Comment 5 Marco Cecchetti 2018-05-15 14:08:51 UTC
So the dialog was already used by Draw in LO 5.X, and it had the same issue reported above.

Essentially we end up using a too big scaling factor and try to handle an image of > 1 GB (in the TIFF case is > 500 GB).

The solution is to limit the input for the dialog to sensible values.

I provided a proof of concept patch: https://gerrit.libreoffice.org/#/c/54361

If you can think of a better max image size value or better criteria, feel free to modify it. ;-)
Comment 6 QA Administrators 2019-05-16 03:13:20 UTC Comment hidden (obsolete)
Comment 7 Roman Kuznetsov 2019-05-19 09:14:37 UTC
I can't repro it in

Version: 6.3.0.0.alpha0+ (x64)
Build ID: ccf3a0600ee902390ad6112ecf28223078bdd2db
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-05-13_03:08:59
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded

Writer doesn't crash but it doesn't save BMP file also. After OK button pressing just happens nothing.

People, please retest it yourself
Comment 8 Julien Nabet 2019-05-19 16:57:23 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this.

I just noticed this on console:
warn:vcl.gdi:25230:25230:vcl/source/bitmap/bitmapfilter.cxx:27: Bitmap filter failed
warn:vcl.gdi:25230:25230:vcl/source/bitmap/bitmapfilter.cxx:27: Bitmap filter failed
Comment 9 Xisco Faulí 2019-05-20 09:19:53 UTC
Not reproducible in

Version: 6.3.0.0.alpha1+
Build ID: 9c7fac47aacb0877c7d212217089a680400c1377
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

Closing as RESOLVED WORKSFORME