ERROR "OBS did not shut down properly ..."

A93ntZ3r0

New Member
Hi,
After the last OBS update on Steam "v30.0.0", I always get the following message when I log in to Windows 10:
//
OBS did not shut down properly during your last session.
Would you like to start in Safe Mode (third-party plugins, scripting, and WebSockets disabled)?
//

And choosing Safe Mode does not seem to make any difference.

Is there any way to fix this?

Here is the log file.

Thanks.
 

PaiSand

Active Member
Display capture should be on it's own separated scene as it causes interference with game and window capture methods.
Only one game capture is also adviced.
Enable Windows Game Mode as it do help.
That's all you can see on the log file.
You may want to try and change CFR to CQP and test it. The GPU driver is old.

More info is needed. Are you closing Windows without closing OBS first?
 

Wisq

New Member
I'm in the same boat — I use OBS as a replacement for ShadowPlay, so it starts up silently (or at least, it's supposed to) and starts the replay buffer, then shuts down with the computer. Having to manually exit it each shutdown would be a real pain in the arse.

I've also got one game that needs OBS running as admin, so I've got scripts that kill and relaunch OBS with/without admin privileges as needed — and obviously those scripts are running into this same issue as well.

It seems that this message only appears if %APPDATA%\obs-studio\safe_mode (a zero-byte file) exists, so if you need to work around this, just launch OBS via a script that deletes that file first.
 

A93ntZ3r0

New Member
It seems that this message only appears if %APPDATA%\obs-studio\safe_mode (a zero-byte file) exists, so if you need to work around this, just launch OBS via a script that deletes that file first.
This did the trick, I can not thank you enough.
Now I use two tasks through the Windows Task Scheduler that do the following every Windows log-on:
> The first one deletes that zero-byte file.
> The second one starts OBS making sure that Replay Buffer is active.

I wonder how you did you know that this specific file caused this problem :)

Thanks again for the help.
 
I'm in the same boat — I use OBS as a replacement for ShadowPlay, so it starts up silently (or at least, it's supposed to) and starts the replay buffer, then shuts down with the computer. Having to manually exit it each shutdown would be a real pain in the arse.

I've also got one game that needs OBS running as admin, so I've got scripts that kill and relaunch OBS with/without admin privileges as needed — and obviously those scripts are running into this same issue as well.

It seems that this message only appears if %APPDATA%\obs-studio\safe_mode (a zero-byte file) exists, so if you need to work around this, just launch OBS via a script that deletes that file first.
thanks, this was my problem too. it fixed it for me. I put this in my startup:

@Echo Off
del %APPDATA%\obs-studio\safe_mode /y
cd "C:\Program Files\obs-studio\bin\64bit\"
start "" "C:\Program Files\obs-studio\bin\64bit\obs64.exe"
 

Wisq

New Member
I wonder how you did you know that this specific file caused this problem :)

I started from the assumption that it was probably storing something in one of the AppData folders, since that's the only place programs can rely on being able to write to. Only one of those had an obs-studio folder, and I could see that OBS created a safe_mode file on start and deleted it on exit, and it seemed like an obvious bet (given that the dialog box asks you if you want to enter safe mode).

So just a combination of intuition plus it being pretty obvious once spotted. :D
 

E-ManOnOBS

New Member
Thanks for this, I have log-on and log-off scripts that start recording when I log in or taskkill OBS when I log off, so this new "feature" was really annoying.
 

buzzuppity

New Member
thanks, this was my problem too. it fixed it for me. I put this in my startup:

@Echo Off
del %APPDATA%\obs-studio\safe_mode /y
cd "C:\Program Files\obs-studio\bin\64bit\"
start "" "C:\Program Files\obs-studio\bin\64bit\obs64.exe"
I'm running a script similar to this but still getting the error message on Windows/OBS startup. Also, I always have OBS running as an administrator (for resource priority/preventing recording lag).
I'm the same as Wisq, using OBS as a replacement for ShadowPlay. Are there any other startup scripts that work?

The script I'm using is:
del %APPDATA%\obs-studio\safe_mode /y
cd "C:\Program Files\obs-studio\bin\64bit\"
start "" "C:\Program Files\obs-studio\bin\64bit\obs64.exe" --startreplaybuffer



Log file attached if needed!
 

Attachments

  • 2023-11-15 14-57-44.txt
    9.6 KB · Views: 427

Wisq

New Member
Also, I always have OBS running as an administrator (for resource priority/preventing recording lag).

Have you tried running the entire script as administrator? Depending on your setup, "run as administrator" may be running OBS as an entirely different (administrator) user, meaning that %APPDATA% will point to a different directory for that user.
 

buzzuppity

New Member
Have you tried running the entire script as administrator? Depending on your setup, "run as administrator" may be running OBS as an entirely different (administrator) user, meaning that %APPDATA% will point to a different directory for that user.
Running the script as administrator on startup causes OBS to not open on startup. To clarify, manually opening the script does cause OBS to open. My setup for OBS running as administrator is
Context Menu➡Properties➡Compatibility➡Run this program as administrator on appropriate .exe/shortcuts if that helps any.
I'm the only user on my computer, and an administrator. So I'm unsure where else it could point to other than maybe SYSTEM.
 

Stopa

New Member
I used this script and have it execute after user logon in Task Scheduler. For some reason exectuting on system start up doesn't work for me.

@Echo Off
del "C:\Users\Stopa\AppData\Roaming\obs-studio\safe_mode"
start "" "C:\Program Files\Start OBS\OBS Recording.lnk"


Or you can use this script that will tell you if the file was deleted or not but its kinda useless

@Echo Off
set FILEPATH=C:\Users\Stopa\AppData\Roaming\obs-studio\safe_mode

if exist "%FILEPATH%" (
del "%FILEPATH%"
if exist "%FILEPATH%" (
echo Failed to delete %FILEPATH%.
) else (
echo Successfully deleted %FILEPATH%.
)
) else (
echo File %FILEPATH% not found.
)

timeout /t 2 /nobreak
start "" "C:\Program Files\obs-studio\Start OBS\OBS Recording.lnk"
 

Bosmoth

New Member
What program should I use to run these scripts? I'm a complete beginner to them. A picture of the script would also be really helpful, thanks in advance!
 

A93ntZ3r0

New Member
What program should I use to run these scripts? I'm a complete beginner to them. A picture of the script would also be really helpful, thanks in advance!
Open a new Notepad file, copy and paste the script into the file, then save the file as "any name.cmd", that's it.
Or instead of using scripts, you can create a shortcut of OBS, then Right-click the shortcut then Properties, and add the following after the end of the "Target path": --disable-shutdown-check --startreplaybuffer
explorer_BCfwaEfcpx.png
 

Bosmoth

New Member
Open a new Notepad file, copy and paste the script into the file, then save the file as "any name.cmd", that's it.
Or instead of using scripts, you can create a shortcut of OBS, then Right-click the shortcut then Properties, and add the following after the end of the "Target path": --disable-shutdown-check --startreplaybuffer
View attachment 99512
Thank you so much!
I didn't know it was that easy, but thank you again!
 

conic the cat

New Member
ive been having this issue, stopas method seemed to work, but i get these errors
"failed to find locale/en-us.ini"
"failed to find locale"
 
Top