UI: Split out Whats New dialog to fix shutdown crash on Linux
Description
CEF crashes on shutdown if any browser window remains open during the shutdown flow.
This particular crash flow is reproducible 100% of the time on Linux with What's New and our modern CEF version.
The previous implementation of the What's New dialog correctly deleted all the Qt widgets, but the CEF internal event flow would only call the "preparing to close" function, and never the "window safely closed" function. All attempts to fix this with minimal changes went nowhere.
Moving the existing What's New code (practically unchanged) to a custom QDialog solves the problem entirely, and is more consistent with other uses (namely OAuth).
I don't believe this issue is new to Chromium 127 (therefore OBS 32.0), the crash just occurs late enough in the shutdown chain that user data (eg. scene edits) are unlikely to be lost, and as we don't use What's New often, may have been difficult to pin down via user reports.
Note: I am unsure if this also fixes the long-standing hang on shutdown if you try to close OBS while the What's New window is attempting to open on startup. It might, but I doubt it.
Motivation and Context
Crashes are bad, especially if their cause is entirely unclear to the user.
How Has This Been Tested?
- Defined a custom What's New API response on Linux to trigger the window opening from the Help menu
- Verified both X and 'Close' correctly call all the right functions in Qt and CEF, and that no crash on shutdown occurs
Built on both Ubuntu 24.04 and Windows 10.
Types of changes
- Bug fix (non-breaking change which fixes an issue)
- Tweak (non-breaking change to improve existing functionality)
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch.
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [x] I have included updates to all appropriate documentation.
I confirm it fixes the crash issue.
@PatTheMav Putting this on your radar