Forum Discussion

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

DK2 Unity 5 Game Crashing - Any ideas?

Sorry for the wall of text. Any help is appreciated!

Long timer lurker, here. So over the summer, I've been tackling a huge Unity project (really my first one) working with a company to develop an Oculus Rift enabled racing sim to be played at an upcoming conference (can't really share much more of the specifics). It uses a DK2 and a Logitech Driving Force GT Racewheel for controls, and is (obviously) built with Unity 5. Started off with the Unity 5 standard assets car controller, and modified it quite a bit to fit the game.

The premise of this game is quite simple. The player(driver) is put into an urban environment. All throughout the city are different blocks (different color, different icon, different score value) that they must drive through and shatter to score points. There are 2 minutes on the clock. Use your turbo, drive off ramps, do donuts, and go crazy crashing into things to get as high of a score as possible. The game itself is branded overall to fit the theme of the conference.

There are 3 separate gaming PC's (with 3 rifts, 3 wheels, and 3 playseat evolution chairs) that players will be able to play on simultaneously. The players name, email address, and all the scores are saved into a Parse database, that integrates well with Unity. There are some cool prizes awarded to the high scorers throughout the conference.

So far, the game is 95% complete. I just have one problem.

After the player's 2 minutes are up, the game switches from the game scene to a simple scoreboard scene, that does a Parse query to display the results. That's all working and my code seems fine. I can load the scoerboard scene just fine when playing in the Unity editor, with VR/Rift enabled. I can also load the scoreboard scene when built to standalone running with VR/Rift disabled. However, when I build to standalone with VR support enabled, it crashes everytime! (even though it works with VR when in editor?!). So VR-enabled in editor works fine, non-VR standalone works fine, but when VR is enabled in the standalone build for some reason it crashes every time. There are a few other menu scenes that work fine, it only crashes when going from the game scene to the scoreboard scene.

In fact, it's worth noting that it crashes no matter what scene it tries to load after the game scene - even an empty one!


PC Specs:

* i5 4590

* r9 290 4GB

* 16GB RAM

* 250GB SSD

* Oculus Rift DK2

* Oculus Runtime v0.7.00 (or 0.6.0.1, doesn't make a difference)

* Unity 5.1.2

* Windows 8.1

Here are a few screenshots: http://imgur.com/gallery/sp6Zo/new

Here's the error message itself: http://imgur.com/gallery/D4ZlaSo/new

Here is the crash log: http://www.filedropper.com/2015-08-28173804

Here's the scoreboard script to load from Parse. I don't think its an issue with the scoreboard however, it really seems like something with the game scene when trying to transition. And no idea why it crashes ONLY when VR is enabled. http://pastebin.com/e0EJZ3nj

If there's any other info you need to know just tell me! I'm just at a loss...

Any ideas?

6 Replies

Replies have been turned off for this discussion
  • Hey,

    I have exactly the same thing, i de-buged day/noght to find out why the crash appears, after reading your post i think it is a oculus/unity problem.

    In the unity editor everything is fine, no console errors etc. scene switching is fine as well. When making a build, i have a crash when switching from scene.

    I tried lots of unity builds, it seems to be okey in 5.1.2f, but it this version there is a nast water reflection bug, so it is not working for me.

    I hope there is a solution, really frustrating when your console looks fine, but still crasing.
  • Are you using Application.LoadLevel or LoadLevelAsync? The Async version should avoid the stalls. How long is it that it takes for your level to load? If it's more than 30 seconds then I could see it causing this issue.
  • i use Application.LoadLevel, normally it takes 4 seconds to load the scene, but in the latest stable build my game crashes at rondom scene loading points.
  • Hey I had that same problem of crashing between levels for a while, only in a build and not in editor. Took forever to find out why.

    This might not be your issue but check your cameras and image effects on the cameras, make sure they are the same and in the same order on the camera you are switching from and to in the new scene.

    That was what was causing the crash for me, image effects, once I standardized them over all levels the crash went away, it's not ideal but might get your running again until it's is fixed. Hope it works for you.
  • I tried Async, does not solve the crash problem.

    I did some more debugging and i discovered that the scenes with a bake crash my game. I removed them, but the problem is still there. compiler is clean, so hard to find out what is wrong.

    The strange thing is that it's not always crashing, that makes it's even more complicated to solve.

    When i try the latest unity build 5.1.3p2 the crash is not there anymore, everything is fine, but this build has a huge bug in the water reflection, so this is not helping me out. looks like 5.1.2f is not stable at all.