Bug 385030 - Adding "toggle assistant" to the toolbar results in crash
Summary: Adding "toggle assistant" to the toolbar results in crash
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 3.3.0-rc.1
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-24 20:16 UTC by Autumn Lansing
Modified: 2018-03-23 14:50 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
krita crash core dump (10.05 KB, text/plain)
2018-01-19 01:40 UTC, Autumn Lansing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Autumn Lansing 2017-09-24 20:16:36 UTC
Krita 3.3.0-rc.1 crashes when I try to add "toggle assistant" to the toolbar. After restarting Krita, "toggle assistant" is gone from the "Configure Toolbars>Available actions" menu but not present in "Current actions". After another restart, it appears in "Current actions," but it doesn't show on the toolbar. Removing it from "Current actions" and then adding it again results in another crash.

I'll note that, in previous Krita versions, "toggle assistant" was one of the buttons that disappeared from the toolbar after every restart, as referenced in bug #365222.
Comment 1 Halla Rempt 2017-09-27 13:43:10 UTC
I don't get a crash but I can confirm the rest of the weirdness: but that's a duplicate of bug 365222.
Comment 2 Halla Rempt 2017-09-27 13:48:08 UTC
"toggle assisant" is an action created by the brush tool, which means it's only created when a document is created, after the gui is constructed.
Comment 3 Halla Rempt 2017-09-28 11:07:44 UTC
Git commit f3605f3f77ea1fe1a1f2c2cb38931b38e78fb29e by Boudewijn Rempt.
Committed on 28/09/2017 at 09:55.
Pushed by rempt into branch 'krita/3.3'.

Pass the action collection to the edit toolbar

M  +2    -1    libs/ui/KisMainWindow.cpp

https://commits.kde.org/krita/f3605f3f77ea1fe1a1f2c2cb38931b38e78fb29e
Comment 4 Halla Rempt 2017-09-28 11:07:44 UTC
Git commit 89c73f69e2c095c634e8df06dc169e18074dd20f by Boudewijn Rempt.
Committed on 28/09/2017 at 10:06.
Pushed by rempt into branch 'krita/3.3'.

Use makeQAction, not new QAction for named action

Any action with a name, that is defined in a .action file must
be created with KisActioNRegistry::makeQAction, not new QAction.

M  +5    -5    plugins/tools/basictools/kis_tool_brush.cc

https://commits.kde.org/krita/89c73f69e2c095c634e8df06dc169e18074dd20f
Comment 5 Halla Rempt 2017-09-28 11:38:20 UTC
Git commit ca605c8607c8072300f76c62f3228b060520a9a9 by Boudewijn Rempt.
Committed on 28/09/2017 at 11:08.
Pushed by rempt into branch 'master'.

Pass the action collection to the edit toolbar

M  +2    -1    libs/ui/KisMainWindow.cpp

https://commits.kde.org/krita/ca605c8607c8072300f76c62f3228b060520a9a9
Comment 6 Halla Rempt 2017-09-28 11:38:21 UTC
Git commit a254c1d5e145f716c9d0b8e592e32e83ed7c94ed by Boudewijn Rempt.
Committed on 28/09/2017 at 11:09.
Pushed by rempt into branch 'master'.

Use makeQAction, not new QAction for named action

Any action with a name, that is defined in a .action file must
be created with KisActioNRegistry::makeQAction, not new QAction.

M  +4    -4    plugins/tools/basictools/kis_tool_brush.cc

https://commits.kde.org/krita/a254c1d5e145f716c9d0b8e592e32e83ed7c94ed
Comment 7 Halla Rempt 2017-09-28 14:14:31 UTC
This is practically unfixable without a big redesign. Another problem is that if you put the action on the toolbar, then create a second document, on selecting the second document the action is disabled because it is created per view, not for the window.
Comment 8 Halla Rempt 2017-09-28 14:17:20 UTC
We'd need to make a plan for this: https://phabricator.kde.org/T4040
Comment 9 Autumn Lansing 2017-09-28 17:02:23 UTC
I see why it used to disappear then. But even though it would disappear from the toolbar, it would still show as a current action in the Configure Toolbars dialog next time you started Krita. You'd have to move it back to available actions and add it again each time. Not a huge problem. Just a minor annoyance.

I'm still getting crashes on adding it though with the final release version of 3.3.0. Adding other toolbar options causes a crash as well, but when I restart Krita, those options are present on the toolbar. Toggle Assistant never shows at all. It also crashes for me when I remove the items I added from the toolbar.
Comment 10 mvowada 2018-01-17 20:25:34 UTC
(In reply to Autumn Lansing from comment #9)
> I'm still getting crashes on adding it though with the final release version
> of 3.3.0
Hi Autumn, I'm not able to reproduce the crash with "Krita 4.0.0-beta1.1.appimage" (Ubuntu 14.04). 
Please, could you check if you still get the crash with the latest Krita 4 version? thanks
Comment 11 Autumn Lansing 2018-01-17 23:44:29 UTC
It's still crashing for me. It's the exact same behavior in 4.0.0-beta1.1 as it was in my original report.
Comment 12 mvowada 2018-01-18 09:11:00 UTC
(Changing the report status back to "confirmed")
Comment 13 Halla Rempt 2018-01-18 09:15:28 UTC
I still don't get a crash. If you start Krita from the terminal, is there any interesting output when you add the button to the toolbar?
Comment 14 Autumn Lansing 2018-01-19 01:40:25 UTC
Created attachment 109976 [details]
krita crash core dump
Comment 15 Autumn Lansing 2018-01-19 01:41:29 UTC
All the command line tells me is:

"/home/autumn/bin/krita: line 4:  7550 Segmentation fault      (core dumped) /home/autumn/bin/krita/krita-4.0.0-beta1.1-x86_64.appimage"

I've included a core dump as provided by Fedora's automated problem reporting system, if that will be helpful.
Comment 16 Autumn Lansing 2018-03-23 14:50:19 UTC
With the official 4.0.0 release, Krita no longer crashes when adding the Toggle Assistant to the toolbar. The Toggle Assistant still disappears between sessions, but as you said, that would take a big redesign to fix and it isn't a major issue. My reported bug, though, has been resolved.