Forum Discussion
Squareys
7 years agoExplorer
[GearVR] Crash on Input (except when Oculus GearVR Home is uninstalled)
Hello everybody!
I have an Unreal Engine 4.20.2 project that until recently worked fine until it started to crash on any input (especially noteworthy: ).
The crash happens on Samsung Galaxy S8 edge, Oculus GO reportidly works fine.
Most suspiciously, I can get the intended behaviour (buttons not causing the app to crash) by following these steps:
This makes me think it could be related to entitlement checks, but adb logcat output gives me no hints.
The crash happens in some Android Event Thread, here are some stack traces Android Studio gave me while debugging, no idea if they are useful to anyone:


Any idea or even guess would be super appreciated.
Looking forward to your comments!
Cheers, Jonathan.
Other things I tried (for reference):
I have an Unreal Engine 4.20.2 project that until recently worked fine until it started to crash on any input (especially noteworthy: ).
The crash happens on Samsung Galaxy S8 edge, Oculus GO reportidly works fine.
Most suspiciously, I can get the intended behaviour (buttons not causing the app to crash) by following these steps:
- Install App and launch (crashes)
- Start GearVR developer mode
- Uninstall GearVR version of Oculus Home from the App Launcher (not the App list in settings)
- Since the GearVR service is still running, I can still launch the App, which then works fine
This makes me think it could be related to entitlement checks, but adb logcat output gives me no hints.
The crash happens in some Android Event Thread, here are some stack traces Android Studio gave me while debugging, no idea if they are useful to anyone:


