googlevr / gvr-unity-sdk

Google VR SDK for Unity
http://developers.google.com/vr/unity/
Other
2.71k stars 1.09k forks source link

using the magnet switch & load level results in crash #151

Closed ghost closed 7 years ago

ghost commented 8 years ago

Hello,

first of all thank you for this wonderful SDK. We love to get started with our very first VR App. But we run into strange problems. We use Cardboard & Playmaker to get a fast prototype of our App. Unity Version: 5.3.1f1, Cardboard SDK: 0.6. There is a Menu first, nothing special, Event System with Touch input, buttons and then it changes the level to our first VR Cardboard Level. Until here nothing special happens. Except on starting the app, we get a

01-21 17:35:55.228 9582-9615/com.sprengundsonntag.VRTest E/Unity: Unable to find libaudiopluginvrunity

So we are in our first level, do some things, trigger some actions and then we want to change the level. We do this with a Playmaker Action, which is based on

SceneManager.LoadScene();

and works quite fine with our existing projects. When it comes to loading the new Scene it crashes with the following logcat output:

01-21 17:36:35.368 9582-9615/com.sprengundsonntag.VRTest I/Unity: LoadLevel: fail
                                                                  UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
                                                                  UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
                                                                  UnityEngine.Logger:Log(LogType, Object)
                                                                  UnityEngine.Debug:Log(Object)
                                                                  HutongGames.PlayMaker.Actions.LoadLevel:OnEnter() (at /Users/lukashager/Downloads/New Unity Project 4/Assets/PlayMaker/Actions/LoadLevel.cs:98)
                                                                  HutongGames.PlayMaker.FsmState:ActivateActions(Int32) (at c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\FsmState.cs:200)
                                                                  HutongGames.PlayMaker.FsmState:OnEnter() (at c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\FsmState.cs:168)
                                                                  HutongGames.PlayMaker.Fsm:EnterState(FsmState) (at c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:2155)
                                                                  HutongGames.PlayMaker.Fsm:SwitchState(FsmState) (at c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:2113)
01-21 17:36:37.458 9582-9840/com.sprengundsonntag.VRTest D/Unity: Unloading 9 Unused Serialized files (Serialized files now loaded: 0)
01-21 17:36:37.508 9582-10300/com.sprengundsonntag.VRTest W/art: Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[28,tid=10300,Native,Thread*=0xb8f6ef90,peer=0x12e1c080,"Thread-10777"]
01-21 17:36:37.548 9582-9615/com.sprengundsonntag.VRTest D/Unity: UnloadTime: 76.081001 ms
01-21 17:36:37.628 9582-9615/com.sprengundsonntag.VRTest I/Unity: Creating Cardboard object
                                                                  UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
                                                                  UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
                                                                  UnityEngine.Logger:Log(LogType, Object)
                                                                  UnityEngine.Debug:Log(Object)
                                                                  Cardboard:Create() (at /Users/lukashager/Downloads/New Unity Project 4/Assets/Cardboard/Scripts/Cardboard.cs:61)
                                                                  CardboardHead:Awake() (at /Users/lukashager/Downloads/New Unity Project 4/Assets/Cardboard/Scripts/CardboardHead.cs:84)

                                                                  (Filename: /Users/lukashager/Downloads/New Unity Project 4/Assets/Cardboard/Scripts/Cardboard.cs Line: 61)
01-21 17:36:37.668 9582-9615/com.sprengundsonntag.VRTest A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x899256d0 in tid 9615 (UnityMain)
01-21 17:36:37.668 9582-9615/com.sprengundsonntag.VRTest W/libc: Security Level: (1), Debug inforamtion is controlled by the DUMPABLE flag.
01-21 17:36:40.088 9582-9811/com.sprengundsonntag.VRTest W/AudioTrack: releaseBuffer() track 0xb869b290 disabled due to previous underrun, restarting

And now for the strange part: this only happens when using the magnet switch in the previous inputs. If you use the finger as tap inputs, it works fine. We already tried to comment out the onPause() method in BaseCardboardDevice.cs and disabling the Cardboard Component on Level Load. We don't have a Cardboard Audio Listener Component on our Cameras as well since this was a previously mentioned problem. Our Event System is Touch Input Module on Scenes without Cardboard and Gaze Input Module on Scenes with Cardboard. This happens on Android only. in the Unity Editor everything works well. Tested on an HTC M8 One.

