Bug 388841

Summary: Pressing the Folder icon to add a new Group to the Palette docker causes Segmentation fault (Krita 4.0.0-beta1.1.appimage)
Product: [Applications] krita Reporter: mvowada <freebox64>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: halla
Priority: NOR    
Version First Reported In: 4.0.0-beta.1   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Video example
(GDB report)

Description mvowada 2018-01-12 02:42:13 UTC
Created attachment 109810 [details]
Video example

(Ubuntu 14.04 with Krita 4.0.0-beta1.1.appimage)

I'm getting segmentation fault when adding a new group to the Palette docker (see video). Steps:

    1) start with a new empty palette
    2) click the folder icon to add a group

Actual results: segmentation fault
Expected results: do not crash
Comment 1 mvowada 2018-01-12 02:43:25 UTC
Created attachment 109811 [details]
(GDB report)
Comment 2 Halla Rempt 2018-01-12 10:48:08 UTC
We should somehow disable that button if there are no colors in the colorset.
Comment 3 wolthera 2018-01-13 14:15:13 UTC
Git commit 8916721816c6a65bf02176b09bba1cfb86970e1b by Wolthera van Hövell tot Westerflier.
Committed on 13/01/2018 at 14:15.
Pushed by woltherav into branch 'master'.

Fix crash when adding group to empty palette.

This model needs to be fully rewritten to be tree-based, because it is
just too fragile right now.

M  +4    -2    libs/pigment/resources/KoColorSet.cpp
M  +3    -0    libs/ui/KisPaletteModel.cpp
M  +27   -25   plugins/dockers/palettedocker/palettedocker_dock.cpp

https://commits.kde.org/krita/8916721816c6a65bf02176b09bba1cfb86970e1b