Bug 475107

Summary: Crash when exiting Canvas Only mode while toolbar is expanded
Product: [Applications] krita Reporter: AppTest <xeses16388>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: dimula73, dra.w.p.il.e+bugskde, halla, rojasreinold
Priority: NOR    
Version First Reported In: 5.1.5   
Target Milestone: ---   
Platform: Android   
OS: Android 13.x   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description AppTest 2023-10-01 19:26:42 UTC
SUMMARY
***
The title is basically the summary.
***


STEPS TO REPRODUCE
1. Go to Settings, Configure Toolbar, and add enough actions to mainToolbar so that they can't all fit into the toolbar
2. Go to Settings, Configure Krita, Canvas-only settings, have everything checked except toolbars and dockers
3. Start a new drawing
4. Activate canvas-only mode (in my case, I used the finger-tap touch shortcut)
5. Click the expand button on the right edge of the toolbar to show all of your hidden actions
6. Disable canvas-only mode with the finger-tap shortcut

OBSERVED RESULT
Krita will immediately crash.

EXPECTED RESULT
To disable canvas-only mode and not crash.

SOFTWARE/OS VERSIONS
Android 13, Motorola near-stock UI
Krita 5.1.5, arm64 apk

ADDITIONAL INFORMATION
Comment 1 Dmitry Kazakov 2023-10-02 07:14:02 UTC
Hi, AppTest!

Thank you for the report! Could you please test Krita 5.2.0 RC1 version of Krita? We fixed a lot of canvas-only-mode-related bugs in it...

https://krita.org/en/item/krita-5-2-release-candidate-is-out/
Comment 2 Dmitry Kazakov 2023-10-02 07:14:13 UTC
Marking as needsinfo
Comment 3 AppTest 2023-10-02 16:47:53 UTC
(In reply to Dmitry Kazakov from comment #1)
> Hi, AppTest!
> 
> Thank you for the report! Could you please test Krita 5.2.0 RC1 version of
> Krita? We fixed a lot of canvas-only-mode-related bugs in it...
> 
> https://krita.org/en/item/krita-5-2-release-candidate-is-out/

I tested it there too, and it also crashes in 5.2 rc1. It can be reproduced following the same steps I indicated above.
Comment 4 Bug Janitor Service 2023-10-03 03:46:23 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 5 Halla Rempt 2024-10-29 13:16:13 UTC
I suspect it's actually a bug in the qwidget module on Android, since it is android-specific.
Comment 6 Reinold Rojas 2024-11-12 04:14:07 UTC
I can reproduce this as well so setting to confirmed. Recreated on latest from play store 5.2.6.

Also noting that the crash is very dependent on it being a new file. If you draw a tiny bit before following the reproduce steps Krita will not crash.
Comment 7 Bug Janitor Service 2026-01-31 12:24:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2628
Comment 9 Dmitry Kazakov 2026-02-03 13:07:45 UTC
Git commit e07b4aa30bee7f205886baa46efd11ed027d3017 by Dmitry Kazakov, on behalf of Carsten Hartenfels.
Committed on 03/02/2026 at 13:07.
Pushed by dkazakov into branch 'master'.

[android] Collapse toolbars on canvas-only switch

Because them being expanded while the mode is switched causes a crash.

M  +27   -0    libs/ui/KisViewManager.cpp

https://invent.kde.org/graphics/krita/-/commit/e07b4aa30bee7f205886baa46efd11ed027d3017
Comment 10 Dmitry Kazakov 2026-02-03 16:07:12 UTC
Git commit 55486f8d3a7354d16da344474327b9e94222b12c by Dmitry Kazakov, on behalf of Carsten Hartenfels.
Committed on 03/02/2026 at 16:05.
Pushed by dkazakov into branch 'krita/6.0'.

[android] Collapse toolbars on canvas-only switch

Because them being expanded while the mode is switched causes a crash.

M  +27   -0    libs/ui/KisViewManager.cpp

https://invent.kde.org/graphics/krita/-/commit/55486f8d3a7354d16da344474327b9e94222b12c