We hope you can help us! Thank you very much!

Grischa

update:

01-21 17:36:35.368 9582-9615/com.sprengundsonntag.VRTest I/Unity: LoadLevel: fail

The Scene is called fail, forgot to mention that.

nathanmartz commented 8 years ago

The inability to find the libaudioplugin is most likely the cause of the failure. Can you try importing the SDK you have into a fresh project, buidling for android, and letting us know if it crashes? If it does not crash, please delete the Cardboard and Plugins folders (or the parts of Plugins from Cardboard) and re-import the SDK package.

ghost commented 8 years ago

I created a fresh and clean project with playmaker and cardboard in it. Two scenes with a cube and a sphere to trigger LoadScene() and even this produces the

Unable to find libaudiopluginvrunity

and a fatal SIGSEGV "fatal signal 11, code 1" error. Maybe a memory leak? Full Logs:

01-21 22:58:36.757 29389-29389/? I/art: Late-enabling -Xcheck:jni
01-21 22:58:36.757 29389-29389/? I/art: VMHOOK: rlim_cur : 0 pid:29389
01-21 22:58:36.917 29389-29389/com.sprengundsonntag.testswitchscenes I/Unity: splash_mode = 0 (integer)
01-21 22:58:36.917 29389-29389/com.sprengundsonntag.testswitchscenes I/Unity: useObb = False (bool)
01-21 22:58:36.947 29389-29389/com.sprengundsonntag.testswitchscenes D/Unity: surfaces: attach glview
01-21 22:58:36.947 29389-29389/com.sprengundsonntag.testswitchscenes I/Unity: Choreographer available: Enabling VSYNC timing
01-21 22:58:36.967 29389-29389/com.sprengundsonntag.testswitchscenes I/Unity: onResume
01-21 22:58:36.997 29389-29389/com.sprengundsonntag.testswitchscenes D/Unity: [EGL] Attaching window :0xb8ef87b8
01-21 22:58:36.997 29389-29389/com.sprengundsonntag.testswitchscenes D/Unity: [EGL] Attaching window :0xb8ef87b8
01-21 22:58:37.027 29389-29389/com.sprengundsonntag.testswitchscenes I/Unity: windowFocusChanged: true
01-21 22:58:37.047 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: SystemInfo CPU = ARMv7 VFPv3 NEON, Cores = 4, Memory = 1823mb
01-21 22:58:37.047 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: SystemInfo ARM big.LITTLE configuration: 4 big (mask: 15), 0 little (mask: 0)
01-21 22:58:37.627 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [SHA1] 2e8a0f4585679a8d1b270a4107c32ce99768b647   23102224 bytes ~ lib/armeabi-v7a/libunity.so
01-21 22:58:37.637 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [SHA1] 883aa0e94c58d8004e9f2a710b204f0111263143      45104 bytes ~ lib/armeabi-v7a/libmain.so
01-21 22:58:37.717 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [SHA1] 0f1d3f9c24a6219cf7348bf8f8709ee70d89e7ff    3758496 bytes ~ lib/armeabi-v7a/libmono.so
01-21 22:58:38.317 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [SHA1] c11b8f150a8caa1e204904663a6df528b33a63a1   26387872 bytes ~ lib/x86/libunity.so
01-21 22:58:38.327 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [SHA1] fc5a9ae6b95f8ef5197c86de54ca69b135f681df      26776 bytes ~ lib/x86/libmain.so
01-21 22:58:38.407 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [SHA1] 151e9995f77f3d5778d93697de3c8bab1204419d    3636444 bytes ~ lib/x86/libmono.so
01-21 22:58:38.407 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Mono path[0] = '/mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed'
01-21 22:58:38.407 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Mono config path = 'assets/bin/Data/Managed'
01-21 22:58:38.407 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: PlayerConnection initialized from /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data (debug = 0)
01-21 22:58:38.417 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: PlayerConnection initialized network socket : 0.0.0.0 55417
01-21 22:58:38.417 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: PlayerConnection initialized unix socket : Unity-com.sprengundsonntag.testswitchscenes
01-21 22:58:38.417 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Multi-casting "[IP] 10.158.78.26 [Port] 55417 [Flags] 3 [Guid] 3275919655 [EditorId] 3914662105 [Version] 1048832 [Id] AndroidPlayer(HTC_HTC_One_M8@10.158.78.26) [Debug] 0" to [225.0.0.222:54997]...
01-21 22:58:38.417 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Waiting for connection from host on [10.158.78.26:55417]...
01-21 22:58:43.457 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Timed out. Continuing without host connection.
01-21 22:58:43.657 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: InitializeScriptEngine OK (afe05ee0)
01-21 22:58:43.657 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: PlayerConnection already initialized - listening to [10.158.78.26:55417]
01-21 22:58:43.697 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Unable to lookup library path for 'libaudiopluginvrunity', native render plugin support disabled.
01-21 22:58:43.707 29389-29420/com.sprengundsonntag.testswitchscenes E/Unity: Unable to find libaudiopluginvrunity
01-21 22:58:43.707 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: PlayerInitEngineNoGraphics OK
01-21 22:58:43.707 29389-29420/com.sprengundsonntag.testswitchscenes I/Adreno-EGL: <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BF.1.1_RB1.05.00.00.002.030_msm8974_refs/tags/AU_LINUX_ANDROID_LA.BF.1.1_RB1.05.00.00.002.030__release_AU ()
                                                                                   OpenGL ES Shader Compiler Version: E031.25.03.00
                                                                                   Build Date: 12/11/14 Thu
                                                                                   Local Branch: 
                                                                                   Remote Branch: refs/tags/AU_LINUX_ANDROID_LA.BF.1.1_RB1.05.00.00.002.030
                                                                                   Local Patches: NONE
                                                                                   Reconstruct Branch: NOTHING
