By wallyyoung
on Tue, 10/08/2013 - 00:20
Hello,
Any attempt to have the AR Camera instantiated at any other time than start up causes a crash. This includes (in Unity):
1 - Instantiating an AR Camera from resources (works on iOS).
2 - Starting with an AR Camera in scene, but disabled, and then enabling it.
3 - Starting with an AR Camera enabled, but setting QCARManager.Instance.DrawVideoBackground to false on start (this includes null checking QCARManager.Instance).
It seems my only option is to have an ARCamera, on start, rendering. Is there any other option for Android?
Crash is as follows (testing on Galaxy Note II):
10-07 17:09:29.589: E/WifiHW(2382): ##################### set firmware type 0 #####################10-07 17:09:30.429: W/PowerManagerService(2382): Timer 0x7->0x1|0xf10-07 17:09:37.434: W/PowerManagerService(2382): Timer 0x7->0x0|0xf10-07 17:09:37.434: E/PowerManagerService(2382): CurLock p:3 mPS:710-07 17:09:37.434: W/PowerManagerService(2382): type=SCREEN_DIM_WAKE_LOCK 'StayOnWhilePluggedIn Screen Dim' active (minState=1) activeT=20145666 uid=1000 pid=238210-07 17:09:37.434: W/PowerManagerService(2382): type=PARTIAL_WAKE_LOCK 'StayOnWhilePluggedIn Partial' active (minState=0) activeT=20145666 uid=1000 pid=238210-07 17:09:37.434: W/PowerManagerService(2382): type=PARTIAL_WAKE_LOCK 'AudioOut_2' active (minState=0) activeT=10920 uid=1013 pid=197010-07 17:09:37.434: W/PowerManagerService(2382): type=FULL_WAKE_LOCK 'Unity-ProjectRequestedWakeLock' active (minState=15) activeT=10284 uid=10163 pid=1783210-07 17:09:39.269: A/libc(17832): Fatal signal 11 (SIGSEGV) at 0xc1bb2540 (code=1), thread 17888 (UnityMain)10-07 17:09:39.369: I/DEBUG(1960): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***10-07 17:09:39.369: I/DEBUG(1960): Build fingerprint: 'Verizon/t0ltevzw/t0ltevzw:4.1.2/JZO54K/I605VRAMC3:user/release-keys'10-07 17:09:39.369: I/DEBUG(1960): pid: 17832, tid: 17888, name: UnityMain >>> com.daqri.corerework <<<10-07 17:09:39.369: I/DEBUG(1960): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr c1bb254010-07 17:09:39.449: I/DEBUG(1960): r0 c1bb2540 r1 62ca2940 r2 00000036 r3 0000140310-07 17:09:39.449: I/DEBUG(1960): r4 62d11fd0 r5 62d12348 r6 00000000 r7 0000000010-07 17:09:39.449: I/DEBUG(1960): r8 c1bb25ac r9 5f04efa0 sl ffffffff fp 0000006610-07 17:09:39.449: I/DEBUG(1960): ip 00001403 sp 5f04ef30 lr 5e7d348c pc 5e7e0cac cpsr 8000001010-07 17:09:39.449: I/DEBUG(1960): d0 000000003f800000 d1 000000000000000010-07 17:09:39.449: I/DEBUG(1960): d2 3f80000000000000 d3 000000000000000010-07 17:09:39.449: I/DEBUG(1960): d4 0000000000000000 d5 000000003f80000010-07 17:09:39.449: I/DEBUG(1960): d6 0000000000000000 d7 3f8000000000000010-07 17:09:39.449: I/DEBUG(1960): d8 0000000000000000 d9 000000004188000010-07 17:09:39.449: I/DEBUG(1960): d10 00000000435b0000 d11 3f8000003f80000010-07 17:09:39.449: I/DEBUG(1960): d12 0000000000000000 d13 000000000000000010-07 17:09:39.449: I/DEBUG(1960): d14 0000000000000000 d15 000000000000000010-07 17:09:39.449: I/DEBUG(1960): d16 000000003b360b61 d17 000000000000000010-07 17:09:39.449: I/DEBUG(1960): d18 bacccccc00000000 d19 000000000000000010-07 17:09:39.449: I/DEBUG(1960): d20 0000000000000000 d21 00000000bca237c310-07 17:09:39.449: I/DEBUG(1960): d22 3f800000bf7fffe0 d23 3f800000bf7aee4210-07 17:09:39.449: I/DEBUG(1960): d24 000000003b360b61 d25 000000000000000010-07 17:09:39.449: I/DEBUG(1960): d26 bacccccc00000000 d27 000000000000000010-07 17:09:39.449: I/DEBUG(1960): d28 0000000000000000 d29 00000000bca237c310-07 17:09:39.449: I/DEBUG(1960): d30 3f800000bf7fffe0 d31 3f800000bf7aee4210-07 17:09:39.449: I/DEBUG(1960): scr 6000001210-07 17:09:39.454: I/DEBUG(1960): backtrace:10-07 17:09:39.454: I/DEBUG(1960): #00 pc 00022cac /system/lib/egl/libGLESv2_mali.so (_gles_gb_buffer_object_data_range_cache_get+532)10-07 17:09:39.454: I/DEBUG(1960): #01 pc 00015488 /system/lib/egl/libGLESv2_mali.so (_gles_init_draw_elements+212)10-07 17:09:39.454: I/DEBUG(1960): #02 pc 00026bec /system/lib/egl/libGLESv2_mali.so (_gles2_draw_elements+196)10-07 17:09:39.454: I/DEBUG(1960): #03 pc 0000b438 /system/lib/egl/libGLESv2_mali.so (glDrawElements+76)10-07 17:09:39.454: I/DEBUG(1960): #04 pc 003b1144 <unknown>10-07 17:09:39.454: I/DEBUG(1960): #05 pc 00125470 <unknown>10-07 17:09:39.454: I/DEBUG(1960): #06 pc 001258d8 <unknown>10-07 17:09:39.454: I/DEBUG(1960): #07 pc 00254bc0 <unknown>10-07 17:09:39.454: I/DEBUG(1960): #08 pc 0025800c <unknown>10-07 17:09:39.454: I/DEBUG(1960): #09 pc 0025b3f4 <unknown>10-07 17:09:39.454: I/DEBUG(1960): #10 pc 0025b4b0 <unknown>10-07 17:09:39.454: I/DEBUG(1960): #11 pc 0025b78c <unknown>10-07 17:09:39.454: I/DEBUG(1960): #12 pc 0025b8c8 <unknown>10-07 17:09:39.454: I/DEBUG(1960): #13 pc 004154a4 <unknown>10-07 17:09:39.454: I/DEBUG(1960): #14 pc 00004414 <unknown>10-07 17:09:39.454: I/DEBUG(1960): stack:10-07 17:09:39.454: I/DEBUG(1960): 5f04eef0 62b687ec 10-07 17:09:39.454: I/DEBUG(1960): 5f04eef4 62ca4590 10-07 17:09:39.454: I/DEBUG(1960): 5f04eef8 5f04ef44 10-07 17:09:39.454: I/DEBUG(1960): 5f04eefc 5e7c9d8c /system/lib/egl/libGLESv2_mali.so (glStencilMask+40)10-07 17:09:39.454: I/DEBUG(1960): 5f04ef00 ff000007 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef04 607069b4 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef08 60731830 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef0c 5dced2c8 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef10 5dced218 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef14 60731830 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef18 607069b4 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef1c 5dca7230 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef20 62ca4508 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef24 62ca446c 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef28 e3a070ad 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef2c ef9000ad 10-07 17:09:39.454: I/DEBUG(1960): #00 5f04ef30 00000000 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef34 62b687d0 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef38 00000000 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef3c 62d1234c 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef40 5aac6e90 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef44 5aabfda8 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef48 00000036 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef4c 00000000 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef50 00001403 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef54 62ca2940 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef58 5f04efa0 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef5c 5f04efa4 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef60 5f04efa4 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef64 5e7d348c /system/lib/egl/libGLESv2_mali.so (_gles_init_draw_elements+216)10-07 17:09:39.454: I/DEBUG(1960): #01 5f04ef68 5f04efa4 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef6c 5f04efa0 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef70 00000004 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef74 00000036 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef78 5aabfda8 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef7c 00000000 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef80 00001403 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef84 62ca2940 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef88 5aac4660 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef8c 5e7e4bf0 /system/lib/egl/libGLESv2_mali.so (_gles2_draw_elements+200)10-07 17:09:39.454: I/DEBUG(1960): #02 5f04ef90 62ca2940 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef94 5f04efa4 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef98 5f04efa0 10-07 17:09:39.454: I/DEBUG(1960): 5f04ef9c 5e1b9924 10-07 17:09:39.454: I/DEBUG(1960): 5f04efa0 00000000 10-07 17:09:39.454: I/DEBUG(1960): 5f04efa4 00000000 10-07 17:09:39.454: I/DEBUG(1960): 5f04efa8 00001403 10-07 17:09:39.454: I/DEBUG(1960): 5f04efac 5aabfda8 10-07 17:09:39.454: I/DEBUG(1960): 5f04efb0 00001403 10-07 17:09:39.454: I/DEBUG(1960): 5f04efb4 00000036 10-07 17:09:39.454: I/DEBUG(1960): 5f04efb8 00000004 10-07 17:09:39.454: I/DEBUG(1960): 5f04efbc 62ca2940 10-07 17:09:39.454: I/DEBUG(1960): 5f04efc0 132af9e0 10-07 17:09:39.454: I/DEBUG(1960): 5f04efc4 1082e9d8 10-07 17:09:39.454: I/DEBUG(1960): 5f04efc8 00000000 10-07 17:09:39.454: I/DEBUG(1960): 5f04efcc 5e7c943c /system/lib/egl/libGLESv2_mali.so (glDrawElements+80)10-07 17:09:39.459: I/DEBUG(1960): memory near r1:10-07 17:09:39.459: I/DEBUG(1960): 62ca2920 aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa ................10-07 17:09:39.459: I/DEBUG(1960): 62ca2930 aaaaaaaa 00000018 00002001 dfa50014 ......... ......10-07 17:09:39.459: I/DEBUG(1960): 62ca2940 00040000 00010001 00050004 00050001 ................10-07 17:09:39.459: I/DEBUG(1960): 62ca2950 00020002 00060005 00060002 00030003 ................10-07 17:09:39.459: I/DEBUG(1960): 62ca2960 00070006 00080004 00050005 00090008 ................10-07 17:09:39.459: I/DEBUG(1960): memory near r3:10-07 17:09:39.459: I/DEBUG(1960): 000013e0 ffffffff ffffffff ffffffff ffffffff ................10-07 17:09:39.459: I/DEBUG(1960): 000013f0 ffffffff ffffffff ffffffff ffffffff ................10-07 17:09:39.459: I/DEBUG(1960): 00001400 ffffffff ffffffff ffffffff ffffffff ................10-07 17:09:39.459: I/DEBUG(1960): 00001410 ffffffff ffffffff ffffffff ffffffff ................10-07 17:09:39.459: I/DEBUG(1960): 00001420 ffffffff ffffffff ffffffff ffffffff ................10-07 17:09:39.459: I/DEBUG(1960): memory near r4:10-07 17:09:39.459: I/DEBUG(1960): 62d11fb0 00000000 00000000 00000000 00000000 ................10-07 17:09:39.459: I/DEBUG(1960): 62d11fc0 00000000 00000259 00000000 0000085b ....Y.......[...10-07 17:09:39.459: I/DEBUG(1960): 62d11fd0 62c12148 00000000 00000000 00000000 H!.b............10-07 17:09:39.459: I/DEBUG(1960): 62d11fe0 00000000 00000000 00000000 00000000 ................10-07 17:09:39.459: I/DEBUG(1960): 62d11ff0 00000000 00000000 00000000 00000000 ................10-07 17:09:39.459: I/DEBUG(1960): memory near r5:10-07 17:09:39.459: I/DEBUG(1960): 62d12328 00000000 00000000 00000000 00000000 ................10-07 17:09:39.459: I/DEBUG(1960): 62d12338 00000000 00000000 00000000 00000000 ................10-07 17:09:39.459: I/DEBUG(1960): 62d12348 00000000 00000000 00000000 00000000 ................10-07 17:09:39.459: I/DEBUG(1960): 62d12358 00000000 00000000 00000000 00000000 ................10-07 17:09:39.459: I/DEBUG(1960): 62d12368 00000000 00000000 00000000 00000000 ................10-07 17:09:39.459: I/DEBUG(1960): memory near r9:10-07 17:09:39.459: I/DEBUG(1960): 5f04ef80 00001403 62ca2940 5aac4660 5e7e4bf0 ....@).b`F.Z.K~^10-07 17:09:39.459: I/DEBUG(1960): 5f04ef90 62ca2940 5f04efa4 5f04efa0 5e1b9924 @).b..._..._$..^10-07 17:09:39.459: I/DEBUG(1960): 5f04efa0 00000000 00000000 00001403 5aabfda8 ...............Z10-07 17:09:39.459: I/DEBUG(1960): 5f04efb0 00001403 00000036 00000004 62ca2940 ....6.......@).b10-07 17:09:39.459: I/DEBUG(1960): 5f04efc0 132af9e0 1082e9d8 00000000 5e7c943c ..*.........<.|^10-07 17:09:39.459: I/DEBUG(1960): memory near ip:10-07 17:09:39.459: I/DEBUG(1960): 000013e0 ffffffff ffffffff ffffffff ffffffff ................10-07 17:09:39.459: I/DEBUG(1960): 000013f0 ffffffff ffffffff ffffffff ffffffff ................10-07 17:09:39.459: I/DEBUG(1960): 00001400 ffffffff ffffffff ffffffff ffffffff ................10-07 17:09:39.459: I/DEBUG(1960): 00001410 ffffffff ffffffff ffffffff ffffffff ................10-07 17:09:39.459: I/DEBUG(1960): 00001420 ffffffff ffffffff ffffffff ffffffff ................10-07 17:09:39.459: I/DEBUG(1960): memory near sp:10-07 17:09:39.459: I/DEBUG(1960): 5f04ef10 5dced218 60731830 607069b4 5dca7230 ...]0.s`.ip`0r.]10-07 17:09:39.459: I/DEBUG(1960): 5f04ef20 62ca4508 62ca446c e3a070ad ef9000ad .E.blD.b.p......10-07 17:09:39.459: I/DEBUG(1960): 5f04ef30 00000000 62b687d0 00000000 62d1234c .......b....L#.b10-07 17:09:39.459: I/DEBUG(1960): 5f04ef40 5aac6e90 5aabfda8 00000036 00000000 .n.Z...Z6.......10-07 17:09:39.459: I/DEBUG(1960): 5f04ef50 00001403 62ca2940 5f04efa0 5f04efa4 ....@).b..._..._10-07 17:09:39.459: I/DEBUG(1960): code around pc:10-07 17:09:39.459: I/DEBUG(1960): 5e7e0c8c e3a07000 e590a004 e59a0004 e3e0a000 .p..............10-07 17:09:39.459: I/DEBUG(1960): 5e7e0c9c e3500000 10800001 e0808082 ea000004 ..P.............10-07 17:09:39.459: I/DEBUG(1960): 5e7e0cac e0d0c0b2 e15a000c 21a0a00c e157000c ......Z....!..W.10-07 17:09:39.459: I/DEBUG(1960): 5e7e0cbc 31a0700c e1500008 1afffff8 eaffffb3 .p.1..P.........10-07 17:09:39.459: I/DEBUG(1960): 5e7e0ccc e3a00080 e58d1008 e58d2004 e58d3000 ......... ...0..10-07 17:09:39.459: I/DEBUG(1960): code around lr:10-07 17:09:39.459: I/DEBUG(1960): 5e7d346c e35a0000 0a000005 e1a01008 e1a02005 ..Z.......... ..10-07 17:09:39.459: I/DEBUG(1960): 5e7d347c e1a03007 e58da000 e58d9004 eb003582 .0...........5..10-07 17:09:39.459: I/DEBUG(1960): 5e7d348c e1a00006 e28dd008 e8bd87f0 e5943494 .............4..10-07 17:09:39.459: I/DEBUG(1960): 5e7d349c e3530000 1a000001 e3e06002 eafffff7 ..S......`......10-07 17:09:39.459: I/DEBUG(1960): 5e7d34ac e594c498 e35c0000 1affffcc e3e06002 ......\......`..10-07 17:09:39.459: I/DEBUG(1960): memory map around fault addr c1bb2540:10-07 17:09:39.459: I/DEBUG(1960): be9f0000-bea11000 [stack]10-07 17:09:39.459: I/DEBUG(1960): (no map for address)10-07 17:09:39.459: I/DEBUG(1960): ffff0000-ffff1000 [vectors]10-07 17:09:39.729: I/DEBUG(1960): !@dumpstate -k -t -z -d -o /data/log/dumpstate_app_native -m 17832
Modifying Creation Time of AR Camera Crashes
Which Unity version are you using, and is this occuring in an initial Vuforia scene or when navigating into a Vuforia scene?
Modifying Creation Time of AR Camera Crashes
I'm using 4.2.1f4. Only one scene, just instantiating a prefab with the camera, or enabling the camera, or changing RenderVideoBackground.
Thank you!
Wally
Modifying Creation Time of AR Camera Crashes
Thanks for the thorough report. Let us look into this. In the interim, have you tried disabling the QCARBehaviour on the ARCamera to achieve what you're attempting? That will shut down the tracker and also background rendering.
Modifying Creation Time of AR Camera Crashes
Thanks, David.
Starting the app with the object in scene, but QCARBehaviour disabled, then enabling it, causes a crash.
Starting the app with the object in scene, with QCARBehaviour enabled, but then disabling it off of Start, and later reenabling it, causes a crash.
Modifying Creation Time of AR Camera Crashes
Hi wallyyoung,
could you test using this script (just create a new project with an empty scene and attach an ARCamera, then attach this script to the ARCamera):
Modifying Creation Time of AR Camera Crashes
Modifying Creation Time of AR Camera Crashes
Thanks for the reply, Alessandro. I've tried just enabling/disabling QCARBehaviour before, but gave it a second go. This script works fine on an iPad Mini on iOS 7.
Modifying Creation Time of AR Camera Crashes
Also, Nexus 4 does not crash, however it does not get the camera. The interesting part of the log is as follows:
Modifying Creation Time of AR Camera Crashes
Uninstalled / restarted device, and went back to my ARCamera prefab, which shouldn't be any different from Vuforia's bundled. Works. But I'm still probably not allowed to start the camera later.
Modifying Creation Time of AR Camera Crashes
Also, in the method which causes the camera to work, pausing the app and resuming causes the app to be black, then crash.
EDIT: Changing the GL ES version to 1.x seems to fix the crash, however that's a hit for flexibility. This has fixed all of my issues.
Modifying Creation Time of AR Camera Crashes
Good to hear that you found a workaround by using OpenGL ES 1.1.
However, just wondering if this issue is only observed on the Nexus 4; have you tried on other devices (using OpenGL ES 2.0) and have you observed the same ?
Modifying Creation Time of AR Camera Crashes
Nexus 4 has displayed this in more than one project now. The Galaxy Note II has also been seen to have this error. Devices like the Nexus 7 do not. I can get you a trace from the GPU if you'd like.
Modifying Creation Time of AR Camera Crashes
Yes, thanks, if you can provide a GPU trace that might help understanding what goes wrong.
Modifying Creation Time of AR Camera Crashes
Got them, thank you.
I would have one more request: if you have any chance to use Unity 4.1.5, could you try to see if you can reproduce the same issue on 4.1.5 (using GL ES 2.0) ?