Bug 113695 - Crash when using color picker after parent toolbar is closed
Summary: Crash when using color picker after parent toolbar is closed
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.0.0 target:5.4.4
Keywords: bibisected
Depends on:
Blocks:
 
Reported: 2017-11-07 15:13 UTC by Emil Tanev
Modified: 2017-11-20 08:45 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["PaletteManager::AddRecentColor(Color const &,rtl::OUString const &,bool)"]


Attachments
bt with debug symbols (5.95 KB, text/plain)
2017-11-07 19:58 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emil Tanev 2017-11-07 15:13:12 UTC
Open Calc (or any other)
Undock the 2 toolbar (the one with foont color pickers)
Open a color picker. 
Close the undocked toolbar by clicking X
Click OK in the color picker

https://www.screencast.com/t/yMaavmEk

Version: 6.0.0.0.alpha1+ (x64)
Build ID: d30522e46ca884e9bc74af21711d9537e8118859
CPU threads: 8; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-10-30_00:25:37
Locale: ja-JP (ja_JP); Calc: CL
Comment 1 Emil Tanev 2017-11-07 15:17:01 UTC
Updating the description so that it is clearer. 

Open Calc (or any other)
Undock the 2nd toolbar (the one with font color pickers)
Open a color picker - Custom color
Close the undocked toolbar by clicking X
Click OK in the color picker
Comment 2 Xisco Faulí 2017-11-07 17:16:02 UTC
The Palette manager was changed in range https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=5f27596bed3bd155a321b66650d04226e6f2d1ee%5E1..93c4e3c9349a1ea07b822a2824559ad28f4a9a5e
and at that point the crash is already reproduced
Comment 3 Julien Nabet 2017-11-07 19:58:38 UTC
Created attachment 137604 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.

Note: only with a rendering like "gen" allowing to undock panels.
Comment 4 Julien Nabet 2017-11-07 20:01:29 UTC
Caolán: as explained by Mike Kaganski here at https://bugs.documentfoundation.org/show_bug.cgi?id=113647#c3, perhaps the main problem is the possibility to undock panels.
Vcl renderings like gtk3 won't undergo this kind of crashes because you can't undock panels.
Any thoughts?
Comment 5 Commit Notification 2017-11-09 20:33:57 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#113695 crash in color picker after parent is closed

It will be available in 6.0.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 Caolán McNamara 2017-11-09 20:47:13 UTC
the modal dialog should really have the toolbar set as its parent I guess, but seeing as this problem has shown up a few times I've reworked it to survive its parent going away
Comment 7 Xisco Faulí 2017-11-10 14:05:18 UTC
Verified in

Version: 6.0.0.0.alpha1+
Build ID: cf36b5d5f598d9b5528b273858584e2b419b23e9
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: x11; 
Locale: th-TH (ca_ES.UTF-8); Calc: group
Comment 8 Commit Notification 2017-11-20 08:45:53 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e9def9676ba4cfa5a89f823811fff6a2f68e242a&h=libreoffice-5-4

Resolves: tdf#113695 crash in color picker after parent is closed

It will be available in 5.4.4.

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.