githubuser0xFFFF/Qt-Advanced-Docking-System

Random crush when calling restoreState

vlomov opened this issue · 5 comments

Steps to reproduce:

  1. Build AutoHideExample example
  2. Create perspective p1
    image
  3. Create perspective p2
    image
  4. Select perspective combobox and set focus on it
    image
  5. Switch perspective using your keyboard using the up/down arrow keys to do it quickly.
  6. Result:
    image

I use master branch for this

I just compiled the debug version of master branch: for QT 5.15.2 and try to reproduce the crash on Windows 11 but I was not able to reproduce the crash.

OS: Windows 11
Qt: 5.15.2
Compiler: MinGW
Debug/Release: debug

I use Visual Studio 2022 and Qt 6.5 and Windows 10

I built the example in Debug, but my code crashed in Release

Notice that in perspective p1 Table1 is docked and Table2 is not docked, and in perspective p2 Table2 is docked and Table1 is not docked.

Notice that In my code, the call to restoreState is triggered by a signal from a background thread, so you need to switch perspectives fairly quickly to reproduce crush

This was the reason, I closed the issue the first time. All the required information (Visual Studio 2022, Qt6.5 Debug and Release build) was missing. So I wasted time trying to reproduce the issue with MinGW and Qt 5.15.

No I will try again with MSVC2019 and Qt 6.5.

I just compiled the AutoHide example with the following settings:

Compiler: MSVC19
Qt: 6.6.2
Release

I was not able to reproduce the problem here. This indicates, that this is related to your application. If you would like to reopen the issue, please provide a small sample application or add an example that allows me to reproduce the issue.

patch.txt
try apply this to AutoHideExample mainwindow.cpp, compile and run. Click Run!!! button on toolbar
Visual Studio 2022
Qt 6.6.2
Release