Bug 409543

Summary: SIGSEGV build d649293 clicking cancel after warning about linear RGB modes
Product: [Applications] krita Reporter: epicwrathssin
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: halla, manuel.snudl.zeidler
Priority: NOR    
Version First Reported In: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: bt full and thread apply all bt

Description epicwrathssin 2019-07-06 03:25:47 UTC
Created attachment 121347 [details]
bt full and thread apply all bt

SUMMARY

There's a crash on a dialog that gives you the option to "OK" or "Cancel and try again" when the "Cancel" option is selected.

STEPS TO REPRODUCE
1. Put image in clipboard.  A screenshot works for me.
2. Click New->Create from Clipboard.
3. Color should have these options: RGB/Alpha, 8-bit integer/channel, scRGB (linear).
4. Click create.
5. This warning is given: "Linear gamma RGB color spaces are not supposed to be used in 8-bit integer modes. It is suggested to use 16-bit integer or any floating point colorspace for linear profiles.

Press "Ok" to create a 8-bit integer linear RGB color space or "Cancel" to return to the settings dialog."
6. Click cancel.
7. Krita immediately crashes.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.0.0-20-generic 64-bit (Ubuntu)
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.56.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION
An additional message on the command line appears, but I don't know its relevancy:

QLayout: Attempting to add QLayout "" to QWidget "", which already has a layout

Attached is output of 'bt full' for the crashed thread, and also 'thread apply all bt'.  A core dump is available if requested.
Comment 1 M 2019-07-06 03:32:03 UTC
Can confirm here. Also happens with the profile krita-2.5, lcms sRGB built-in with linear gamma TRC.

My gdb output throws the same messages.
Comment 2 Halla Rempt 2019-07-06 08:05:26 UTC
Fixed in 9d5c4b099481f8c91aa6c4eed8891b20559f67eb