Summary: | Krita crashes with segmentation fault if all gradients are removed | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Bruno P. Kinoshita <brunodepaulak> |
Component: | Resource Management | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | brunodepaulak, halla, sven.langkamp |
Priority: | NOR | ||
Version: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/krita/c66d72c36272a1cd28636e3918379794a6afd618 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Proposed Patch #1 for issue 366741 |
Description
Bruno P. Kinoshita
2016-08-13 23:06:04 UTC
Created attachment 100590 [details]
Proposed Patch #1 for issue 366741
Attaching a proposed patch, where the dangling pointer is set back to 0. It works by using the same resource server adapter as sender, and then connecting to the removingResource(KoResource *) signal.
Pushed to my GitHub fork, so it is possible to compare it against the current master online too https://github.com/KDE/krita/compare/82247dd5d276097809bf49e708430dcf19a26b45...kinow:fix-dangling-pointer It should work with several adapters. KoResourceServer does notify all the observers with notifyRemovingResource. Beside that there appears to be at least another bug as the first two gradients should not be removeable. > KoResourceServer does notify all the observers with notifyRemovingResource. Oh, maybe calling connectToServer in the Item Chooser would fix that too. >Beside that there appears to be at least another bug as the first two gradients should not be removeable. True. Noticed that every time I restarted Krita there would always be two gradients there. Yes, those gradients are autogenerated from the foreground and background color. Hm, I still cannot confirm: it is impossible to not have the two default generated gradients, as far as I can tell. Git commit 88a03cd3777a820db835f1e5eceb27346dd52d03 by Sven Langkamp. Committed on 27/08/2016 at 12:29. Pushed by langkamp into branch 'master'. Fix crash when the Iconwidget tries to display an already deleted resource Based on patch by Bruno P. Kinoshita M +11 -2 libs/ui/widgets/kis_iconwidget.cc M +2 -0 libs/ui/widgets/kis_iconwidget.h http://commits.kde.org/krita/88a03cd3777a820db835f1e5eceb27346dd52d03 I have applied the patch in a slightly modified form. We still need to decide if it should be possible to remove the two first gradients. Git commit c66d72c36272a1cd28636e3918379794a6afd618 by Sven Langkamp. Committed on 28/08/2016 at 08:49. Pushed by langkamp into branch 'master'. Don't remove the automatically generated gradients M +12 -0 libs/pigment/resources/KoResource.cpp M +4 -0 libs/pigment/resources/KoResource.h M +1 -1 libs/widgets/KoResourceItemChooser.cpp M +2 -0 libs/widgets/KoResourceServerProvider.cpp http://commits.kde.org/krita/c66d72c36272a1cd28636e3918379794a6afd618 |