obs-zoom-to-mouse icon indicating copy to clipboard operation
obs-zoom-to-mouse copied to clipboard

Switching Scene Collections Breaks

Open davidvkimball opened this issue 1 year ago • 8 comments

When I switch scene collections (on OBS 2.9.1.1 to remain compatible with StreamElements) I get a window that pops up saying:

"There was a problem while changing scene collections and some sources could not be unloaded. T his issue is typically cuased by plugins that are not releasing resources properly. Please ensure that any plugins you are using are up to date.

OBS Studio will now exit to prevent any potential data corruption."

It is directly related to this plugin. When I remove it, this issue goes away.

Any idea on a fix?

davidvkimball avatar Feb 18 '24 07:02 davidvkimball

@davidvkimball There is a weird issue with that version of OBS that I couldn't ever figure out. If you look at this line: https://github.com/BlankSourceCode/obs-zoom-to-mouse/blob/53dc1a5425c2a96db34fb34aae40283f84bf1720/obs-zoom-to-mouse.lua#L1409

You'll see a comment about it crashing when trying to release the sources.

If you are not on the latest script from main you could try downloading it directly (instead of the releases page which is slightly older).

If you are already on main, you could try removing that if check, so that the script does release the scene item stuff even on your version of OBS.

Give it a go and let me know.

BlankSourceCode avatar Feb 18 '24 18:02 BlankSourceCode

@BlankSourceCode hey James! Thank you for the reply and suggestion. Honestly, I am struggling with the syntax, I keep getting errors when importing into OBS.

Do you mind making those modifications for me and dropping me the file? Or telling me specifically how to remove the if check?

davidvkimball avatar Feb 18 '24 18:02 davidvkimball

@davidvkimball Does it still crash if you just use the version of the script from main (without modifications)?

BlankSourceCode avatar Feb 18 '24 18:02 BlankSourceCode

@BlankSourceCode yes, I forgot to mention, I had downloaded the main version the first time (I never used a release). Just tried again now for a sanity check, still crashes.

davidvkimball avatar Feb 18 '24 18:02 davidvkimball

@davidvkimball Ok. Try this which is just main with the version check removed: obs-zoom-to-mouse.zip

So it will release the scene item the same way it does in OBS v30+

If that still crashes, could you try looking at the crash/script log and reply with anything interesting from there.

BlankSourceCode avatar Feb 18 '24 18:02 BlankSourceCode

Crash 2024-02-18 21-16-38.txt

@BlankSourceCode thank you! Unfortunately I got a crash there also, with no warning this time. Happened upon Scene Collection switch.

davidvkimball avatar Feb 19 '24 05:02 davidvkimball

The log says its crashing when trying to unregister the hotkey. Try this script which just skips that part but still releases the scene item:

obs-zoom-to-mouse.zip

BlankSourceCode avatar Feb 19 '24 05:02 BlankSourceCode

@BlankSourceCode thank you so much! This one works - only quirk I could find is that switching scene collections makes the hotkey not work anymore until I restart OBS. But nothing crazy! Really appreciate your help.

davidvkimball avatar Feb 19 '24 05:02 davidvkimball