{"action":"created","issue":{"url":"https://api.github.com/repos/googlesamples/cardboard-unity/issues/137","labels_url":"https://api.github.com/repos/googlesamples/cardboard-unity/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/googlesamples/cardboard-unity/issues/137/comments","events_url":"https://api.github.com/repos/googlesamples/cardboard-unity/issues/137/events","html_url":"https://github.com/googlesamples/cardboard-unity/issues/137","id":126389418,"number":137,"title":"Unity 5.3.1f / SDK 0.6 - Crash after suspend / Timeout on quit","user":{"login":"noemis84","id":13518143,"avatar_url":"https://avatars.githubusercontent.com/u/13518143?v=3","gravatar_id":"","url":"https://api.github.com/users/noemis84","html_url":"https://github.com/noemis84","followers_url":"https://api.github.com/users/noemis84/followers","following_url":"https://api.github.com/users/noemis84/following{/other_user}","gists_url":"https://api.github.com/users/noemis84/gists{/gist_id}","starred_url":"https://api.github.com/users/noemis84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noemis84/subscriptions","organizations_url":"https://api.github.com/users/noemis84/orgs","repos_url":"https://api.github.com/users/noemis84/repos","events_url":"https://api.github.com/users/noemis84/events{/privacy}","received_events_url":"https://api.github.com/users/noemis84/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-13T10:34:42Z","updated_at":"2016-01-13T20:58:00Z","closed_at":null,"body":"This post some problems already discussed in this thread: https://github.com/googlesamples/cardboard-unity/issues/116\r\n\r\nProblem 1 - Crash after app pauses\r\nAfter the following simple steps the app crashes always:\r\n- new unity project / android platform\r\n- import sdk\r\n- empty scene (just a cube to see orientation)\r\n- prefab cardboard main\r\n- landscape left only\r\n- build\r\n\r\non Samsung s6\r\n- start app\r\n- go to system ui\r\n- resume app\r\n-> CRASH\r\n\r\nno console output (using \"adb logcat -s Unity\")\r\n\r\nAny ideas how to create an app with cardboard sdk + unity, which is able to go to system ui and back without crash?\r\n\r\nProblem 2 \r\nTo 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:\r\n\r\n```\r\nvoid OnApplicationPause(bool pauseStatus) {\r\n\t\tif (pauseStatus) {\r\n\t\t\tDebug.Log(\"quit app because resume caused errors\");\r\n\t\t\tApplication.Quit();\t\t\t\r\n\t\t}\r\n\t}\r\n```\r\n\r\nbut i just get this from the console:\r\n```\r\n(Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)\r\n\r\nCardboard audio system is shutdown.\r\n\r\n(Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)\r\n\r\nException calling method onPause: UnityEngine.AndroidJavaException: java.lang.IllegalArgumentException: Receiver not registered: com.google.vr.cardboard.NFCUtils$1@1f9de38\r\njava.lang.IllegalArgumentException: Receiver not registered: com.google.vr.cardboard.NFCUtils$1@1f9de38\r\n     at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:871)\r\n     at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:2091)\r\n     at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:529)\r\n     at com.google.vr.cardboard.NFCUtils.onPause(NFCUtils.java:71)\r\n     at com.google.vr.platform.unity.UnityVrActivityListener.onPause(UnityVrActivityListener.java:133)\r\n     at com.unity3d.player.UnityPlayer.nativeDone(Native Method)\r\n     at com.unity3d.player.UnityPlayer.f(Unknown Source)\r\n     at com.unity3d.player.UnityPlayer.h(Unknown Source)\r\n     at com.unity3d.player.UnityPlayer$18.run(Unknown Source)\r\n     at com.unity3d.player.UnityPlayer.executeGLThreadJobs(Unknown Source)\r\n     at com.unity3d.player.UnityPlayer$b.run(Unknown Source)\r\n  at UnityEn\r\nTimeout while trying to pause the Unity Engine.\r\n```\r\n\r\nAfter 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..."},"comment":{"url":"https://api.github.com/repos/googlesamples/cardboard-unity/issues/comments/171430273","html_url":"https://github.com/googlesamples/cardboard-unity/issues/137#issuecomment-171430273","issue_url":"https://api.github.com/repos/googlesamples/cardboard-unity/issues/137","id":171430273,"user":{"login":"smdol","id":10277940,"avatar_url":"https://avatars.githubusercontent.com/u/10277940?v=3","gravatar_id":"","url":"https://api.github.com/users/smdol","html_url":"https://github.com/smdol","followers_url":"https://api.github.com/users/smdol/followers","following_url":"https://api.github.com/users/smdol/following{/other_user}","gists_url":"https://api.github.com/users/smdol/gists{/gist_id}","starred_url":"https://api.github.com/users/smdol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smdol/subscriptions","organizations_url":"https://api.github.com/users/smdol/orgs","repos_url":"https://api.github.com/users/smdol/repos","events_url":"https://api.github.com/users/smdol/events{/privacy}","received_events_url":"https://api.github.com/users/smdol/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T20:58:00Z","updated_at":"2016-01-13T20:58:00Z","body":"Can you try a quick experiment?  Remove the CardboardAudioListener from the Cardboard Main prefab.  Does the crash still happen?"}}