obs-transition-matrix icon indicating copy to clipboard operation
obs-transition-matrix copied to clipboard

Crash when removing scene

Open cg2121 opened this issue 6 years ago • 4 comments

I got a crash when removing a scene. This scene didn't have any transition set for it. It also had copies of scene items from another scene, if that helps. If I add a blank scene and delete it, it doesn't crash.

https://obsproject.com/logs/snF-MU0Q_VFWYjLx

cg2121 avatar Aug 31 '19 20:08 cg2121

Hello,

can you provide a (minimal) list of actions starting from a fresh scene list that lead to such a crash? That would probably help to pinpoint the cause.

EDIT: Okay, it seems to be as trivial as it gets: On a plain new config, add a scene, remove a scene, crash. I'll try to look into this.

ochilan avatar Jan 19 '20 09:01 ochilan

Please see pull request #5. The issue is that the "newSceneNames.size() == sceneNames.size()" case in handle_scene_list_changed assumes that the scene list has actually changed. However, this is not necessarily the case. For instance, renaming a scene without giving it a different name or removing a scene using the context menu(*) caused a crash since this assumption is violated. I thus added an explicit check whether the scene list actually changed.

Note that I simply return in case the scene list has not changed. Correct me if I'm wrong in my assumption that in this case, no update_scenes_transition_override call is necessary.

(*) When removing a scene using the context menu, the callback is called twice for some reason. The second call then caused the crash. When removing a scene using the Del key, the crash didn't occur.

ochilan avatar Jan 20 '20 20:01 ochilan

Fixed in #5.

cg2121 avatar Jan 24 '20 18:01 cg2121

Close?

unknowndomain avatar Apr 23 '20 23:04 unknowndomain