Bug: All toolbars gone on irregular shutdown

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
kraator
Posts: 1
Joined: Mon Apr 04, 2022 11:44 am

Bug: All toolbars gone on irregular shutdown

Post by kraator »

Hi there,

I found several issues about vanished toolbars, but no reproducible case, yet. The following procedure always removes all toolbars on next start of FreeCAD for me:

1. Open any document and apply changes so that it is in an unsaved state.
2. Attempt to restart Windows.
3. Wait until Windows complains about processes that cannot be closed.
4. Cancel the shutdown procedure. FreeCAD will have a save changes popup dialog open.
5. Click save changes. FreeCAD will save the document and close.
6. Restart FreeCAD. All toolbars are gone.

I suppose that this shutdown sequence breaks some config file about window/toolbar layout.

Shall I open a new bug or is there any open issue I missed where I can attach this info?

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +99 (Git)
Build type: Release
Branch: Branch_0.19.3
Hash: 6530e364184ce05ccff39501e175cf2237e6ee4b
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: German/Germany (de_DE)
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Bug: All toolbars gone on irregular shutdown

Post by Roy_043 »

Confirmed. In the <FCParamGroup Name="MainWindow"> section visibility of GUI elements is set to zero. F.e. <FCBool Name="Part tools" Value="1"/> becomes <FCBool Name="Part tools" Value="0"/>.

Code: Select all

OS: Windows 8.1 (6.3)
Word size of FreeCAD: 64-bit
Version: 0.20.28611 (Git)
Build type: Release
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: Dutch/Netherlands (nl_NL)
Installed mods: 
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Bug: All toolbars gone on irregular shutdown

Post by Roy_043 »

kraator wrote: Mon Apr 04, 2022 11:57 am removes all toolbars
AFAICT only the toolbars and panels that were visible when FC shut down are affected. If you switch to a different WB all its toolbars will be visible.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Bug: All toolbars gone on irregular shutdown

Post by Roy_043 »

The statusbar is also switched off after this test. Interestingly the related setting is not stored in the user.cfg file. I have to go into the Windows registry.

Code: Select all

HKEY_CURRENT_USER\Software\FreeCAD\FreeCAD\Qt5.12\StatusBar

Code: Select all

OS: Windows 8.1 (6.3)
Word size of FreeCAD: 64-bit
Version: 0.20.28611 (Git)
Build type: Release
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: Dutch/Netherlands (nl_NL)
Installed mods: 
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Bug: All toolbars gone on irregular shutdown

Post by adrianinsaval »

Could it be a qt bug? any ideas @uwestoehr @wmayer ? This has also been reported here: https://forum.freecadweb.org/viewtopic.php?p=595457
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Bug: All toolbars gone on irregular shutdown

Post by wmayer »

kraator wrote: Mon Apr 04, 2022 11:57 am Shall I open a new bug or is there any open issue I missed where I can attach this info?
Since it's reproducible and others can confirm please open a bug report.
adrianinsaval wrote: Mon May 16, 2022 5:57 pm Could it be a qt bug? any ideas @uwestoehr @wmayer ? This has also been reported here: https://forum.freecadweb.org/viewtopic.php?p=595457
Could be a Qt bug. Qt offers the class QSessionManager that we use in https://github.com/FreeCAD/FreeCAD/blob ... on.cpp#L63 and https://github.com/FreeCAD/FreeCAD/blob ... n.cpp#L132
The statusbar is also switched off after this test. Interestingly the related setting is not stored in the user.cfg file. I have to go into the Windows registry.
A couple of settings are saved to the registry: https://github.com/FreeCAD/FreeCAD/blob ... .cpp#L1425
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Bug: All toolbars gone on irregular shutdown

Post by wmayer »

git commit ca279e4057 fixes the issue.
Post Reply