Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when removing scene #2

Open
cg2121 opened this issue Aug 31, 2019 · 4 comments
Open

Crash when removing scene #2

cg2121 opened this issue Aug 31, 2019 · 4 comments

Comments

@cg2121
Copy link

cg2121 commented Aug 31, 2019

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

@ochilan
Copy link
Contributor

ochilan commented Jan 19, 2020

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
Copy link
Contributor

ochilan commented Jan 20, 2020

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.

@cg2121
Copy link
Author

cg2121 commented Jan 24, 2020

Fixed in #5.

@unknowndomain
Copy link

Close?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants