Cardboard app crash with Multithreaded Rendering enabled

Good day!

Have problem with Carboard and enabled “Multithreaded Rendering” in Player settings for Android.
App is crashing with VRModeEnabled set to true in GVRViewer.

GoogleVR SDK: 1.10, 1.20.
Unity 5.4.0+

Is there any workaround, how to fix it, because without rendering enabled performance in cardboard is low?

Best regards!

What specific version of 5.4 are you using?

Have checked in 5.4.2p4, 5.4.0f3, 5.5.0f1, 5.5.2f1, 5.4.1p4.
Android on devices: 5.0, 6.0.1
Android SDK Tools: 25.2.5
Android SDK Platform-tools: 25.0.3
Android SDK Build-tools: 25.0.2

@Xel_Naga_1 Could you please attach a logcat of the crash?

Posted 2 logs. The first one is just short version of logcat2. Tomorrow will attach more logcats, if you need.

logcat1

02-24 17:23:54.410: A/libc(1454): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 1632 (UnityGfxDeviceW)
02-24 17:23:54.515: A/DEBUG(420): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-24 17:23:54.515: A/DEBUG(420): Build fingerprint: 'Xiaomi/cancro_wc_lte/cancro:6.0.1/MMB29M/6.11.24:user/release-keys'
02-24 17:23:54.515: A/DEBUG(420): Revision: '0'
02-24 17:23:54.515: A/DEBUG(420): ABI: 'arm'
02-24 17:23:54.515: A/DEBUG(420): pid: 1454, tid: 1632, name: UnityGfxDeviceW  >>> com.demo.gvr <<<
02-24 17:23:54.515: A/DEBUG(420): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
02-24 17:23:54.548: A/DEBUG(420):     r0 000084e0  r1 b38d62ec  r2 00000000  r3 00000000
02-24 17:23:54.548: A/DEBUG(420):     r4 961b5c00  r5 961b5c10  r6 b6d8aec0  r7 b38d6300
02-24 17:23:54.549: A/DEBUG(420):     r8 47554342  r9 aaaaaaab  sl 00160edc  fp 98b7f640
02-24 17:23:54.549: A/DEBUG(420):     ip b38d5f78  sp 978f53a8  lr b37eeb85  pc 00000000  cpsr 60000010
02-24 17:23:54.557: A/DEBUG(420): backtrace:
02-24 17:23:54.558: A/DEBUG(420):     #00 pc 00000000  <unknown>
02-24 17:23:54.558: A/DEBUG(420):     #01 pc 00017b83  /data/app/com.demo.gvr-1/lib/arm/libgvrunity.so (UnityRenderEvent+186)
02-24 17:23:54.558: A/DEBUG(420):     #02 pc 003b94f0  /data/app/com.demo.gvr-1/lib/arm/libunity.so
02-24 17:23:54.558: A/DEBUG(420):     #03 pc 004ce1b8  /data/app/com.demo.gvr-1/lib/arm/libunity.so
02-24 17:23:54.559: A/DEBUG(420):     #04 pc 004d0280  /data/app/com.demo.gvr-1/lib/arm/libunity.so
02-24 17:23:54.559: A/DEBUG(420):     #05 pc 004caaac  /data/app/com.demo.gvr-1/lib/arm/libunity.so
02-24 17:23:54.560: A/DEBUG(420):     #06 pc 0046cc04  /data/app/com.demo.gvr-1/lib/arm/libunity.so
02-24 17:23:54.560: A/DEBUG(420):     #07 pc 0003f557  /system/lib/libc.so (_ZL15__pthread_startPv+30)
02-24 17:23:54.560: A/DEBUG(420):     #08 pc 00019c37  /system/lib/libc.so (__start_thread+6)
02-24 17:23:55.942: A/DEBUG(420): Tombstone written to: /data/tombstones/tombstone_01
02-24 17:23:55.942: E/DEBUG(420): AM write failed: Broken pipe

logcat2

