How can I disable the message box on close, when virtualcam is running?

Prukotar

New Member
Hello,

I'm starting OBS minimized with --startvirtualcam parameter in background (to use it in other software with some overlay). The problem is, when shutting down the PC there is always this window:

1718979479560.png


Windows is than forcing to close OBS after 30 seconds, which marks it as crashed for the next time. Is there any option to suppress this window and close OBS anyway?

I already disabled this options:

1718979688733.png


But it does not help.
 

Suslik V

Active Member
Maybe this - main menu File > Settings > Advanced > Show active outputs warning on exit ?
At least, there was such option in OBS v27+ and worked OK:

obs_exit_warning_dialog_v27+.png
 

Prukotar

New Member
Okay, that extra button did the trick. That all seems a bit confusing what button is used for what warning. Would be great to have an "Don't show this message again" checkbox for those confimation dialogs. Thank you.
 

Suslik V

Active Member
OBS main menu Help > Crash Reports
You can attach files to your post if there any.

Or it just "Unclean shutdown detected!" ?
 

Prukotar

New Member
It is "Unclean shutdown detected" on next start of OBS. My scenario is: Virtual Cam is running, no streams open. Just one scene with some overlays. I'm shutting down the computer, while OBS is running and the virtual cam is active. In my opinion this should simply close OBS without any crash marks. I think this happens, because the file for crash detection is not properly removed. OBS is automatically started, when the computer starts with --startvirtualcam option. I'm using the windows task planning tool for this.
 

Prukotar

New Member
I tested a little bit more and after 20 tries I got a crash log (see attached file). I was wrong with the count of scenes (I've two of them).
 

Attachments

  • Crash 2024-06-26 12-11-36.txt
    80.3 KB · Views: 15

Suslik V

Active Member
Code:
Thread 9E0: CrBrowserMain (Crashed)
Stack            EIP              Arg0             Arg1             Arg2             Arg3             Address
000000A54F4FE5A0 00007FFCD320BC10 0000670A00760080 00007FFD48D2608E 0000000000000018 00007FFCD31EB6ED libcef.dll!0x7ffcd320bc10
000000A54F4FEA70 00007FFCD153BCB6 0000670A003207A8 00007FFCD31F42EF 0000000000000003 0000670A00701B80 libcef.dll!0x7ffcd153bcb6
this is crash in the Browser source of OBS.

If you have Browser sources in your current Scene Collection - try to make new Scene Collection (there is main menu entry to make new) without Browser sources. If you are using some web-based panels (dock panes) in OBS (live chat etc) try to close them too. If you have plugins installed that can use browser functions of OBS try to uninstall them too. In short - avoid all cases where browser source of OBS can be involved.
 

Suslik V

Active Member
Maybe regular OBS log-file (look for same date/time as in the crash log) has more info about the problem?
 

Prukotar

New Member
I did not find one. But to be sure: The crash at shutdown occurs with a change of 1:20 (5%), the "Unclean shutdown detected" popup ocurs with a chance of 50%. The Browser source is the only source except for the camera source in this scene. The file is local and just contains CSS and HTML and a small amount of JS that's processed once to set some styling depending on parameters. The ""Unclean shutdown detected" remains after removing the browser source with a chance of 50%.
 

Suslik V

Active Member
50% is a lot. The 5% is not so much, but crash is even worse. More tests/info needed to isolate issue and find the root of the problem. You can export your current OBS Scene Collection and Profile, then you can make new portable OBS (in different folder, read after the "If it was not clear" words in: https://obsproject.com/forum/thread...»-when-opening-app-settings.82157/post-346499 ) and then import saved scenes and profile in portable OBS to test it as much as you can. To launch OBS without plugins you can use --safe-mode cmdline key.

There are number of similar reports (some may not related to your issue):

Thus, if you'll able to provide to developers all info they will ask, then there is chance that issue will be fixed (or suitable workaround found).
If possible, update your OBS to latest one (developers almost never looking at old code) and make report to:
 

Suslik V

Active Member
Other route is to take a part in beta testing (by downloading beta version of OBS) and making report to most recent BETA thread (at the moment) on the forum:

Some guys can answer in Discord:
 
Last edited:

AaronD

Active Member
I'm shutting down the computer, while OBS is running and the virtual cam is active. In my opinion this should simply close OBS without any crash marks.
I would think so too, but I have several examples to say it doesn't, between this forum and my own experience.

For just a peek under the hood, there are a bunch of different "signals" that can be sent to a running process to make it do things. Some of them are:
  • Shut down gracefully as if the user clicked the close button, but implemented as a general-purpose signal for the app to figure out.
  • Shut down immediately ("crash close"), also implemented as a general-purpose signal for the app itself to deal with.
  • Intercepted by the operating system so that the app never sees it, and forces it to end right there.
The OS shutdown procedure includes sending the graceful-close signal to everything, waiting a bit, and then asking the user to force-close whatever remains.

When I wrote the management script for a complex rig (ordered startup, wait for done, then ordered shutdown), I could never find a close signal that didn't make OBS complain on the next startup. So I added the --disable-shutdown-check flag on OBS's command line. My complete logic then, to start two simultaneous instances of OBS is:
Bash:
echo "Start OBS Master (feed to meeting)"
obs --verbose --unfiltered_log --disable-updater --disable-shutdown-check --multi --studio-mode --profile "$OBS_PROFILE" --collection "$OBS_PROFILE" --startvirtualcam > /dev/null &
PID_MASTER=$!
sleep 10
echo
echo "Start OBS Slave (local display and recording)"
obs --verbose --unfiltered_log --disable-updater --disable-shutdown-check --multi --studio-mode --profile "Meeting_Slave" --collection "Meeting_Slave" > /dev/null &
PID_SLAVE=$!
sleep 10
echo prints to the terminal, as an indication to the user of what it's doing.
The $NAME's are variables, so I can use the same script for several different things.
sleep pauses there for so many seconds.
> /dev/null keeps the terminal cleaner by preventing messages from that command from being displayed.
& on the end continues on without waiting for that command to finish.
$! is the process ID (PID) of the previous command that we're not waiting for. I assign it to a variable so I can send the shutdown signal to it later.

And for completeness:
Bash:
echo
echo "Close OBS Slave"
kill -TERM "$PID_SLAVE"
sleep 5
echo
echo "Close OBS Master"
kill -TERM "$PID_MASTER"
sleep 5
-TERM is the official name for the specific signal that I'm sending. Like I said, I tried a bunch there, and couldn't find one that OBS didn't complain about. Hence, the flag on startup to just not complain.
 

Prukotar

New Member
Hey, thanks for all the answers. Unfortunately, I've been away for the last few days. I rarely see a reason for starting after a crash in safe mode as helpful anyway. It only helps if OBS no longer starts at all. I would generally want to suppress the message. Assuming OBS is started and then crashes within a minute, you could assume that something has gone wrong here. However, if OBS runs for a few hours and is then closed, safe mode is somehow not helpful as a "solution". The --disable-shutdown-check option is enough for me. To be honest, I don't even care if the browser crashes in the end. OBS has never crashed during my session.
 
Top