Bug 473967 - [5.2 Beta2] UI elements (menubar, toolbar, dockers) does not come back after relaunch from Canvas-Only Mode crash
Summary: [5.2 Beta2] UI elements (menubar, toolbar, dockers) does not come back after ...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (other bugs)
Version First Reported In: 5.2.0-beta2
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: vanyossi
URL:
Keywords: regression, release_blocker
Depends on:
Blocks:
 
Reported: 2023-08-30 23:49 UTC by Protoniv
Modified: 2023-09-13 01:11 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Protoniv 2023-08-30 23:49:49 UTC
SUMMARY
***
After launching krita from a crash which was in Canvas Only Mode, then open a document, menubar, toolbar and dockers won't show up. Try pressing `TAB` doesn't help.

Tested on Windows 10 20H2 (.zip) and OpenSUSE Leap 15.5 (appimage), with latest Krita Plus and Krita Next build.
Might be a regression?
***


STEPS TO REPRODUCE
1. Open a document, enter Canvas Only Mode.
2. Crash krita
(Use `kill` on Linux, `taskkill /IM krita.exe /F` in Powershell on Windows) 
3. Relaunch krita and open a document, to see if menubar, toolbar and dockers show up

OBSERVED RESULT
Only status bar show up AFAIK

SOFTWARE/OS VERSIONS
Windows: Windows 10 20H2
Linux/KDE Plasma:  OpenSUSE Leap 15.5

ADDITIONAL INFORMATION
No matter krita crash it self or use `kill` to crash, the result are the same.
Use `terminate` or `end process` can not reproduce it.
Didn't test extensively to see which "hide option" in Canvas Only Mode setting will start triggering this bug.
Comment 1 Protoniv 2023-09-01 22:33:01 UTC
Ok, with some more test, I have come up with some conclusion:
In `Canvas only settings` setting, hidding [Menu], [Toolbars], [Toolbox and dockers] individually in canvas only mode, then crash krita, the "hidden" part cannot recover in the next session.

Mark this as regression, since it doesn't happen in 5.1.5 and earlier 5.2.0-prealpha (though they have workspace resetting issue after crash/kill from canvas only mode), and it is a little tricky to call back those UI element, most users might just consider it as "broken UI"
Comment 2 vanyossi 2023-09-02 17:44:50 UTC
I can confirm this bug, this was introduced by the new welcome screen.

It seems there is something missing from the startup code that "bakes" the visibility status the dockers and other GUI elements were if the application is closed abnormally. Recovering from this state requires either selecting another workspace (after activating the toolbar options visibility) or resetting the user settings.

If 5.1.5 is opened after the "crashing" 5.2, the dockers are recovered without issue, however if 5.2 is opened "baking" the visibility state then opening 5.1.5 will present the issue as well.
Comment 3 vanyossi 2023-09-12 04:55:00 UTC
Git commit 8a4ca4e3e9530c29a1b6e3a46f7df98f9adc7d52 by Ivan Yossi.
Committed on 12/09/2023 at 06:54.
Pushed by ivany into branch 'master'.

Save window state before hiding everything

This fixes bug 473967 introduced in 56f801118c, however the docker size
not preserved on krita restart is reintroduced.

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

https://invent.kde.org/graphics/krita/-/commit/8a4ca4e3e9530c29a1b6e3a46f7df98f9adc7d52
Comment 4 vanyossi 2023-09-13 01:11:57 UTC
Git commit e81eaf9e09ef786807b8af7dc335f288f17c4757 by Ivan Yossi.
Committed on 13/09/2023 at 03:11.
Pushed by ivany into branch 'krita/5.2'.

Save window state before hiding everything

This fixes bug 473967 introduced in 56f801118c, however the docker size
not preserved on krita restart is reintroduced.
(cherry picked from commit 8a4ca4e3e9530c29a1b6e3a46f7df98f9adc7d52)

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

https://invent.kde.org/graphics/krita/-/commit/e81eaf9e09ef786807b8af7dc335f288f17c4757