Game crashes when losing focus
Describe the bug
When s&box loses focus (alt tabbing, clicking on second monitor, etc) it instantly crashes. no warning, nothing shows in the crash log.
To Reproduce
- open s&box in game mode
- click anywhere in game
- alt tab or click anywhere on second monitor
Expected behavior
game should not crash
Media/Files
https://github.com/user-attachments/assets/a3ddfb26-794e-481b-a562-c1c9b7ba00eb sbox.log
Additional context
steam id: 76561198164411694
fixed by reinstalling graphics drivers if you have this issue, do not use nvcleanstall to install graphics drivers, s&box doesn't like it.
This is happening again and my graphics drivers are up to date from the NVIDIA app, no nvcleanstall so that wasn't actually the issue
Application: sbox-dev.exe CoreCLR Version: 7.0.2024.26716 .NET Version: 7.0.20 Description: The process was terminated due to an unhandled exception. Exception Info: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Stack: at System.Environment.Exit(Int32) at Sandbox.Engine.Bootstrap.Init() at Sandbox.AppSystem.InitGame(Sandbox.AppSystemCreateInfo) at Sandbox.EditorAppSystem.Init() at Sandbox.AppSystem.Run() at Sandbox.Launcher.Main() at Sandbox.Program.Launch() at Sandbox.Program.Main()
seems to just be on an off with driver versions, unsure if I should keep this open because it's not happening anymore.