02-24 17:23:53.654: I/InfoCollectManager(3784): ACTION:android.intent.action.BATTERY_CHANGED
02-24 17:23:53.680: D/charger_monitor(990): vchg_loop stable: 1, is_settled = 0,usb_target_ua = 0, usbin_current_now = 100000,fastchg_sts = 0, num_attempts = 0
02-24 17:23:53.687: I/InfoCollectManager(3784): ACTION:android.intent.action.BATTERY_CHANGED
02-24 17:23:53.952: D/StatusBar.NetworkController(3454): onSignalStrengthsChanged received on slotId :0signalStrength=SignalStrength: 15 0 -120 -160 -120 -1 -1 99 2147483647 2147483647 2147483647 2147483647 2147483647 gsm|lte level=5 cdmdlevel=0 evdolevel=0
02-24 17:23:54.054: D/PowerKeeperPolicy(2414): scanDiedProcess pid = 1454
02-24 17:23:54.054: W/SensorService(2414): sensor 00000000 already enabled in connection 0x9027b380 (ignoring)
02-24 17:23:54.058: I/MediaFocusControl(2414):  AudioFocus  requestAudioFocus() from android.media.AudioManager@1bc9e8c<native proxy object> req=3flags=0x0
02-24 17:23:54.064: E/AudioFlinger(423): open /proc/1454/cmdline error
02-24 17:23:54.064: I/AudioFlinger(423): setAppName(), name=[], active=[0]
02-24 17:23:54.057: W/mediaserver(423): type=1400 audit(0.0:4138): avc: denied { search } for name="1454" dev="proc" ino=803470 scontext=u:r:mediaserver:s0 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=dir permissive=0
02-24 17:23:54.064: V/EffectDiracSound(423): DiracSound_Command EFFECT_CMD_SET_APP_NAME: stream=3, name=-
02-24 17:23:54.067: W/Binder_2(392): type=1400 audit(0.0:4139): avc: denied { ioctl } for path="socket:[803563]" dev="sockfs" ino=803563 ioctlcmd=7704 scontext=u:r:surfaceflinger:s0 tcontext=u:r:surfaceflinger:s0 tclass=unix_stream_socket permissive=0
02-24 17:23:54.067: W/Binder_2(392): type=1400 audit(0.0:4140): avc: denied { ioctl } for path="socket:[803563]" dev="sockfs" ino=803563 ioctlcmd=7704 scontext=u:r:surfaceflinger:s0 tcontext=u:r:surfaceflinger:s0 tclass=unix_stream_socket permissive=0
02-24 17:23:54.077: W/Binder_2(4229): type=1400 audit(0.0:4141): avc: denied { search } for name="1454" dev="proc" ino=803470 scontext=u:r:mediaserver:s0 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=dir permissive=0
02-24 17:23:54.086: E/AudioFlinger(423): open /proc/1454/cmdline error
02-24 17:23:54.086: I/AudioFlinger(423): setAppName(), name=[], active=[1]
02-24 17:23:54.086: V/EffectDiracSound(423): DiracSound_command() start, cmdCode=23
02-24 17:23:54.086: V/EffectDiracSound(423): DiracSound_Command EFFECT_CMD_SET_APP_NAME: stream=3, name=+
02-24 17:23:54.121: D/AudioFlinger(423): mixer(0xb0d00000) throttle end: throttle time(1)
02-24 17:23:54.236: I/ThermalEngine(476): Sensor:batt_temp:287 mC
02-24 17:23:54.244: E/Sensors(743): DSPS file:sns_scm.c(464):Failed to deregister SCM timer with error code 5
02-24 17:23:54.410: A/libc(1454): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 1632 (UnityGfxDeviceW)
02-24 17:23:54.515: A/DEBUG(420): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-24 17:23:54.515: A/DEBUG(420): Build fingerprint: 'Xiaomi/cancro_wc_lte/cancro:6.0.1/MMB29M/6.11.24:user/release-keys'
02-24 17:23:54.515: A/DEBUG(420): Revision: '0'
02-24 17:23:54.515: A/DEBUG(420): ABI: 'arm'
02-24 17:23:54.515: A/DEBUG(420): pid: 1454, tid: 1632, name: UnityGfxDeviceW  >>> com.demo.gvr <<<
02-24 17:23:54.515: A/DEBUG(420): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
02-24 17:23:54.548: A/DEBUG(420):     r0 000084e0  r1 b38d62ec  r2 00000000  r3 00000000
02-24 17:23:54.548: A/DEBUG(420):     r4 961b5c00  r5 961b5c10  r6 b6d8aec0  r7 b38d6300
02-24 17:23:54.549: A/DEBUG(420):     r8 47554342  r9 aaaaaaab  sl 00160edc  fp 98b7f640
02-24 17:23:54.549: A/DEBUG(420):     ip b38d5f78  sp 978f53a8  lr b37eeb85  pc 00000000  cpsr 60000010
02-24 17:23:54.557: A/DEBUG(420): backtrace:
02-24 17:23:54.558: A/DEBUG(420):     #00 pc 00000000  <unknown>
02-24 17:23:54.558: A/DEBUG(420):     #01 pc 00017b83  /data/app/com.demo.gvr-1/lib/arm/libgvrunity.so (UnityRenderEvent+186)
02-24 17:23:54.558: A/DEBUG(420):     #02 pc 003b94f0  /data/app/com.demo.gvr-1/lib/arm/libunity.so
02-24 17:23:54.558: A/DEBUG(420):     #03 pc 004ce1b8  /data/app/com.demo.gvr-1/lib/arm/libunity.so
02-24 17:23:54.559: A/DEBUG(420):     #04 pc 004d0280  /data/app/com.demo.gvr-1/lib/arm/libunity.so
02-24 17:23:54.559: A/DEBUG(420):     #05 pc 004caaac  /data/app/com.demo.gvr-1/lib/arm/libunity.so
02-24 17:23:54.560: A/DEBUG(420):     #06 pc 0046cc04  /data/app/com.demo.gvr-1/lib/arm/libunity.so
02-24 17:23:54.560: A/DEBUG(420):     #07 pc 0003f557  /system/lib/libc.so (_ZL15__pthread_startPv+30)
02-24 17:23:54.560: A/DEBUG(420):     #08 pc 00019c37  /system/lib/libc.so (__start_thread+6)
02-24 17:23:55.086: I/AudioFlinger(423): BUFFER TIMEOUT: remove(4097) from active list on thread 0xb0d00000
02-24 17:23:55.238: I/ThermalEngine(476): Sensor:batt_temp:287 mC
02-24 17:23:55.304: D/wpa_supplicant(30111): wlan0: Control interface command 'SIGNAL_POLL'
02-24 17:23:55.307: D/wpa_supplicant(30111): CTRL-DEBUG: global_ctrl_sock-sendto: sock=11 sndbuf=163840 outq=0 send_len=48
02-24 17:23:55.897: V/NotificationService(2414): pkg=com.oasisfeng.bytesinsight canInterrupt=true intercept=true
02-24 17:23:55.908: D/StatusBar(3454): onNotificationPosted:  Key: 0|com.oasisfeng.bytesinsight|0|null|10149 GroupKey: 0|com.oasisfeng.bytesinsight|0|null|10149 Connected: true
02-24 17:23:55.908: D/StatusBar(3454):  GroupChild: false  GroupsContainsKey: false  IsUpdate: true IsGroupSummary: false hasIcon: true
02-24 17:23:55.909: D/PhoneStatusBar(3454): updateNotification pkg=com.oasisfeng.bytesinsight;id=0
02-24 17:23:55.942: I/WtEventController(3617): Receive am_crash event for pid: 2414
02-24 17:23:55.942: A/DEBUG(420): Tombstone written to: /data/tombstones/tombstone_01
02-24 17:23:55.942: E/DEBUG(420): AM write failed: Broken pipe
02-24 17:23:55.943: I/BootReceiver(2414): Copying /data/tombstones/tombstone_01 to DropBox (SYSTEM_TOMBSTONE)
02-24 17:23:55.943: I/Choreographer(1454): Skipped 85 frames!  The application may be doing too much work on its main thread.
02-24 17:23:55.943: I/Choreographer(1454): Skipped 85 frames!  The application may be doing too much work on its main thread.
02-24 17:23:55.944: W/AudioTrack(1454): releaseBuffer() track 0x98bc3180 disabled due to previous underrun, restarting
02-24 17:23:55.946: I/octvm_klo(5030): get event file: /data/tombstones/tombstone_01
02-24 17:23:55.946: I/octvm_klo(5030): klo lock
02-24 17:23:55.951: V/EffectDiracSound(423): DiracSound_command() start, cmdCode=9
02-24 17:23:55.951: V/EffectDiracSound(423): DiracSound_Command EFFECT_CMD_SET_DEVICE: 0x00000002
02-24 17:23:55.951: D/audio_hw_primary(423): out_set_parameters: enter: usecase(0: deep-buffer-playback) kvpairs: routing=2
02-24 17:23:55.951: I/msm8974_platform(423): platform_get_output_snd_device: enter: output devices(0x2)
02-24 17:23:55.951: I/msm8974_platform(423): platform_get_output_snd_device: exit: snd_device(speaker)
02-24 17:23:55.951: D/audio_hw_extn(423): audio_extn_set_anc_parameters: anc_enabled:0
02-24 17:23:55.951: V/audio_hw_primary(423): out_set_parameters: exit: code(0)
02-24 17:23:55.952: I/CatonHandler(3617): Caton frame: 85
02-24 17:23:55.958: W/ActivityManager(2414):   Force finishing activity com.demo.gvr/com.google.unity.GoogleUnityActivity
02-24 17:23:55.959: I/CatonHandler(3617): Caton frame: 85
02-24 17:23:55.961: D/audio_hw_primary(423): out_set_parameters: enter: usecase(0: deep-buffer-playback) kvpairs: fm_volume=0.0000000000
02-24 17:23:55.961: D/audio_hw_extn(423): audio_extn_set_anc_parameters: anc_enabled:0
02-24 17:23:55.961: D/audio_hw_fm(423): audio_extn_fm_set_parameters: set_fm_volume usecase
02-24 17:23:55.961: D/audio_hw_fm(423): fm_set_volume: (0.000000)
02-24 17:23:55.961: V/audio_hw_primary(423): out_set_parameters: exit: code(0)
02-24 17:23:55.971: E/ActivityManager(2414): Invalid thumbnail dimensions: 0x0
02-24 17:23:55.971: D/audio_hw_primary(423): out_set_parameters: enter: usecase(0: deep-buffer-playback) kvpairs: fm_volume=0.0000000000
02-24 17:23:55.971: D/audio_hw_extn(423): audio_extn_set_anc_parameters: anc_enabled:0
02-24 17:23:55.971: D/audio_hw_fm(423): audio_extn_fm_set_parameters: set_fm_volume usecase
02-24 17:23:55.971: D/audio_hw_fm(423): fm_set_volume: (0.000000)
02-24 17:23:55.971: V/audio_hw_primary(423): out_set_parameters: exit: code(0)
02-24 17:23:55.967: W/Binder_1(2615): type=1400 audit(0.0:4142): avc: denied { search } for name="1454" dev="proc" ino=803470 scontext=u:r:mediaserver:s0 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=dir permissive=0
02-24 17:23:55.972: E/AudioFlinger(423): open /proc/1454/cmdline error
02-24 17:23:55.972: I/AudioFlinger(423): setAppName(), name=[], active=[1]
02-24 17:23:55.972: V/EffectDiracSound(423): DiracSound_command() start, cmdCode=23
02-24 17:23:55.972: V/EffectDiracSound(423): DiracSound_Command EFFECT_CMD_SET_APP_NAME: stream=3, name=+
02-24 17:23:55.973: D/WtProcessController(3617): onAMPauseActivity callback
02-24 17:23:55.977: I/octvm_klo(5030): start gathering logcat log...
02-24 17:23:56.003: W/MediaFocusControl(2414):   AudioFocus   audio focus client died
02-24 17:23:56.012: I/WindowState(2414): WIN DEATH: Window{76c2f58 u0 com.demo.gvr/com.google.unity.GoogleUnityActivity}
02-24 17:23:56.012: D/GraphicsStats(2414): Buffer count: 13
02-24 17:23:56.013: I/MediaFocusControl(2414): AudioFocus  removeFocusStackEntry(): removing entry for android.os.BinderProxy@3198602
02-24 17:23:56.014: I/WindowState(2414): WIN DEATH: Window{3edb13 u0 SurfaceView}
02-24 17:23:56.020: V/BoostFramework(2414): BoostFramework() : mPerf = com.qualcomm.qti.Performance@cddd35a
02-24 17:23:56.021: V/BoostFramework(2414): BoostFramework() : mPerf = com.qualcomm.qti.Performance@274998b
02-24 17:23:56.040: I/ActivityManager(2414): Process com.demo.gvr (pid 1454) has died
02-24 17:23:56.041: D/ActivityManager(2414): cleanUpApplicationRecord -- 1454
02-24 17:23:56.043: D/PowerKeeperPolicy(2414): release all sensors for pid 1454
02-24 17:23:56.062: I/ActivityManager(2414): Config changes=480 {1.0 255mcc1mnc ru_RU ldltr sw360dp w360dp h620dp 480dpi nrml long port finger -keyb/v/h -nav/h s.27 themeChanged=0 themeChangedFlags=0}
02-24 17:23:56.076: I/InputReader(2414): Reconfiguring input devices.  changes=0x00000004
02-24 17:23:56.076: I/InputReader(2414): Device reconfigured: id=6, name='atmel-maxtouch', size 1080x1920, orientation 0, mode 1, display id 0
02-24 17:23:56.091: I/Zygote(441): Process 1454 exited due to signal (11)
02-24 17:23:56.161: I/art(2414): Background partial concurrent mark sweep GC freed 78264(3MB) AllocSpace objects, 11(1184KB) LOS objects, 33% free, 36MB/55MB, paused 2.833ms total 168.541ms
02-24 17:23:56.195: D/TaskManagerView(3454): show(false), mIsShow:false
02-24 17:23:56.196: I/Timeline(2414): Timeline: App_transition_ready time:31154636
02-24 17:23:56.197: W/WindowState(2414): Failed to report 'resized' to the client of Window{3edb13 u0 SurfaceView}, removing this window.
02-24 17:23:56.198: W/WindowState(2414): Failed to report 'resized' to the client of Window{76c2f58 u0 com.demo.gvr/com.google.unity.GoogleUnityActivity}, removing this window.
02-24 17:23:56.210: I/Timeline(2414): Timeline: App_transition_ready time:31154650
02-24 17:23:56.212: I/Timeline(2414): Timeline: App_transition_ready time:31154652
02-24 17:23:56.212: D/WtProcessController(3617): onAMResumeActivity callback
02-24 17:23:56.212: D/WtProcessController(3617): set foreground process size 1 pid:3640pacakgeName:com.miui.home
02-24 17:23:56.213: I/DateTimeVariableUpdater(3454): init with accuracy:Minute
02-24 17:23:56.213: I/octvm_power(5030): power mode [home] start 1487949836
02-24 17:23:56.214: I/Timeline(2414): Timeline: App_transition_ready time:31154654
02-24 17:23:56.218: W/art(2414): Long monitor contention event with owner method=void com.android.server.am.ActivityManagerService.ensureBootCompleted() from ActivityManagerService.java:4294967295 waiters=1 for 177ms
02-24 17:23:56.218: I/octvm_power(5030): Action: set_cpu_powermode(middle) for [foreground_change]
02-24 17:23:56.218: I/octvm_power(5030): Action: set_lcd_mode(ui) for [foreground_change]
02-24 17:23:56.219: I/octvm_drv(5030): common drv: set_lcd_mode ui
02-24 17:23:56.219: D/ScreenElementRoot(3454): findResource: ScaleMetrics sw:1080 den:480 sizeType:0 scale:1.0 path:null
02-24 17:23:56.222: D/ScreenElementRoot(3454): findScale: ScaleMetrics sw:1080 den:480 sizeType:0 scale:-1.0

