Bug 399860

Summary: SIGSEGV when closing and new, after picking a color
Product: [Applications] krita Reporter: mvowada <freebox64>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: anna.medonosova, halla
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: (Video example)
(GDB - Appimage)

Description mvowada 2018-10-15 23:45:26 UTC
Created attachment 115668 [details]
(Video example)

(Krita 4.2.0-pre-alpha (git a2ae7f3) - Ubuntu 14.04.5 LTS)

Whenever I pick a color from the selector, I can reproduce a crash if I close and create a new document (see video):

    1. "CTRL + N" (new document)
    2. Pick a color
    3. "CTRL + W" (close)
    4. "CTRL + N"

Actual Results: SIGSEGV crash
Comment 1 mvowada 2018-10-15 23:47:04 UTC
Created attachment 115669 [details]
(GDB - Appimage)
Comment 2 Anna Medonosova 2018-10-16 19:13:50 UTC
I can reproduce the crash not only with picking a color from the toolbar popup, but also from advanced color selector and the palette docker.

When I select colors only in the artistic selector, I can close and open files without a crash. However, when the artistic selector updates with a color from outside, it starts crashing upon repaint.
Comment 3 Halla Rempt 2018-10-21 12:04:59 UTC
Hm, I don't see a crash, but the line in the backtrace suggests that the problem must be that the paintColorSpace isn't set. A check for that should fix the crash.
Comment 4 Halla Rempt 2018-10-21 12:06:52 UTC
Git commit 7c2d80c292cdbf6e4c3b41f917352e12472d8b70 by Boudewijn Rempt.
Committed on 21/10/2018 at 12:06.
Pushed by rempt into branch 'master'.

Check pointer before dereferencing

M  +1    -1    libs/ui/canvas/kis_display_color_converter.cpp

https://commits.kde.org/krita/7c2d80c292cdbf6e4c3b41f917352e12472d8b70
Comment 5 Anna Medonosova 2018-10-29 15:19:07 UTC
Git commit 4ec3dadd0c628a3d7fecf9932ae23a0be761fd50 by Anna Medonosova.
Committed on 29/10/2018 at 15:18.
Pushed by amedonosova into branch 'master'.

ArtColorSel: caching, fixes for crashes

Summary:
Main part of this diff is caching of selector parts, so it does not get redrawn all the time.

Includes changes to prevent crashes related to bug 399860.

Foreground and background color indicator now display correctly when color profile changes (e.g. are shown as gray if profile is set to grayscale).

Reviewers: #krita, rempt

Reviewed By: #krita, rempt

Subscribers: dkazakov

Tags: #krita

Differential Revision: https://phabricator.kde.org/D16288

M  +1    -1    plugins/dockers/artisticcolorselector/artisticcolorselector_dock.cpp
M  +2    -12   plugins/dockers/artisticcolorselector/kis_color.cpp
M  +1    -5    plugins/dockers/artisticcolorselector/kis_color.h
M  +162  -66   plugins/dockers/artisticcolorselector/kis_color_selector.cpp
M  +9    -2    plugins/dockers/artisticcolorselector/kis_color_selector.h

https://commits.kde.org/krita/4ec3dadd0c628a3d7fecf9932ae23a0be761fd50
Comment 6 Halla Rempt 2018-11-20 08:58:16 UTC
Git commit ff7d48b33024a46c1d38363ba6a6ba7f7868e63d by Boudewijn Rempt.
Committed on 20/11/2018 at 08:23.
Pushed by rempt into branch 'krita/4.1'.

Check pointer before dereferencing

M  +1    -1    libs/ui/canvas/kis_display_color_converter.cpp

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