Any idea or even guess would be super appreciated.
Looking forward to your comments!
Cheers, Jonathan.
Other things I tried (for reference):
- Target/Minimum SDK is currently 24, but changing to 19 does not seem to affect this. I admit I am not experienced with the Android SDK or NDK, so I may still be building with 24, not totally sure
- Using Unreal Engine 4.20.1 does not fix the issue
- I cannot reproduce on Rift (just to make sure the input handling code on the project side is more or less sane)
- The app doesn't crash immediately on button press, but with a short, variable length delay.
- Starting the App without the developer mode trick does not work, it prompts you to install all the Oculus Apps
- Rolling back to the last "known to work build" on the Oculus store causes the same problem
- volume controls also lead to the crash which are definitely not handled by the project
- I cannot reproduce it with the GearVR Motion Controller example from Unreal Engine (it works totally fine), but that is neither built for distribution nor installed via Oculus Home.
25 Replies
Replies have been turned off for this discussion
- DolloDProtege@imperativity, sorry I missed your message from a couple weeks ago asking for feedback. I need to check to make sure this thing sends me emails.
The 10-2 app update didn't fix this issue. Please light a fire under whoever works on this.
Your team should be able to do the following to reproduce this error and troubleshoot it with their own code:
Set up the GearVR quick start project
https://docs.unrealengine.com/en-us/Platforms/GearVR/QuickStart
Important: Give the project the same bundle ID as a published app that is in the library so that it overwrites that app.
The error doesn't seem to happen otherwise.
Run the game. For me it crashes with input both from the controller and the headset.
I did this with the Oculus UE4.18.3 build from source from github. I imagine that other UE4 builds would do the same thing based on this thread but haven't had time to test that theory.
As for the info you requested previously, the output to logcat before and after the section I provided contains plenty of log output from UE4 but none of it is related to the error, which doesn't appear to be triggered by a UE4 command. The log output I previously posted abruptly interrupts whatever else is going on and nothing before or after that gives me any clue as to what piece of UE4 code was running immediately before the crash.Since libUE4.so appears on step up the stack trace, it is somewhere but I'm not sure if I have the tools to make breakpoints or even understand what is going on at that machine code level. I am guessing that it is part of the Android message loop though that is in Engine/Runtime/Launch/Private/Android/AndroidEventManager.cpp.
Thank you - NelnoTheAmoebaExplorerWe have verified again that we can reproduce the crash with a UE4 app using 1.17 release driver and that installing 1.18 release driver without any other changes makes the crash go away. We can then set debug.oculus.enablebreakpad 1 and the crash occurs with 1.18 driver.
The fix we made to 1.18 involves changing the default behavior when the "debug.oculus.enablebreakpad" prop doesn't exist at all.
Prior to 1.18, if this system property did not exist we would default to treating it as if it were true, which would enable our crash handler.
In 1.18, if this system property doesn't exist we default to treating it as if it were false, which fully disables our crash handler. This is a relatively simple change and there is no other way for the crash handler to be initialized.
However, this means that once you "adb setprop debug.oculus.enablebreakpad 0", you've created that property and you cannot test the 1.18 default behavior until the phone reboots. If you "adb setprop debug.oculusenablebreakpad <any non-zero value>", crash reporting will be enabled again. Make sure you reboot the device before trying again to confirm if the 1.18 fix is working.
If you're seeing this crash, please try to verify using the following steps:
1) make sure that the debug.oculus.enablebreakpad does not exist at all on your device. Use the following command to do so:
adb shell "getprop | grep debug.oculus.enablebreakpad"
You should see no output. If you see:
[debug.oculus.enablebreakpad]: [1]
Or some other value instead if [1], then reboot the device and check again.
2) Verify that your device really has 1.18 installed. Updates are a tricky business -- it's very difficult for us to ensure every device gets updated in a timely manner without issuing a roadblock. It's entirely possible that your device has updated some components and not others.
To verify:
adb logcat -c
Run your application.
adb logcat -v threadtime -d > myapp.log
Load that myapp.log and search for "VRAPI VERSION". It should look similar to this:
10-09 16:46:33.057 18946 18962 I VrApi : VRAPI VERSION = 1.1.18.0-0-0 <date> <time> RELEASE
You can additionally go to Settings -> Apps -> Oculus System Driver -> Storage and see the version number of the installed driver there, but verifying it in the log when your app loads leaves absolutely no question.
If you still see the crash, then something even more unexpected is happening which we're not reproducing in our tests, and getting a full log of the crash could be immensely useful. - ApprovedAnonymousThank you for this detailed information @NelnoTheAmoebaSince the 1.18.0 update of Oculus System Driver I have not been able to reproduce the issue.I have a question though as my app is still calling this command on begin play:adb shell setprop debug.oculus.enablebreakpad 0Should this now be removed or is it ok to keep it there? (thinking ahead to future Oculus updates potentially conflicting with it?)
- NelnoTheAmoebaExplorer@aussiburgerVR
You should be able to remove that. I'm actually surprised that works at all. How are you calling an adb shell command from your app?
Once you remove it I would definitely verify that 1.18 is still working for your app using the steps above.
I am starting to think there may be two issues here -- one related to input and one related to bundle ID, so if you can respond back that 1.18 is working for you even with the adb command removed, that will give us some confidence that the 1.18 patch did indeed fix the issue for some developers. - ApprovedAnonymous
NelnoTheAmoeba said:
@aussiburgerVR
You should be able to remove that. I'm actually surprised that works at all. How are you calling an adb shell command from your app?
Once you remove it I would definitely verify that 1.18 is still working for your app using the steps above.
I am starting to think there may be two issues here -- one related to input and one related to bundle ID, so if you can respond back that 1.18 is working for you even with the adb command removed, that will give us some confidence that the 1.18 patch did indeed fix the issue for some developers.I removed the command and it is indeed still working! :) It appears to me that the 1.18 update fixed the issue. (Where the issue was: if the bundle id was matching what is set in the Oculus store and I pressed any input the app would crash)FYI: I was calling it by a execute command node as suggested by another Oculus Staff member in this comment: https://forums.oculusvr.com/developer/discussion/comment/639913/#Comment_639913 )Perhaps@tomotor doesn't have the actual 1.18 update yet?
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
- 6 months ago
- 8 months ago