Bug 388841 - Pressing the Folder icon to add a new Group to the Palette docker causes Segmentation fault (Krita 4.0.0-beta1.1.appimage)
Summary: Pressing the Folder icon to add a new Group to the Palette docker causes Segm...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (other bugs)
Version First Reported In: 4.0.0-beta.1
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-12 02:42 UTC by mvowada
Modified: 2018-01-13 14:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Video example (512.35 KB, video/mp4)
2018-01-12 02:42 UTC, mvowada
Details
(GDB report) (4.05 KB, text/plain)
2018-01-12 02:43 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
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