Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DolphinQt/Debugger: Fix crash with floating debugger windows #8618

Merged
merged 1 commit into from Feb 9, 2020

Conversation

@encounter
Copy link
Contributor

encounter commented Feb 9, 2020

QDockWidget::setFloating ends up calling showEvent in the implementation class.

In BreakpointWidget and CodeWidget, this leads to Update() and a null pointer dereference on widgets that haven't been created yet. Moving the CreateWidgets call before setFloating fixes this. (JITWidget and MemoryWidget already do this.)

The rest of the widgets that call setFloating have also been updated to avoid similar bugs if they're changed in the future.

@encounter

This comment has been minimized.

Copy link
Contributor Author

encounter commented Feb 9, 2020

The crash can be reproduced with a Qt.ini containing:

[breakpointwidget]
floating=true

[codewidget]
floating=true

[debugger]
showbreakpoints=true
showcode=true
showregisters=true

[registerwidget]
floating=true
Copy link
Contributor

CookiePLMonster left a comment

Untested, but it makes sense.

@leoetlino leoetlino merged commit aa21fe1 into dolphin-emu:master Feb 9, 2020
10 checks passed
10 checks passed
default Very basic checks passed, handed off to Buildbot.
Details
lint Build succeeded on builder lint
Details
pr-android Build succeeded on builder pr-android
Details
pr-deb-dbg-x64 Build succeeded on builder pr-deb-dbg-x64
Details
pr-deb-x64 Build succeeded on builder pr-deb-x64
Details
pr-freebsd-x64 Build succeeded on builder pr-freebsd-x64
Details
pr-osx-x64 Build succeeded on builder pr-osx-x64
Details
pr-ubu-x64 Build succeeded on builder pr-ubu-x64
Details
pr-win-dbg-x64 Build succeeded on builder pr-win-dbg-x64
Details
pr-win-x64 Build succeeded on builder pr-win-x64
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.