any news?

FYI, in Unity 5.4.2f2-GVR13 apps are not crashing and working fine.

Any updates?

I haven’t been able to repro with a non-native integration version of Unity. We will be deprecating support for those versions anyhow, so it would be best to move to 5.4.2f2-GVR13 or 5.6 beta.

I can attach simple project for reproduce. Do you need this?
Is it will be possible to download old versions of gvr sdk for Unity versions without native support?

Could you please attach an APK, or try reproducing with the GVRDemo / TreasureHunt demo scene?

Older versions of the GVR Unity SDK can be accessed via the history in our GitHub repo.

Here is link on apk. GVRDemo scene in it builded in Unity 5.4.1 p4.

Hi,Buddy, I meet the same problem.Is there any solutions?

You can use tech preview version for android only or use older version of gvr plugin (1.03 or earlier) and maybe try new 5.6 version of unity.
Or just disable multithreaded render in player settings.

But, as I understand, there is no suitable solution.

Hello

same problem here :frowning:

I’m using Avpro and i need multithreading.
I’m using Unity 5.5.1 on MAC and the last GVR SDK

On GvrViewerMain, change the distortion correction from “native” to “unity”.
(Does not work on Unity 5.6)

and it won’t crash with enabled mutlithread reandering?

Multithreading work fine on my Samsung Galaxy S7, Android version 7.0 (Unity 5.5.1)