Forum Discussion
hyperion337
9 years agoExplorer
Upgrading to Unity 5.6 f3 causes crash on Play
Just upgraded a project from Unity 5.3.5f1 to 5.6.0f3 and now Unity crashes on Play whenever the Oculus SDK is first in the SDK list.
It crashes in an empty scene too. I've confirmed that Unity 5.6 is working by creating a new, clean project and selecting the Oculus SDK - everything works fine. The first thing we did when upgrading is remove all the old Oculus SDK code and brought in Oculus Utils 1.13. I have tried Oculus through OpenVR and this does work.
Any help / ideas on how to solve this are greatly appreciated.
Here's the stack trace:
Unity Editor [version: Unity 5.6.0f3_497a0f351392]
It crashes in an empty scene too. I've confirmed that Unity 5.6 is working by creating a new, clean project and selecting the Oculus SDK - everything works fine. The first thing we did when upgrading is remove all the old Oculus SDK code and brought in Oculus Utils 1.13. I have tried Oculus through OpenVR and this does work.
Any help / ideas on how to solve this are greatly appreciated.
Here's the stack trace:
Unity Editor [version: Unity 5.6.0f3_497a0f351392]
OVRPlugin.dll caused an Access Violation (0xc0000005)
in module OVRPlugin.dll at 0033:c33b4388.
Error occurred at 2017-05-09_211044.
C:\Program Files\Unity_5.6.0f3\Editor\Unity.exe
47% memory in use.
16339 MB physical memory [8526 MB free].
18771 MB paging file [7119 MB free].
134217728 MB user address space [134215611 MB free].
Read from location 00000000 caused an access violation.
Context:
RDI: 0x461e5f20 RSI: 0x461e3e50 RAX: 0xfffffc13
RBX: 0x00000001 RCX: 0x00000000 RDX: 0x12e9e828
RIP: 0xc33b4388 RBP: 0x12e9e870 SegCs: 0x00000033
EFlags: 0x00010202 RSP: 0x12e9e770 SegSs: 0x0000002b
R8: 0x00181680 R9: 0x00008000 R10: 0x00000000
R11: 0x12e9e3a0 R12: 0x000006f0 R13: 0x00000600
R14: 0x168dd9e0 R15: 0x461e50d8
Bytes at CS:EIP:
48 8b 01 ff 50 50 48 8b 4c 24 40 48 8b 01 ff 50
Stack:
0x12e9e770: 00000030 00000000 12e9e890 00000000 0...............
0x12e9e780: 00000004 00000000 0aa97a68 00007ffa ........hz......
0x12e9e790: 12e9e7b0 00000000 00000000 00000000 ................
0x12e9e7a0: 00000030 00000000 00000000 00000000 0...............
0x12e9e7b0: 00000000 00000000 04beb820 00000000 ........ .......
0x12e9e7c0: 6f15aaf2 4e89d208 9548b49a 9c4fd335 ...o...N..H.5.O.
0x12e9e7d0: 00000001 00000000 12e9e8f0 00000000 ................
0x12e9e7e0: 04bdfbe0 00000000 0aa97a68 00007ffa ........hz......
0x12e9e7f0: 00000080 00000000 00000000 00000000 ................
0x12e9e800: 00000000 00000005 00000001 00000600 ................
0x12e9e810: 000006f0 00000001 00000001 00000000 ................
0x12e9e820: 00000001 00000001 0e14d140 00000000 ........@.......
0x12e9e830: 00000000 00000000 00000000 00000000 ................
0x12e9e840: 00000000 00000000 40b0cb3e 00000001 ........>..@....
0x12e9e850: 04bdcec0 00000002 0e14ca10 00000000 ................
0x12e9e860: 9d244173 0000c54c 80070057 00000000 sA$.L...W.......
0x12e9e870: 80070057 00000000 40b207e2 00000001 W..........@....
0x12e9e880: 04bdcec0 00000000 00000000 00000000 ................
0x12e9e890: 04bdcec0 00000000 04bdfbe0 00000000 ................
0x12e9e8a0: 000006f0 00000000 40000000 00000001 ...........@....
0x12e9e8b0: 00000100 00000000 04bdfbe0 00000000 ................
0x12e9e8c0: 0e14d140 00000000 00000001 00000000 @...............
0x12e9e8d0: 00000001 00000000 c33a8f35 00007ff9 ........5.:.....
0x12e9e8e0: 00000000 00000000 460ed750 00000000 ........P..F....
11 Replies
Replies have been turned off for this discussion
- hyperion337ExplorerI got it to run once and saw the attached errors. I happened to clear all PlayerPrefs before pressing Play on this run, however I believe that was coincidental considering I can't repro that result and it continues to crash.
- hyperion337ExplorerI also see this error when launching Unity (however I have seen this quite commonly in the past):
- hyperion337ExplorerI have also removed all assets from the project and its still crashing.
- hyperion337ExplorerI removed the entire Assets folder and it still crashed. Then i replaced the ProjectSettings from a clean unity project and it doesn't crash anymore. I'll go through and diff the project settings to see what exactly caused it.
- hyperion337ExplorerIts something in ProjectSettings.asset
- hyperion337ExplorerTurns out it was an ANDROID setting: use32BitDisplayBuffer
It needs to be turned ON, otherwise Unity will crash on Play.
This is the same problem as this https://forums.oculus.com/developer/discussion/51313/unity-5-6-release-is-crashing-on-play however I'm not building for GearVR. We do have a GearVR build this error is happening when the platform is Windows.
I've also reproduced this in a clean project and can confirm the same result. Seems to be a bug with either Unity or the OVRPlugin.dll.
I still get this warning every frame: VR: Error setting active audio output driver. Falling back to default. - FieldOfVisionHeroic ExplorerThat's very handy information, thanks for posting the results!
- hyperion337Explorer@imperativity from the outside it seems that there could be a serious underlying problem if an Android setting is even capable of affecting (let alone crashing) a Windows build.
- hyperion337ExplorerAppreciate it!
I've also confirmed that the warning I'm still seeing is related to my MSI laptop, unrelated to the problem in this thread.
"VR: Error setting active audio output driver. Falling back to default." - kerskMeta EmployeeThanks for helping track this down hayden. Unity now has a fix for the 32-bit display buffer crash that will be rolling out in an upcoming release.
As for the audio issue, can you check a few things? In the Oculus desktop app, go to the gear icon -> Settings -> Devices -> Rift Headset. What are your current audio in/out device settings here? Does the issue disappear if you switch between Rift and Windows Default? Also, are you on Win10? Finally, in a Unity project with the Oculus Utilities present, can you add this line of code to a MonoBehaviour Update() method that will be executed in your scene and report the value? Curious if it's coming back with an invalid guid.
Debug.Log(OVRPlugin.audioOutId);
Thanks!
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 5 months ago
- 5 months ago