obsproject / obsproject/obs-studio
Starting virtual cam in plugin event - crash in OBSBasic::OnActivate
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 76.4k
- Forks
- 10.2k
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 12
Description
Operating System Info
Windows 10
Other OS
No response
OBS Studio Version
Git
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/koUQNSzx30YPoS2j
OBS Studio Crash Log URL
https://obsproject.com/logs/SXXplF23W55-lQEi
Expected Behavior
Virtual camera should be activated if it wasn't already.
Current Behavior
Obs crashes in function TaskbarOverlaySetStatus() at line taskBtn->setOverlayIcon() because taskBtn is null.
Steps to Reproduce
- Create plugin.
- On
OBS_FRONTEND_EVENT_SCENE_CHANGEDevent callobs_frontend_start_virtualcam() - Run obs
Anything else we should know?
I have made some modifications to obs so lines or address may be shifted. But nothing that could have impacted the camera.
If I "jump" over the first event trigger by adding a variable first_run (which is set after the first SCENE_CHANGED is triggered) then the call to obs_frontend_start_virtualcam() succeeds on all subsequent events.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with OBSBasic::OnActivate and TaskbarOverlaySetStatus(), then trace the OBS_FRONTEND_EVENT_SCENE_CHANGED path that calls obs_frontend_start_virtualcam(). Review the linked log and crash log to confirm the null taskBtn condition. Done means starting the virtual camera from the plugin event no longer crashes OBS when it is inactive.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100