Bug 159933 - crash when applying Solarize filter to raster image
Summary: crash when applying Solarize filter to raster image
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+ Master
Hardware: All All
: medium critical
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Image-Colorize Crash
  Show dependency treegraph
 
Reported: 2024-02-28 02:05 UTC by Stéphane Guillou (stragu)
Modified: 2024-04-15 02:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
crash minidump (866.85 KB, application/vnd.tcpdump.pcap)
2024-02-28 02:05 UTC, Stéphane Guillou (stragu)
Details
bt (8.88 KB, text/plain)
2024-02-28 10:43 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2024-02-28 02:05:22 UTC
Created attachment 192837 [details]
crash minidump

Steps:
1. Open Draw (or Impress)
2. Drag and drop bullet "blkpearl" from the Gallery sidebar deck's "Bullets" theme onto the canvas
3. Format > Image > Filter > Solarization > OK

Result: crash

Does not happen in Writer.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a1a1d8edb9d4a62b747aa7069b3026e2ba75704d
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

No repro in 24.2:

Version: 24.2.1.1 (X86_64) / LibreOffice Community
Build ID: 359ef544e625d2ffbfced462ab37bd593ca85fa7
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Bibisected with linux-64-24.8 repo to first bad build [f8eaff41f3fae372610e4898748dfa88e3ef206a] which points to:

commit d7cd7dff0e8f71b3d83b4c91b574f39248a25e2f
author	Justin Luth 	Fri Feb 09 17:26:52 2024 -0500
committer	Miklos Vajna 	Wed Feb 21 08:45:08 2024 +0100
tdf#126533 docx export: page background vml fill: tiles/patterns
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163206

Justin, can you please have a look?
Comment 1 Stéphane Guillou (stragu) 2024-02-28 04:24:08 UTC
Also crashed on Windows, but I had to make the bullet image bigger before applying Solarization.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c279cad9484cce44cf11473478c6059d69013fd2
CPU threads: 4; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 2 Julien Nabet 2024-02-28 10:43:07 UTC
Created attachment 192845 [details]
bt

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 3 Julien Nabet 2024-02-28 10:48:21 UTC
Stéphane: I'm not sure but considering bt, it may be related to 07b26af18d45ad7ecacc30c2c4cb2c23033e9f2d.

I mean, methods changed in the patch you quoted are:
DocxExport::WriteMainText and DocxExport::WriteMainText
We don't export the file in docx here.
Comment 4 Julien Nabet 2024-02-28 10:59:05 UTC
If I remove Invalidate call in https://opengrok.libreoffice.org/xref/core/sd/source/ui/view/GraphicObjectBar.cxx?r=07b26af1#127
I got no crash and solarization works.

If it's the right way to fix this, I wonder if we should also remove Invalidate call here:
https://opengrok.libreoffice.org/xref/core/sc/source/ui/drawfunc/graphsh.cxx?r=07b26af1#126
Comment 5 Stéphane Guillou (stragu) 2024-02-28 11:07:19 UTC
Apologies, I should have had a closer look at the commit, you're right.
The crash is inconsistent, which explains why I got another nonsensical commit in a second bibisect.

I checked out at 07b26af18d45ad7ecacc30c2c4cb2c23033e9f2d (which is [2569c723f04d9973aefc27527b0b694f77a82e40] in linux-64-24.8 repo) and it crashes.
HEAD~1 does not, I tried it 10 times to be sure.

Thanks Julien! :)

Justin: sorry for the noise!
Comment 6 Commit Notification 2024-03-05 10:58:21 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1842ad9fd51f5384f78df60c3c1f61ba631896f4

tdf#159933 crash when applying Solarize filter to raster image

It will be available in 24.8.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 7 Stéphane Guillou (stragu) 2024-04-15 02:17:55 UTC
Thanks Noel, fix verified in:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8b599d60fef80039cdfe636a771c3fc8eb1028c3
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded