Skip to content

Fix crash on first keypress after restoring a mismatched dock layout - #1153

Open
Faq wants to merge 1 commit into
dail8859:masterfrom
Faq:issue_1131
Open

Faq wants to merge 1 commit into
dail8859:masterfrom
Faq:issue_1131

Conversation

@Faq

@Faq Faq commented Sep 26, 2026 •

Copy link
Copy Markdown

QMainWindow::restoreState() can corrupt internal separator bookkeeping (QTBUG-111538) when the saved windowState references a set of dock widgets that doesn't match the ones created this session, e.g. after an update added, removed, or renamed a dock. Qt logs "QDockAreaLayout::updateSeparatorWidgets: null separator widget" and the next relayout, triggered here by the first keypress, dereferences the null separator and crashes.

Save the dock objectName() set alongside windowState, and skip restoreState() when it no longer matches the current set, falling back to the default layout instead of handing Qt a blob it can corrupt itself on.

Confirmed the version-skew precondition exists in practice (a leftover HexViewerDock reference from before that dock was removed).

Closes #1131

QMainWindow::restoreState() can corrupt internal separator bookkeeping
(QTBUG-111538) when the saved windowState references a set of dock
widgets that doesn't match the ones created this session, e.g. after an
update added, removed, or renamed a dock. Qt logs
"QDockAreaLayout::updateSeparatorWidgets: null separator widget" and the
next relayout, triggered here by the first keypress, dereferences the
null separator and crashes.

Save the dock objectName() set alongside windowState, and skip
restoreState() when it no longer matches the current set, falling back
to the default layout instead of handing Qt a blob it can corrupt
itself on.

Confirmed the version-skew precondition exists in practice (a leftover
HexViewerDock reference from before that dock was removed).

Closes dail8859#1131
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS 26.6: SIGSEGV on first keypress after restoring windowState (QDockAreaLayout null separator widget)

1 participant