Skip to content

Fixes litecoin#1079 by preventing notifications#1080

Open
luke-mckay wants to merge 1 commit intolitecoin-project:masterfrom
luke-mckay:202211MacSegfaultOnQuit
Open

Fixes litecoin#1079 by preventing notifications#1080
luke-mckay wants to merge 1 commit intolitecoin-project:masterfrom
luke-mckay:202211MacSegfaultOnQuit

Conversation

@luke-mckay
Copy link
Copy Markdown

@luke-mckay luke-mckay commented Feb 6, 2026

MacOS 13 sends a window focus change notification after the main window has been destroyed but before the QTApplication has been destroyed. This results in the menu bar receiving a notification despite it no longer existing. The solution is to pass the main window as context when subscribing to the notifications. Qt automatically unsubscribes to notifications if the sender OR context is destroyed.

Fixes #1079

This was a cherry-pick of 8a5014c from the bitcoin-core GUI repo.

MacOS 13 sends a window focus change notification after the main
window has been destroyed but before the QTApplication has been
destroyed. This results in the menu bar receiving a notification
despite it no longer existing. The solution is to pass the main
window as context when subscribing to the notifications. Qt
automatically unsubscribes to notifications if the sender OR
context is destroyed.
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.

Crash on MacOS when GUI is shutdown

2 participants