cancel
Showing results for 
Search instead for 
Did you mean: 

App unexpectedly closes on startup.

mollymaria
Honored Guest
Hey,

I am new to VR development and have managed to create an environment for exploration and have deployed it to my phone (s7) but on start up the unity logo appears and then immediately after I get an '[app] has closed unexpectedly]  notification every single time I launch!

I am wondering how to find out what is causing this so I can solve the issue, as there is no error code or anything when the notification appears! I have read about using a logcat but I don't know how to do this when the phone is in the gearVR headset as the error occurs!

Any help would be really appreciated and please keep the answers simple and I am not all in tune with the terminology yet!

Many thanks in advance!
2 REPLIES 2

drash
Heroic Explorer
You'll definitely need to get set up with logcat to pin something like this down.  You'll need ADB (Android Debug Bridge), and then you'll need to wirelessly connect adb to your device using a batch file containing something like:
adb tcpip 5555
adb connect 192.168.1.159

Then you can confirm you're connected using
adb devices

And then when you're ready to start logging, a batch file with the following (for example):

del android_log.txt
adb logcat -c
adb logcat -s Unity DEBUG VrApi:V > android_log.txt
(The above three lines are all supposed to be "code" formatted, not sure why that's not working)

The above will blow away your old logcat output, clear the logcat that's still on your device, and then start logging anew, capturing Unity messages (all the stuff you would normally see in your Console in Unity editor), and VrApi stuff (which shows you once-per-second performance metrics from the Oculus runtime: FPS, timewarp performance, GPU/CPU levels, device temp etc).  You'll also see crash messages, and they are unfortunately really cryptic and might say something like signal 11 or something.  Gotta do some searching around the web for clues in that case.

Good luck!
  • Titans of Space PLUS for Quest is now available on DrashVR.com

peterept
Protege
Hi mollymaria,

For GearVR dd you generate your OSIG file correctly, and make sure it is in the correct folder in Unity (assuming you are using Unity)?

https://developer3.oculus.com/documentation/mobilesdk/latest/concepts/mobile-submission-sig-file/

Peter
Check out my Unity VR development blog: http://talesfromtherift.com @peterept