A sample of Unity crashes in iOS.


#1

I read “StructureUnityAR-Getting-Started.pdf” and installed “StructureUnityAR” in iPhone.

The application starts, but I connect StructureSensor, and application crashes when I tap “Scan” button.

This happens in “BallPyhsics”, “Fetch”, all of “Simple”.

Can you think of any reasons?
Please advise me.

I test it by the following constitution
Structure SDK:0.6
iPhone6:iOS9.0.2
OSX:10.10.5
Xcode:7.2
Unity:5.3.5f1


#2

Hi @alt3,

I just upgraded to Unity 5.3.5f1 and tested the 0.6 SDK Fetch sample. I did not experience the reported crash when scanning.

The test was run on an iPad Air 2 running iOS 9.3.2. XCode 7.3.1.

You mentioned following the Getting-Started. Please double-check that the only available Graphics API is OpenGLES2.

-jim


#3

Hey! I can confirm the crash. It’s coming from the StructureAR library

Happens quite often and correlates with the scanning volume not being rendered.

Here’s the error

[StructureSDK] Throwing exception STInvalidInitialPoseException: The initial pose is incorrect and has a NAN determinant.
2016-12-12 10:39:30.704 StructureRnD[1306:1055327] Uncaught exception: STInvalidInitialPoseException: The initial pose is incorrect and has a NAN determinant.
(
	0   CoreFoundation                      0x00000001863c8f60 <redacted> + 148
	1   libobjc.A.dylib                     0x000000019b03bf80 objc_exception_throw + 56
	2   StructureRnD                        0x0000000100d57dd8 _ZN6il2cpp2vm10WaitHandle17GetPlatformHandleEP16Il2CppWaitHandle + 77908
	3   StructureRnD                        0x0000000100d4bc34 _ZN6il2cpp2vm10WaitHandle17GetPlatformHandleEP16Il2CppWaitHandle + 28336
	4   StructureRnD                        0x00000001004558e4 -[StructureAR enterScanningState] + 156
	5   StructureRnD                        0x0000000100456f34 _startScanning + 56
	6   StructureRnD                        0x00000001000b5768 Manager_HandleButtonClickedEvent_m497237532 + 444
	7   StructureRnD                        0x00000001002372ec InvokableCallList_Invoke_m575840373 + 264
	8   StructureRnD                        0x00000001003da35c ExecuteEvents_Execute_TisIl2CppObject_m1533897725_gshared + 836
	9   StructureRnD                        0x00000001001f1e78 StandaloneInputModule_ProcessTouchPress_m2953705401 + 960
	10  StructureRnD                        0x00000001001f1a04 StandaloneInputModule_ProcessTouchEvents_m3567487943 + 312
	11  StructureRnD                        0x00000001001f128c StandaloneInputModule_Process_m3720469665 + 116
	12  StructureRnD                        0x000000010042f67c _Z31RuntimeInvoker_Void_t2863195528PK10MethodInfoPvPS2_ + 28
	13  StructureRnD                        0x0000000100d3c990 _ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException + 68
	14  StructureRnD                        0x0000000100620b24 _ZN25ScriptingInvocationNoArgs6InvokeEPP18ScriptingException + 80
	15  StructureRnD                        0x0000000100620ac8 _ZN25ScriptingInvocationNoArgs6InvokeEv + 32
	16  StructureRnD                        0x0000000100613a34 _ZN13MonoBehaviour16CallUpdateMethodEi + 228
	17  StructureRnD                        0x00000001004db960 _ZN20BaseBehaviourManager12CommonUpdateI16BehaviourManagerEEvv + 72
	18  StructureRnD                        0x00000001005ce360 _Z10PlayerLoopbbP10IHookEvent + 1328
	19  StructureRnD                        0x0000000100858f24 _ZL19UnityPlayerLoopImplb + 20
	20  StructureRnD                        0x000000010008e57c UnityRepaint + 140
	21  StructureRnD                        0x0000000100454174 _Z21TriggerUnityRenderingv + 104
	22  StructureRnD                        0x00000001004540d4 -[StructureAR sensorDidOutputSynchronizedDepthFrame:colorFrame:] + 112
	23  StructureRnD                        0x0000000100d64fac _ZN6il2cpp2vm10WaitHandle17GetPlatformHandleEP16Il2CppWaitHandle + 131624
	24  Foundation                          0x00000001872f0374 <redacted> + 16
	25  Foundation                          0x00000001872431a0 <redacted> + 96
	26  Foundation                          0x00000001872333e8 <redacted> + 604
	27  Foundation                          0x00000001872f2768 <redacted> + 224
	28  libdispatch.dylib                   0x000000019b84d6a8 <redacted> + 16
	29  libdispatch.dylib                   0x000000019b852db0 _dispatch_main_queue_callback_4CF + 1844
	30  CoreFoundation                      0x00000001863801f8 <redacted> + 12
	31  CoreFoundation                      0x000000018637e060 <redacted> + 1628
	32  CoreFoundation                      0x00000001862acca0 CFRunLoopRunSpecific + 384
	33  GraphicsServices                    0x000000019132c088 GSEventRunModal + 180
	34  UIKit                               0x000000018b9c4ffc UIApplicationMain + 204
	35  StructureRnD                        0x00000001000883bc main + 156
	36  libdyld.dylib                       0x000000019b87e8b8 <redacted> + 4
)
2016-12-12 10:39:30.704 StructureRnD[1306:1055327] *** Terminating app due to uncaught exception 'STInvalidInitialPoseException', reason: 'The initial pose is incorrect and has a NAN determinant.'
*** First throw call stack:
(0x1863c8f48 0x19b03bf80 0x100d57dd8 0x100d4bc34 0x1004558e4 0x100456f34 0x1000b5768 0x1002372ec 0x1003da35c 0x1001f1e78 0x1001f1a04 0x1001f128c 0x10042f67c 0x100d3c990 0x100620b24 0x100620ac8 0x100613a34 0x1004db960 0x1005ce360 0x100858f24 0x10008e57c 0x100454174 0x1004540d4 0x100d64fac 0x1872f0374 0x1872431a0 0x1872333e8 0x1872f2768 0x19b84d6a8 0x19b852db0 0x1863801f8 0x18637e060 0x1862acca0 0x19132c088 0x18b9c4ffc 0x1000883bc 0x19b87e8b8)
libc++abi.dylib: terminating with uncaught exception of type NSException

#4

Are you on SDK 0.6.1? Which versions of Unity, XCode, iOS?

-Jim


#5

SDK 0.6.1, Unity 5.4.0f3, Xcode 7.3 and iOS 9.1


#6

@dylan,

Thanks for sharing the details.

-Jim


#7

@jim_selikoff Similar issue here but with unbounded tracking sample: app crashes when enabling tracking: Structure SDK v0.6.2, StructureUnityUBT, Barebones scene, Unity v5.4.2f2, XCode v8.2.1, iPad 4, iOS 10.1.1.

The same sample does not crash on iPad Air 2, iOS 10.1.1.


#8

Same issue on Xcode 9.2 ios 11.2 SDK 0.6.2 Unity 2017.2f3. Any resolution?


#9

@m111

The Unity packages for the 0.6.2 SDK are only available for the following versions of Unity:

5.1.3f1, 5.3.2p4, 5.3.3f1 & 5.3.4f1

Please download one of the above versions.