You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ASan/UBSan: NULL outputHandler deref in OBSBasic::closeWindow when quitting after failed video init #127
UBSan reports it first: OBSBasic.cpp:1848:37: runtime error: member access within null pointer of type 'struct BasicOutputHandler'.
Cause
closeWindow() calls outputHandler->VirtualCamActive() unconditionally. outputHandler is only created after video init succeeds. If startup fails (here: Failed to initialize video: Graphics module not found), run_program shows an error box. Any quit while that box is open (aboutToQuit → closeWindow) then dereferences NULL.
Repro
Launch OBS so that obs_reset_video fails, e.g. make libobs-opengl.so.30 unloadable. While the "Failed to initialize video" box is up, quit the app (here the X connection dropped). ASan/UBSan build, Xvfb.
Fix
Guard outputHandler (if (outputHandler && outputHandler->VirtualCamActive())) and audit the rest of closeWindow() for other members that only exist after a successful init.
Fixed by PR #432, merged into master as 3504531. The shutdown path now handles an absent output handler; the UBSan regression test and local lint/unit gate passed. No remaining work is known for this crash.
Activity
zackees commentedon Oct 13, 2026
Claiming: frontend shutdown after failed video initialization.
zackees commentedon Oct 13, 2026
Fixed by PR #432, merged into master as 3504531. The shutdown path now handles an absent output handler; the UBSan regression test and local lint/unit gate passed. No remaining work is known for this crash.