Skip to main content
Up and Coming
April 7, 2017

Unity "Run in background" player option causing crash after updating project to Unity 5.6.0f3

I have just been updating a VR project that was using (Unity 5.4.1p4 & Oculus Utilities 1.8.0) to (Unity 5.6.0f3 & Oculus Utilities 1.13.0).
The updated project seems to work fine running inside the Unity Editor, but if I build it to an EXE for Windows, the resulting EXE now crashes on startup just after hitting "Play!" on the config dialog.

I started a fresh Unity project using the test room scene provided with Oculus Utilities 1.8.0, and this works fine for me when built to an EXE for Windows. However, when I compared the Unity player settings for this project with my upgraded project I discovered that the option that causes the crash is the "Run in background" player setting. i.e. The built application for both projects crash on startup if the "Run in background" option is enabled.

Is anyone one else having the same issue?
Is the Unity "Run in background" player option no longer supported for Oculus VR projects?

(Interestingly, if I build a fresh Unity project without importing the Oculus Utilities package, and only tick the "Virtual Reality Supported" and "Run in background" options, I don't get any issues, so my guess is that implies the problem is connected in some way to the Oculus Utilities package)

This topic has been closed for replies.

10 replies

Inspiring
April 7, 2017
Moving to developer section.
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
New Participant
April 21, 2017

Is anyone one else having the same issue?

I am seeing the exact same issue on my end, with Unity 5.6.0f3 and "latest everything" (Oculus, Leap, etc.). Only crashes in builds; works fine in the editor.

Luckily your post guided me in the right direction for a temporary workaround!

This bug is a pretty big deal for our main use case (convention demos with lots of putting the Oculus on and off repeatedly).

ChrisXAuthor
Up and Coming
April 21, 2017
Ah ha. Glad it's not just me then.
I've not found any further information about this problem yet.
Inspiring
April 21, 2017
I can't reproduce this. Can you provide <AppName>_Data/output_log.txt from a run that crashed?
Inspiring
April 21, 2017
I seem to have reproduced it with our old Tuscany demo. This is actually a known issue in Unity 5.6. Does it still occur if you use Unity Pro and DON'T assign a virtual reality splash image in player settings?

> TuscanyPC.exe!CameraStackRenderingState::CalculateStereoCameraTargetType(void) Unknown
  TuscanyPC.exe!CameraStackRenderingState::BeginRenderingStack(struct CameraStack const &,bool) Unknown
  TuscanyPC.exe!RenderManager::RenderCameras(int,void (*)(void)) Unknown
  TuscanyPC.exe!PlayerRender(bool) Unknown
  TuscanyPC.exe!PlayerRender(bool) Unknown
  TuscanyPC.exe!PlayerLoop(void) Unknown
  TuscanyPC.exe!ScreenManagerWin::OnWindowRegainedFocus(void) Unknown
  TuscanyPC.exe!TitleBarTimerUpdateCallback(struct HWND__ *,unsigned int,unsigned int,unsigned long) Unknown
  TuscanyPC.exe!PlayerWinMain(struct HINSTANCE__ *,struct HINSTANCE__ *,char *,int) Unknown
ChrisXAuthor
Up and Coming
April 21, 2017
not sure. I'll test that on monday. thanks.
New Participant
April 24, 2017
For me it happens with Pro and no VR splash assigned.  
ChrisXAuthor
Up and Coming
April 26, 2017
Just to confirm, it does crash for me with unity pro and no VR splash screen using a fresh project just uses the Oculus utilities Room example with the "run in background" option ticked (runs fine without it)
I have attached the crash logs to this message.
Inspiring
April 26, 2017
Unity has fixed this issue in 5.6.0p2. Does that version work better for you?
ChrisXAuthor
Up and Coming
April 26, 2017
Hurrah. Yep, 5.6.0p2 does fix the crash. Thank you.