01-21 22:58:43.727 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [EGL] Request: ES 3.1+AEP RGB0 000 0/0
01-21 22:58:43.727 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [EGL] Checking ES 3.1 support...
01-21 22:58:43.737 29389-29420/com.sprengundsonntag.testswitchscenes W/Adreno-EGL: <qeglDrvAPI_eglCreateContext:2438>: EGL_BAD_MATCH
01-21 22:58:43.737 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [EGL] ES3.1 not supported
01-21 22:58:43.737 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [EGL] Request: ES 3.1 RGB0 000 0/0
01-21 22:58:43.737 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [EGL] Request: ES 3.0 RGB0 000 0/0
01-21 22:58:43.737 29389-29420/com.sprengundsonntag.testswitchscenes W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
01-21 22:58:43.737 29389-29420/com.sprengundsonntag.testswitchscenes W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
01-21 22:58:43.737 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [EGL] Found: ID[1] ES 3.0 RGB16 565 0/0
01-21 22:58:43.757 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [EGL] Request: ES 3.1+AEP RGB0 000 0/0
01-21 22:58:43.757 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [EGL] Request: ES 3.1 RGB0 000 0/0
01-21 22:58:43.757 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [EGL] Request: ES 3.0 RGB0 000 0/0
01-21 22:58:43.757 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [EGL] Found: ID[1] ES 3.0 RGB16 565 0/0
01-21 22:58:43.767 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [EGL] Request: ES 3.0 RGBA32 8888 0/0
01-21 22:58:43.767 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: [EGL] Found: ID[5] ES 3.0 RGBA32 8888 0/0 AFBT
01-21 22:58:43.777 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: ANativeWindow: (1920/1080) RequestedResolution: (0/0) EGLSurface: (1920/1080)
01-21 22:58:43.847 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Renderer: Adreno (TM) 330
01-21 22:58:43.847 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Vendor:   Qualcomm
01-21 22:58:43.847 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Version:  OpenGL ES 3.0 V@84.0 AU@05.00.00.002.030 (CL@)
01-21 22:58:43.847 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: GLES:     3
01-21 22:58:43.847 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity:  GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2_10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_sync GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM_alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_global_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCOM_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT
01-21 22:58:43.847 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: _texture_sRGB_decode GL_EXT_texture_filter_anisotropic GL_EXT_multisampled_render_to_texture GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_disjoint_timer_query
01-21 22:58:44.017 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: OPENGL LOG: Creating OpenGL ES 3.0 graphics device
01-21 22:58:44.017 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: InitializeGfxDevice OK
01-21 22:58:44.017 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Initialize engine version: 5.3.1f1 (cc9cbbcc37b4)
01-21 22:58:44.067 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: AudioManager: Selecting OpenSL output...
01-21 22:58:44.077 29389-29420/com.sprengundsonntag.testswitchscenes W/libc: pthread_create sched_setscheduler call failed: Operation not permitted
01-21 22:58:44.087 29389-29420/com.sprengundsonntag.testswitchscenes W/libc: pthread_create sched_setscheduler call failed: Operation not permitted
01-21 22:58:44.087 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Begin MonoManager ReloadAssembly
01-21 22:58:44.107 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Platform assembly: /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed/UnityEngine.dll (this message is harmless)
01-21 22:58:44.107 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Loading /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed/UnityEngine.dll into Unity Child Domain
01-21 22:58:44.167 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Platform assembly: /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed/Assembly-CSharp.dll (this message is harmless)
01-21 22:58:44.177 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Loading /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed/Assembly-CSharp.dll into Unity Child Domain
01-21 22:58:44.177 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Platform assembly: /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed/UnityEngine.UI.dll (this message is harmless)
01-21 22:58:44.177 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Loading /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed/UnityEngine.UI.dll into Unity Child Domain
01-21 22:58:44.187 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Platform assembly: /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed/UnityEngine.Networking.dll (this message is harmless)
01-21 22:58:44.187 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Loading /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed/UnityEngine.Networking.dll into Unity Child Domain
01-21 22:58:44.187 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Platform assembly: /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed/ConditionalExpression.dll (this message is harmless)
01-21 22:58:44.187 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Loading /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed/ConditionalExpression.dll into Unity Child Domain
01-21 22:58:44.187 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Platform assembly: /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed/PlayMaker.dll (this message is harmless)
01-21 22:58:44.197 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Loading /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed/PlayMaker.dll into Unity Child Domain
01-21 22:58:44.217 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: - Completed reload, in  0.131 seconds
01-21 22:58:44.247 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Platform assembly: /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed/System.Core.dll (this message is harmless)
01-21 22:58:44.267 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Platform assembly: /mnt/asec/com.sprengundsonntag.testswitchscenes-1/base.apk/assets/bin/Data/Managed/System.dll (this message is harmless)
01-21 22:58:44.467 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: PlayerInitEngineGraphics OK
01-21 22:58:44.477 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Found 23 native sensors
01-21 22:58:44.477 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Sensor :        Accelerometer ( 1) ; 0.010000 / 0.01s ; Accelerometer Sensor / HTC Group Ltd. 
01-21 22:58:44.477 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Sensor :        Accelerometer ( 1) ; 0.010000 / 0.01s ; Accelerometer Sensor / HTC Group Ltd. 
01-21 22:58:44.487 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Requested framebuffer: resolution[1920x1080], rgba[8/8/8/8], depth+stencil[on], samples[1]
01-21 22:58:44.487 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Created framebuffer: resolution[1920x1080], rgba[8/8/8/8], depth+stencil[24/8], samples[0] 
01-21 22:58:45.037 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: UnloadTime: 1.079000 ms
01-21 22:58:45.067 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Unloading 7 Unused Serialized files (Serialized files now loaded: 0)
01-21 22:58:45.207 29389-29420/com.sprengundsonntag.testswitchscenes W/art: Attempt to remove local handle scope entry from IRT, ignoring
01-21 22:58:45.207 29389-29420/com.sprengundsonntag.testswitchscenes W/art: Attempt to remove local handle scope entry from IRT, ignoring
01-21 22:58:45.237 29389-29420/com.sprengundsonntag.testswitchscenes W/Adreno-ES20: <get_simple_queries:1544>: GL_INVALID_ENUM
01-21 22:58:45.267 29389-29641/com.sprengundsonntag.testswitchscenes D/libc: [NET] android_getaddrinfofornet+,hn 19(0x706c61792e676f),sn(),hints(known),family 0,flags 4
01-21 22:58:45.267 29389-29641/com.sprengundsonntag.testswitchscenes D/libc: [NET] android_getaddrinfofornet-, err=8
01-21 22:58:45.267 29389-29641/com.sprengundsonntag.testswitchscenes D/libc: [NET] android_getaddrinfofornet+,hn 19(0x706c61792e676f),sn(),hints(known),family 0,flags 1024
01-21 22:58:45.267 29389-29641/com.sprengundsonntag.testswitchscenes D/libc: [NET] android_getaddrinfofornet-, pass to proxy
01-21 22:58:45.267 29389-29641/com.sprengundsonntag.testswitchscenes D/libc: [NET] android_getaddrinfo_proxy+
01-21 22:58:45.267 29389-29641/com.sprengundsonntag.testswitchscenes D/libc: [NET] android_getaddrinfo_proxy get netid:0
01-21 22:58:45.377 29389-29641/com.sprengundsonntag.testswitchscenes D/libc: [NET] android_getaddrinfo_proxy-, success
01-21 22:58:45.567 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Sensor :        Accelerometer ( 1) ; 0.010000 / 0.01s ; Accelerometer Sensor / HTC Group Ltd. 
01-21 22:58:49.487 29389-29627/com.sprengundsonntag.testswitchscenes D/Unity: Unloading 4 Unused Serialized files (Serialized files now loaded: 0)
01-21 22:58:49.527 29389-29653/com.sprengundsonntag.testswitchscenes W/art: Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[28,tid=29653,Native,Thread*=0xb9187190,peer=0x12e21080,"Thread-2987"]
01-21 22:58:49.557 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: UnloadTime: 57.395000 ms
01-21 22:58:49.607 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: System memory in use before: 4.6 MB.
01-21 22:58:49.617 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: System memory in use after: 4.6 MB.
01-21 22:58:49.617 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: Total: 3.195000 ms (FindLiveObjects: 0.201000 ms CreateObjectMapping: 0.215000 ms MarkObjects: 2.493000 ms  DeleteObjects: 0.279000 ms)
01-21 22:58:54.697 29389-29627/com.sprengundsonntag.testswitchscenes D/Unity: Unloading 3 Unused Serialized files (Serialized files now loaded: 0)
01-21 22:58:54.797 29389-29420/com.sprengundsonntag.testswitchscenes I/Unity: LoadLevel: first
                                                                              UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
                                                                              UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
                                                                              UnityEngine.Logger:Log(LogType, Object)
                                                                              UnityEngine.Debug:Log(Object)
                                                                              HutongGames.PlayMaker.Actions.LoadLevel:OnEnter() (at /Users/lukashager/Downloads/VR switch scenes Test Project/Assets/PlayMaker/Actions/LoadLevel.cs:40)
                                                                              HutongGames.PlayMaker.FsmState:ActivateActions(Int32) (at c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\FsmState.cs:200)
                                                                              HutongGames.PlayMaker.FsmState:OnEnter() (at c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\FsmState.cs:168)
                                                                              HutongGames.PlayMaker.Fsm:EnterState(FsmState) (at c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:2155)
                                                                              HutongGames.PlayMaker.Fsm:SwitchState(FsmState) (at c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fs
01-21 22:58:54.847 29389-29736/com.sprengundsonntag.testswitchscenes W/art: Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[28,tid=29736,Native,Thread*=0xb9a7a678,peer=0x12e217a0,"Thread-2989"]
01-21 22:58:54.857 29389-29420/com.sprengundsonntag.testswitchscenes D/Unity: UnloadTime: 36.428001 ms
01-21 22:58:54.867 29389-29420/com.sprengundsonntag.testswitchscenes A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x998cfff0 in tid 29420 (UnityMain)
01-21 22:58:54.867 29389-29420/com.sprengundsonntag.testswitchscenes W/libc: Security Level: (1), Debug inforamtion is controlled by the DUMPABLE flag.
01-21 22:58:56.767 29389-29609/com.sprengundsonntag.testswitchscenes W/AudioTrack: releaseBuffer() track 0xb9196828 disabled due to previous underrun, restarting

The Problem occurs also on level restart. So, what is the libaudiopluginvrunity? I couldn't find anything about it. update: Okay, i see, it is a native plugin. Actually the libs are in the project. The import settings are correct. I Don't know why it doesn't manage to load them.

nathanmartz commented 8 years ago

To be clear, you are importing the .unitypackage for Cardboard not cloning anything from git, right?

ghost commented 8 years ago

yes.

nathanmartz commented 8 years ago

Can you confirm that your project has Plugins/Android/libs/armabi-v7a/libaudiopluginvrunity ? Thanks. We've never seen this error before, so trying to figure out what could be going wrong.

ghost commented 8 years ago

So actually the path is

Plugins/Android/libs/armeabi-v7a/libaudiopluginvrunity.so

I didn't change anything about that.

nathanmartz commented 8 years ago

You're right about the path. Just verifying that the file is actually there. Are you building on Windows or OSX?

One more test, can you go into the AudioSettings and set the Spatializer to the Cardboard Spatializer and build again? I want to see if that pulls the file in.

ghost commented 8 years ago
01-22 13:03:55.509 1921-1994/com.sprengundsonntag.testswitchscenes W/linker: /mnt/asec/com.sprengundsonntag.testswitchscenes-2/lib/arm/libaudiopluginvrunity.so: is missing DT_SONAME will use basename as a replacement: "libaudiopluginvrunity.so"
01-22 13:03:55.519 1921-1994/com.sprengundsonntag.testswitchscenes D/Unity: Unable to lookup library path for 'libaudiopluginvrunity', native render plugin support disabled.
01-22 13:03:55.520 1921-1994/com.sprengundsonntag.testswitchscenes E/Unity: Unable to find libaudiopluginvrunity
01-22 13:03:55.521 1921-1994/com.sprengundsonntag.testswitchscenes D/Unity: PlayerInitEngineNoGraphics OK

so it is still not able to find it.

update: I am building on OS X.

kirkkohler commented 8 years ago

I'm seeing similar issues building on Windows 10 with Unity 5.3.1f1 and Android 4.3 (HTC m1) cardboard SDK 0.6. Setting ' Spatializer to the Cardboard Spatializer' as mentioned by @nathanmartz & https://developers.google.com/cardboard/unity/guide didn't seem to fix issue.

01-24 21:12:25.480  27180-27197/com.unity3d.vrstandardassets E/Unity﹕ Unable to find libaudiopluginvrunity
01-24 21:12:25.780      251-598/? E/HtcAudPMB﹕ getOutput() IOProfile is null.
01-24 21:12:25.820      251-592/? E/AudioStreamOutALSA﹕ PCM_Write set_amp_mode,1
01-24 21:12:26.321  27180-27212/? E/VrApiLoader﹕ Oculus updates needed.
    Instructions to receive new updates can be found at:
    https://support.oculus.com under 'Samsung Gear VR - Oculus Software Update'
01-24 21:12:26.321  27180-27212/? E/E:\tw\33a21edae6c0e9ad\Software\OculusSDK\Integrations\Unity\Releases\0﹕ VrApi initialization error.
01-24 21:12:26.321  27180-27212/? E/EntryPoints﹕ vrapi_GetVersionString was called before vrapi_Initialize()!
01-24 21:12:26.321  27180-27212/? A/libc﹕ Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 27212 (UnityGfxDeviceW)
01-24 21:12:27.022      603-675/? E/EmbeddedLogger﹕ App crashed! Process: com.unity3d.vrstandardassets
01-24 21:12:27.022      603-675/? E/EmbeddedLogger﹕ App crashed! Package: com.unity3d.vrstandardassets v1 (1.0)
01-24 21:12:27.032      603-675/? E/EmbeddedLogger﹕ Application Label: VRSamples
01-24 21:12:27.062      603-800/? E/InputDispatcher﹕ channel '4236afd0 com.google.unity.GoogleUnityActivity (s)' ~ Channel is unrecoverably broken and will be disposed!
01-24 21:13:12.350      238-362/? E/qdexternal﹕ writeHPDOption: state file '/sys/devices/virtual/graphics/fb1/hpd' not found : ret-1 err str: Permission denied
01-24 21:13:12.770   4552-27259/? E/WeatherTimeKeeper﹕ Fail to schedule next weather update because of permission issue:Permission Denial: getIntentSender() from pid=4552, uid=10216, (need uid=10152) is not allowed to send as package com.htc.idlescreen.base
01-24 21:13:17.475  27264-27264/? E/DMLog﹕ HTC_DEBUG = false
01-24 21:13:22.711  27281-27281/? E/dalvikvm﹕ dlopen("/data/data/com.synchronoss.dcs.att.r2g/lib/libdcs.so") failed: dlopen failed: library "/data/data/com.synchronoss.dcs.att.r2g/lib/libdcs.so" not found
01-24 21:13:22.751  27281-27281/? E/DCS_Lib﹕ JNI_OnLoad V. 08012013_0001 Successful
01-24 21:13:47.528  27298-27298/? E/SELinux﹕ seapp_context_lookup:  No match for app with uid 9987, seinfo platform, name org.simalliance.openmobileapi.service:remote
smdol commented 8 years ago

I just double-checked with the demo scene that comes with the SDK. Even though the spatial audio is working just fine in the app, I still see the same error in the logcat:

01-24 22:21:50.651 16149 16174 E Unity : Unable to find libaudiopluginvrunity

I think the "Missing DT_SONAME" warning that @sprengundsonntag mentioned may be related to this message. I am seeing that too. Oddly, I am not seeing the part that says "native render plugin support disabled", so I don't know what's up there.

But anyway, since the audio is working in the app despite this message, I think it may possibly be a red herring for the crash caused by magnet/LoadLevel. That crash may be related to the similar crash we had with tilt/LoadLevel (or Quit) in the prior release.

@sprengundsonntag Can you temporarily disable all CardboardAudio scripts in your scene and see if the magnet/LoadLevel bug still exists? (If you really want to be sure, delete the components completely.)

ghost commented 8 years ago

@smdol I don't have any CardboardAudio Components in my Scene, just normal Audio Sources. The sound works flawlessly, for our project spatialized sound isn't that important. Thank you all for your time & effort to get this going!

nosmirck commented 8 years ago

One quick workaround is not to load the level immediately after the trigger has been pulled, set the button to call on click to a method that calls a coroutine that waits for 0.1 seconds (or invoke another method after the same time). Of course, it would be good to use some kind of "traffic light" with a boolean variable, something like this:

private bool changingLevel = false;
...
public void ChangeLevel(int l){
    if(changingLevel)
        return; //does nothing, it's already changing level
    changingLevel = true;
    StartCoroutine(ChangeLevelThread(l));
}
IEnumerator ChangeLevelThread(int l){
    yield return new WaitForSeconds(0.1f);
    changingLevel = false; //this is needed only if this class is a singleton or is not destroyed on load
    SceneManager.LoadScene (l);
}

I don't know exactly why this may happen, I think that the trigger detection may be reading something from the hardware that takes a bit of time, so, if the level changes and the trigger script is enabling again on the new scene, it will find part of the script stuck reading, I don't know, I'm just speculating.

Anyways, I hope this helps you find a solution.

subkhansarif commented 8 years ago

@sprengundsonntag did you get the solution? I get the exact same problem...

ghost commented 8 years ago

@nosmirck So actually the level changes not at the exact moment the triffer is pulled but about 7 seconds later.

@subkhansarif Actually we didn't find a solution yet and paused development on that particular project until a fix is found.

Edit: I just found out that 0.7 is probably fixing our issue. I will let you know what happens!

nosmirck commented 8 years ago

@sprengundsonntag well, yeah, for me 0.1 was enough, but depending on the device, you may need more time.

Anyways, I ended up implementing a "trigger-free" system to activate the buttons, by just gazing at them for 2.5 seconds, they activate. I put a small canvas with an image of a circle in the reticle and fill it radial, when it's full, it activates the button.

However, in the release notes of the newest SDK build it says that this problem was fixed.

v0.7 (3/30/2016):

smdol commented 8 years ago

Please say if the trigger crash is fixed for you -- we reworked how the events come up from native code so that it all runs on a single thread now.

subsub commented 8 years ago

@smdol it is fixed for me. the new update (v0.7) works. Thank you...