Bug 386066 - Crash on choosing colors for digital color mixer
Summary: Crash on choosing colors for digital color mixer
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Color Selectors (show other bugs)
Version: 3.3.1
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-22 13:06 UTC by Odysseas
Modified: 2017-11-09 16:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
No debug symbols for this version on Windows, still these are the results form Dr. Mingw (5.23 KB, text/plain)
2017-10-22 13:06 UTC, Odysseas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Odysseas 2017-10-22 13:06:55 UTC
Created attachment 108508 [details]
No debug symbols for this version on Windows, still these are the results form Dr. Mingw

I try to change colors in the digital color mixer, this happens:
For the first color, the color selector comes up including the common colors to the right, everything fine.

From then on, each time I try to change a color the color selector has no common colors. The dropdown for selecting color palettes does not work, and if I click on "add / remove colors" the program freezes for a couple of seconds and then I get a crash.

There is a workaround to that, because I can still pick a color with the color picker. But sometimes I get a crash later in the same session, seemingly out of the blue.


This is not always reproducible. I cannot see a pattern, so sometimes it happens in multiple sessions in a row, other times everything runs smoothly. It also doesn't seem to be related to a specific document.
Comment 1 Halla Rempt 2017-11-09 16:04:25 UTC
Git commit a0d408f601d04e7e35e0d6fe8076da48661549bb by Boudewijn Rempt.
Committed on 09/11/2017 at 16:01.
Pushed by rempt into branch 'krita/3.3'.

Update the color selector dialog on showing it

If the fg or bg color hasn't been set at least once, the color
selector dialog would use the dummy internal KoColor and its
colorspace, which is rgb16. Then, on changing the color using
the spinboxes, a the current colorspace would change if the
document wasn't rgb16; the spinbox would be deleted and Krita
would crash.

This change initializes the dialog to the correct colorspace on
showing it, and moves the deletion of the spinboxes to the event
queue, using deleteLater.
Related: bug 385864

M  +6    -0    libs/ui/dialogs/kis_dlg_internal_color_selector.cpp
M  +6    -0    libs/ui/dialogs/kis_dlg_internal_color_selector.h
M  +7    -4    libs/ui/widgets/KoDualColorButton.cpp
M  +32   -18   libs/ui/widgets/kis_spinbox_color_selector.cpp

https://commits.kde.org/krita/a0d408f601d04e7e35e0d6fe8076da48661549bb
Comment 2 Halla Rempt 2017-11-09 16:11:17 UTC
Git commit a208d7d9c6fa060ff0bd09128214daca80bf5637 by Boudewijn Rempt.
Committed on 09/11/2017 at 16:11.
Pushed by rempt into branch 'master'.

Update the color selector dialog on showing it

If the fg or bg color hasn't been set at least once, the color
selector dialog would use the dummy internal KoColor and its
colorspace, which is rgb16. Then, on changing the color using
the spinboxes, a the current colorspace would change if the
document wasn't rgb16; the spinbox would be deleted and Krita
would crash.

This change initializes the dialog to the correct colorspace on
showing it, and moves the deletion of the spinboxes to the event
queue, using deleteLater.
Related: bug 385864

M  +6    -0    libs/ui/dialogs/kis_dlg_internal_color_selector.cpp
M  +6    -0    libs/ui/dialogs/kis_dlg_internal_color_selector.h
M  +7    -4    libs/ui/widgets/KoDualColorButton.cpp
M  +31   -17   libs/ui/widgets/kis_spinbox_color_selector.cpp

https://commits.kde.org/krita/a208d7d9c6fa060ff0bd09128214daca80bf5637