frontend: Restore OBS wrappers in callbacks - #13978
Conversation
Restore OBS wrappers so objects stay alive until their callbacks run.
da3d879 to
40ffaf9
Compare
|
Where those originally wrappers and then "unwrapped" in a recent code change? |
Yes changed in 4abbcf0#diff-5dda35cfd7b6e95cb91853a82d1dccb95f0bae257faa880919b98873e503fe3cL203 Full discussion with Warchamp in the #beta-testing channel on Discord if you want to look as well |
Yeah, I suspect we're papering over an actual issue here, but these were wrappers before and things "worked", so this PR is restoring at least the old structure. |
|
Fixes #13892. |
The actual reason for the crash is that when the group is removed, the destruction of the underlying scene does not happen on the main thread, but on our task thread which takes care of "deferred" deletions. So when a group with an item is deleted, the code will ping-pong between the task thread and the main thread, including the destructor of In that specific case using the wrappers seems to indeed paper over a lot of lifetime issues. I'm not so convinced about the other rollbacks in this PR, but I guess it's fine to be overly cautious now and revisit later. |
Yep, I came to the same conclusion. |
Description
Restore OBS wrappers so objects stay alive until their callbacks run.
Fixes #13892
Motivation and Context
Crash reported in the #beta-testing discord channel, found to be related to 4abbcf0#diff-5dda35cfd7b6e95cb91853a82d1dccb95f0bae257faa880919b98873e503fe3cL203
How Has This Been Tested?
On v33 beta 5 removing a group with sources in it causes a crash, after this change it does not crash.
Types of changes
Checklist: