Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Parallaxe's avatar
Parallaxe
Honored Guest
11 years ago

Win/Unity: Build crashes on Application.Quit()

Hi there

I have received my DK2 only a couple of hours ago, but it's scary how smooth everything is working. I have my first own Unity build running and all works very well. Except when I quit the game with Application.Quit(). The exe always crashes on Application.Quit(). The Application.Quit() is working well though when I do the build with a normal controller/camera (OVRPlayerController deactivated). But as soon as I use the OVRPlayerController Application.Quit() goes ballistic. What am I doing wrong?

My specs:
- Unity Pro 4.6 RC1
- DK2 firmware 2.12
- SDK 0.4.3

Cheers (-:

4 Replies

Replies have been turned off for this discussion
  • Can you upload your "output_log.txt". I believe it should be in the data folder for your game.
  • Hi cybereality

    Thanks a lot for your reply. I've sent you a PM with the content of "output_log.txt".

    Cheers (-:
  • Hi there,

    I'm having the same issue... Did you find a solution that works?

    Best,

    Tom
  • I am experiencing the same issue -- I can repro it using a brand new Unity 4.6.3f1 project with the OVR Unity integration Cubes scene (but I have experienced the issue since at least 4.6.1).

    The symptoms: Call Application.Quit() in either the regular or DirectToRift EXE builds for Windows 32-bit (but possibly also 64-bit), and the typical Windows 7 "BLAH.EXE has stopped working" crash dialog appears. My output.log file only shows logs that I added from my application (i.e. the Debug.Log statements that I put in my code) up until the crash, but then nothing else afterwards so it is not useful at all.

    The debugger's stack trace starts at OVRDisplayRT32.dll!6c5acae0(). You can see the error message being outputted by OutputDebugStringW in the memory dump (at the address pointed to by EBP/EDI). I couldn't find the equivalent libOVR source code in the OVR SDK or any PDB symbol files, so my bug hunt ends here.

    Here is my debugger for visual reference:
    http://i.imgur.com/LPqprbi.png

    Incidentally, as a workaround, enabling "script debugging" seems to make the issue go away, but it's prohibitive for me to enable it on customer-facing builds. I also tried forcibly disabling the OVR HMD via:


    if (ovrIsInitialized)
    {
    OVR_Destroy();
    OVRPluginEvent.Issue(RenderEventType.Destroy);
    _capiHmd = null;

    ovrIsInitialized = false;
    }


    This has its intended effect. The OVR shaders and stereo rendering go away for a frame (plain old mono rendering) before the crash, but the crash still happens.

    Any guidance would be greatly appreciated, as it is admittedly pretty embarrassing to have builds crash upon exit while demoing my app.