Bug Report crash on obs_frontend_get_current_scene

WBE

Member
Being new to Lua programming, I try to learn by studying existing scripts and the https://obsproject.com/docs/scripting.html documentation.

Today I encountered the behaviour in my script:
after adding local scene = obs.obs_frontend_get_current_scene()
on exiting OBS it reports a crash.
By commenting that line, it does not crash. Reproduced several times by commenting/uncommenting and restarting OBS.


Please find attached reproduction code.

Log file: https://obsproject.com/logs/pIs0GUnpTQVaedPv
 

Attachments

  • reproduce.zip
    556 bytes · Views: 8

WBE

Member
Several months of experience later: SOLVED. When OBS Studio after exiting shows a Woops, OBS has crashed! pop-up, it means that some memory has not been released properly.

After curr_scenesource = obs.obs_frontend_get_current_scene() you'll have to do obs.obs_source_release(curr_scenesource)

(Note that the obs_frontend_get_current_scene() function actually returns a source type.)
 
Top