Skip to content

frontend: Adjust shutdown logic more - #13347

Merged
RytoEX merged 1 commit into
obsproject:masterfrom
Warchamp7:more-shutdown-things
Jun 8, 2026
Merged

RytoEX merged 1 commit into
obsproject:masterfrom
Warchamp7:more-shutdown-things

Conversation

@Warchamp7

@Warchamp7 Warchamp7 commented Apr 21, 2026 •

Copy link
Copy Markdown
Member

Description

Removes our connections to Qt's aboutToQuit signal as well better handling the deferred close to the main window for WM_QUERYENDSESSION.

Motivation and Context

Trying to fix shutdown crashes more. The aboutToQuit connections were set up early in my original shutdown logic PR and now that we have a nativeEventFilter for the Windows MSGs (Which is exactly the same thing aboutToQuit gets fired from), it no longer appears to be necessary (And indeed was causing some issues on macOS) and may only be causing problems in some cases.

We're still seeing some situations where OBSBasic is getting destroyed while already shutting down that may be attributable to this.

How Has This Been Tested?

Shut down OBS various times, including with/without outputs active, and tried logging out in both scenarios.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@Warchamp7
Warchamp7 force-pushed the more-shutdown-things branch from 1c37d83 to 50e4b6f Compare April 21, 2026 01:21
@WizardCM WizardCM added the kind/bug Categorizes issue or PR as related to a bug. label May 1, 2026
@Warchamp7
Warchamp7 force-pushed the more-shutdown-things branch from 50e4b6f to 9617afd Compare May 28, 2026 03:49
@RytoEX
RytoEX requested review from PatTheMav and RytoEX May 28, 2026 03:56
@BenJuan26

BenJuan26 commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

This solves an issue I was having when attempting to close OBS while it's minimized to the system tray. With the main build, it would always crash.

Test steps:

  • Start OBS
  • Minimize while configured to minimize to tray
  • Find PID in taskmgr
  • run taskkill /pid <pid>

It's at that point that it crashes with the main build, but with this change it works correctly. The same applies for starting with --minimize-to-tray. It works successfully with this change.

From what I can tell, it should close this issue: #10933

Comment thread frontend/OBSApp.cpp Resolved
@Warchamp7
Warchamp7 force-pushed the more-shutdown-things branch from 9617afd to c62ae22 Compare June 6, 2026 05:16

@PatTheMav PatTheMav left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine and should have no impact on macOS.

@Warchamp7 Warchamp7 added this to the OBS Studio 32.2 milestone Jun 7, 2026
@RytoEX
RytoEX merged commit 9f4320e into obsproject:master Jun 8, 2026
15 checks passed
@Warchamp7
Warchamp7 deleted the more-shutdown-things branch October 8, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants