Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.3
-
None
-
-
9ea9e2476 (dev), cc5e15491 (6.7), 1d70ba5ca (6.6), 79e28f455 (tqtc/lts-6.5)
Description
The QMainWindowLayout::restoreState starts a problem that causes a crash in the future.
It starts with resetting a unique_ptr called restoredState:
restoredState.reset(new QMainWindowLayoutState(layoutState));
The layoutState copies the restoredState's data in QMainWindowLayout::setGeometry but the restoredState can have invalid data (for example: dangling pointer).
You can get the demo source here:
https://github.com/GigaXenuM/RestoreState
To reproduse the crash build and run app above. Then close and run it again.