Bug 117469 - EDITING Draw crashes converting image to polygon
Summary: EDITING Draw crashes converting image to polygon
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha1+
Hardware: All All
: highest critical
Assignee: Chris Sherlock
URL:
Whiteboard:
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2018-05-07 06:20 UTC by Emil Tanev
Modified: 2018-05-29 14:04 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (15.72 KB, text/plain)
2018-05-07 08:56 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emil Tanev 2018-05-07 06:20:46 UTC
Open Draw
Insert an image
Right-click - Convert - To polygon 
Click OK

Issue: Crash

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

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 Jacques Guilleron 2018-05-07 08:50:42 UTC
Hi Emil,

I reproduce too with
LO  6.1.0.0.alpha1+ Build ID: 936eaedddbc6d21737745be3c3131607440e366c
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-05-04_01:09:04
Locale: fr-FR (fr_FR); Calc: CL
but not with
LO 6.1.0.0.alpha0+ Build ID: f80029445e2b558f0d0e0a25c2c1bbcbe5254120
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-04-13_23:07:11
Locale: fr-FR (fr_FR); Calc: CL
Comment 2 Julien Nabet 2018-05-07 08:56:23 UTC
Created attachment 141946 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated yesterday, I could reproduce this.
Comment 3 Xisco Faulí 2018-05-07 09:53:31 UTC
I can't reproduce it in

Version: 6.1.0.0.alpha1+
Build ID: 1e2afc9bd3062cfba6b65b45c17a08f298014239
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 4 Xisco Faulí 2018-05-07 11:32:27 UTC
Regression introduced by:

author	Chris Sherlock <chris.sherlock79@gmail.com>	2018-04-17 22:06:20 +1000
committer	Tomaž Vajngerl <quikee@gmail.com>	2018-04-20 08:35:58 +0200
commit 900b1109a94c1d72c17ab429da1b6c6c2bf79ac6 (patch)
tree cd9db8e494a2ae93460c29609eff4b7dba15f583
parent f9473a8d2ea6740d325ac35da74fec16476820f0 (diff)
vcl: move Bitmap{Ex}::ReduceColors() to BitmapColorQuantizationFilter class

Bisected with: bibisect-win32-6.1

Adding Cc: to Chris Sherlock
Comment 5 Chris Sherlock 2018-05-09 10:04:30 UTC
From the stack trace, it looks like it's picking up an indexed color, but the SetPixelForN32BitTcBgra() function is not taking into account that BitmapColor can be an indexed color... and thus doesn't look up the color from the color palette.
Comment 6 Chris Sherlock 2018-05-17 08:57:44 UTC
Fixed by Caolon:

https://cgit.freedesktop.org/libreoffice/core/commit/vcl/source/bitmap?id=23a32cf68d624857fbe21a6c2634c50a2977b6b7

I have to create some unit tests around this code.
Comment 7 Xisco Faulí 2018-05-29 14:04:46 UTC
Verified in

Version: 6.1.0.0.beta1+
Build ID: ee74e5638ace7daca188c55c29957ce92b289fbb
CPU threads: 16; OS: Windows 6.3; UI render: default; 
Locale: en-GB (en_GB); Calc: group threaded

@Caolán, Thanks for fixing this!!