UI: Delete selection dialogs when parent is deleted - #8725
Conversation
f1d3a69 to
ef4890a
Compare
ef4890a to
4d7d102
Compare
|
Unfortunately this only fixes the crash with hotkeys. It'll still occur when switching scenes via WebSocket or third party plugins/scripts. The better way to fix this would be by properly using the relevant dialog constructors rather than the helper functions, and automatically closing the dialog during the destruction of the toolbar. |
In the source context bar, when an user opens a selection dialog (font, color or file), and they switch scenes (causing the source toolbar to be deleted), OBS would crash, as the dialog is no longer valid. This is fixed by deleting the dialog when the toolbar is deleted.
4d7d102 to
0903ec6
Compare
|
Updated it to delete the selection dialogs, when scenes are switched. |
|
While this is about the toolbar, i've seen this happen with my media playlist plugin that creates an editable list property. i have code that will use |
|
Could it be that this is a Windows-specific issue? Because in my tests the file browser, font picker, and colour picker are all modal dialogs, so I cannot even change the scene. Or did we fix this in the meantime - @gxalpha does this ring a bell? |
|
It happens when you switch scenes with hotkeys. |
Thanks, got it to crash. It also blocked keyboard input in all other applications, which is even worse.. I do wonder if the easier fix would be to ignore hotkeys affecting the main window when a modal window is open. Allowing hotkeys to affect the underlying (blocked) Window seems wrong and runs counter to the idea of a modal dialog. |
|
Closing in favor of #9981 |
Description
In the source context bar, when an user opens a selection dialog
(font, color or file), and they switch scenes (causing the source
toolbar to be deleted), OBS would crash, as the dialog is no longer
valid. This is fixed by deleting the dialog when the toolbar is
deleted.
Motivation and Context
Fixes #7824
How Has This Been Tested?
Made sure the selection dialogs were deleted when switching scenes.
Types of changes
Checklist: