Closed noemis84 closed 8 years ago
I just tried to recreate that problem and i didn't get that weird crash. Tested on Nexus 6, Nexus 7, Nextbook 8, Xperia Z. It might be only happening to Samsung S6 or generally Samsung devices, because I also had some problems before on Samsung S4 and those problems were not happening on my other devices.
I'll check with QA but I'm pretty sure they tested this scenario on an S6. Thanks for the stack trace! It will be helpful. Do you have NFC enabled or disabled on your phone?
I updated my Java JDK, reinstalled android sdk, tried building with MacOSX, but it was always possible to crash the app within 30 seconds...
NFC is disabled.
here is a short video showing the crash... (left side phone held in portrait, right side in landscape - the default orientation via unity is always landscape left): https://www.dropbox.com/s/yfaunfxnzj1q3zx/crashVideo01.mp4?dl=0
app builded from this (nearly empty) project: https://www.dropbox.com/s/89c7ux66wv1ntik/cbTest.zip?dl=0
Still hoping that it's my fault and I'm blind after having this error with the older sdk version.
It also crashes on a One Plus X and Moto X 2nd Gen.
Can you try a quick experiment? Remove the CardboardAudioListener from the Cardboard Main prefab. Does the crash still happen?
OK, we've narrowed down this crash (your Problem 1) to the audio system in Unity 5.2+, which has a bug in it that causes exactly this problem. See:
http://forum.unity3d.com/threads/crash-within-unity-5-1-2p3-for-2-5-of-our-android-users.377839/
for a similar report. Removing or disabling the CardboardAudioListener will prevent the crash.
Updated the SDK to disable the audio component in the prefabs. That fixes the crash in your scenes from using the new prefab.
Please note that the demo scene still has the component enabled so that it can be used to learn how to use spatialized audio, and what it sounds like in headphones.
BTW @noemis84 Thank you very much for reporting this so fast. It was very helpful in getting the fix out ASAP.
About Problem 2: I actually am not sure it is safe to quit the app during pause like that. Or at least, not with the sensor logic we are using in the SDK.
My first test are successful. Now I'll use and test the new sdk in our apps. Many thanks @smdol for your fast reaction and of course the solution... it seems, we can start in a stable VR year :+1: - i'll close this issue for now and hope never have to reopen again ;)
This post some problems already discussed in this thread: https://github.com/googlesamples/cardboard-unity/issues/116
Problem 1 - Crash after app pauses After the following simple steps the app crashes always:
on Samsung s6
no console output (using "adb logcat -s Unity")
Any ideas how to create an app with cardboard sdk + unity, which is able to go to system ui and back without crash?
Problem 2 To solve the first problem I would like to make a simple quit. Like "quit on suspend" does on IOS. The following code should do this on android:
but i just get this from the console:
After waiting 3 months for an update and having the same serious problems is disappointing. I hope either there is a solution or someone show me my mistakes...