artoolkitx / arunityx

artoolkitX for Unity, providing high-performance video acquisition, marker and texture tracking and full Unity Editor support
https://www.artoolkitx.org/
Other
41 stars 22 forks source link

SimpleNFTScene for IOS crashes out of the box #75

Closed gravyday closed 1 year ago

gravyday commented 1 year ago

Hi! We have an app that works using NFT markers in ARtoolkit5 and I am investigating the upgrade to ARtoolkitX.

I followed the Quick Start and I'm finding a crash when running the SimpleNFTScene natively on IOS.

Might be a problem with libjpeg as the fatal error seems to come from reading the example image: gibraltar.jpg. The crux of the error seems to be 'Error reading JPEG file: JPEG parameter struct mismatch: library thinks size is 600, caller expects 632'. (Full log is below)

Perhaps I am doing something wrong or I have a library config problem but this is a scratch build with provided sample scene and marker named "gibraltar" and no outside code. Any help is appreciated. Thanks!

Using:

Steps to Reproduce:

2023-05-31 22:15:24.859527-0700 SMTest1[91014:30639178] Built from '2021.3/staging' branch, Version '2021.3.0f1 (6eacc8284459)', Build type 'Release', Scripting Backend 'il2cpp'
2023-05-31 22:15:24.860145-0700 SMTest1[91014:30639178] MemoryManager: Using 'Default' Allocator.
[UnityMemory] Configuration Parameters - Can be set up in boot.config
    "memorysetup-bucket-allocator-granularity=16"
    "memorysetup-bucket-allocator-bucket-count=8"
    "memorysetup-bucket-allocator-block-size=4194304"
    "memorysetup-bucket-allocator-block-count=1"
    "memorysetup-main-allocator-block-size=16777216"
    "memorysetup-thread-allocator-block-size=16777216"
    "memorysetup-gfx-main-allocator-block-size=16777216"
    "memorysetup-gfx-thread-allocator-block-size=16777216"
    "memorysetup-cache-allocator-block-size=4194304"
    "memorysetup-typetree-allocator-block-size=2097152"
    "memorysetup-profiler-bucket-allocator-granularity=16"
    "memorysetup-profiler-bucket-allocator-bucket-count=8"
    "memorysetup-profiler-bucket-allocator-block-size=4194304"
    "memorysetup-profiler-bucket-allocator-block-count=1"
    "memorysetup-profiler-allocator-block-size=16777216"
    "memorysetup-profiler-editor-allocator-block-size=1048576"
    "memorysetup-temp-allocator-size-main=4194304"
    "memorysetup-job-temp-allocator-block-size=2097152"
    "memorysetup-job-temp-allocator-block-size-background=1048576"
    "memorysetup-job-temp-allocator-reduction-small-platforms=262144"
    "memorysetup-temp-allocator-size-background-worker=32768"
    "memorysetup-temp-allocator-size-job-worker=262144"
    "memorysetup-temp-allocator-size-preload-manager=262144"
    "memorysetup-temp-allocator-size-nav-mesh-worker=65536"
    "memorysetup-temp-allocator-size-audio-worker=65536"
    "memorysetup-temp-allocator-size-cloud-worker=32768"
    "memorysetup-temp-allocator-size-gfx=262144"
Thread Performance Checker: Thread running at QOS_CLASS_USER_INTERACTIVE waiting on a thread without a QoS class specified. Investigate ways to avoid priority inversions
PID: 91014, TID: 30639178
Backtrace
=================================================================
3   UnityFramework                      0x0000000108d667a8 _ZN12UnityClassic31Baselib_SystemSemaphore_AcquireENS_30Baselib_SystemSemaphore_HandleE + 28
4   UnityFramework                      0x00000001088f565c _ZN9AGCThreadC2Ev + 204
5   UnityFramework                      0x00000001088ef37c _ZN13AGCThreadPoolC2Ev + 148
6   UnityFramework                      0x00000001088f60dc _ZN29AssetGarbageCollectorInstanceC2Ev + 24
7   UnityFramework                      0x00000001089624dc _ZN17RuntimeStaticBase14InitializeImplEmPFPvS0_10MemLabelIdE + 88
8   UnityFramework                      0x000000010895f39c _ZN35RegisterRuntimeInitializeAndCleanup22ExecuteInitializationsEv + 220
9   UnityFramework                      0x00000001088f1904 _Z17RuntimeInitializev + 80
10  UnityFramework                      0x0000000108c9ebf4 UnityInitRuntime + 264
11  UnityFramework                      0x00000001087cafa4 -[UnityFramework frameworkWarmup:argv:] + 36
12  UnityFramework                      0x00000001087cafec -[UnityFramework runUIApplicationMainWithArgc:argv:] + 40
13  SMTest1                             0x0000000104a77ccc main + 60
14  dyld                                0x00000001cb2ac960 4B042F28-0D14-30EC-A1DE-3DBB10866AD7 + 88416
2023-05-31 22:15:25.047703-0700 SMTest1[91014:30639178] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
2023-05-31 22:15:25.047762-0700 SMTest1[91014:30639178] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
-> applicationDidFinishLaunching()

Setting UIViewControllerBasedStatusBarAppearance to NO is no longer supported.
Apple actively discourages that, and all application-wide methods of changing status bar appearance are deprecated

-> applicationDidBecomeActive()
GfxDevice: creating device client; threaded=1; jobified=1
Initializing Metal device caps: Apple A13 GPU
Initialize engine version: 2021.3.0f1 (6eacc8284459)
Thread Performance Checker: Thread running at QOS_CLASS_USER_INTERACTIVE waiting on a thread without a QoS class specified. Investigate ways to avoid priority inversions
PID: 91014, TID: 30639178
Backtrace
=================================================================
3   UnityFramework                      0x0000000108d667a8 _ZN12UnityClassic31Baselib_SystemSemaphore_AcquireENS_30Baselib_SystemSemaphore_HandleE + 28
4   UnityFramework                      0x0000000108a49584 _ZN15GfxDeviceClient22AcquireThreadOwnershipEv + 172
5   UnityFramework                      0x0000000108a3d61c _Z21CreateClientGfxDevice17GfxDeviceRenderer20GfxCreateDeviceFlags + 252
6   UnityFramework                      0x0000000108c0f4f4 _Z15CreateGfxDevice17GfxDeviceRenderer20GfxCreateDeviceFlags + 264
7   UnityFramework                      0x0000000108c0f58c _Z19InitializeGfxDevicev + 112
8   UnityFramework                      0x0000000108c9edac UnityInitApplicationGraphics + 20
9   UnityFramework                      0x00000001087c654c -[UnityAppController startUnity:] + 52
10  Foundation                          0x00000001a6d155a8 __NSFireDelayedPerform + 372
11  CoreFoundation                      0x00000001aca0132c 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 844588
12  CoreFoundation                      0x00000001ac9bd9a8 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 567720
13  CoreFoundation                      0x00000001ac961548 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 189768
14  CoreFoundation                      0x00000001ac9aefa0 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 507808
15  CoreFoundation                      0x00000001ac9b3eb0 CFRunLoopRunSpecific + 612
16  GraphicsServices                    0x00000001e6ba9368 GSEventRunModal + 164
17  UIKitCore                           0x00000001aeea9668 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 3806824
18  UIKitCore                           0x00000001aeea92cc UIApplicationMain + 340
19  UnityFramework                      0x00000001087cb020 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 92
20  SMTest1                             0x0000000104a77ccc main + 60
21  dyld                                0x00000001cb2ac960 4B042F28-0D14-30EC-A1DE-3DBB10866AD7 + 88416
Thread Performance Checker: Thread running at QOS_CLASS_USER_INTERACTIVE waiting on a thread without a QoS class specified. Investigate ways to avoid priority inversions
PID: 91014, TID: 30639178
Backtrace
=================================================================
3   UnityFramework                      0x0000000108d667a8 _ZN12UnityClassic31Baselib_SystemSemaphore_AcquireENS_30Baselib_SystemSemaphore_HandleE + 28
4   UnityFramework                      0x0000000108a41030 _ZN15GfxDeviceClient16CreateGpuProgramE20ShaderGpuProgramTypeRK13dynamic_arrayIhLm0EER22CreateGpuProgramOutput + 424
5   UnityFramework                      0x000000010894899c _ZN9ShaderLab10SubProgram7CompileERNS_15CompilationDataE + 568
6   UnityFramework                      0x0000000108949a84 _ZNK9ShaderLab7Program40EnsureCompiledAndMarkUnsupportedIfFailedEPKNS_10SubProgramEiRKN8keywords17LocalKeywordStateEPS5_R19ShaderSnippetResult + 168
7   UnityFramework                      0x0000000108949efc _ZNK9ShaderLab7Program21GetMatchingSubProgramEPK6ShaderPKNS_4PassERKN8keywords17LocalKeywordStateEjPS8_R19ShaderSnippetResult26AsyncShaderCompilationModebii + 888
8   UnityFramework                      0x00000001089423ac _ZNK9ShaderLab11ShaderState20FindSubProgramsToUseEPK6ShaderPKNS_4PassERNS_11SubProgramsERK17ShaderPassContextRKN8keywords17LocalKeywordStateEbii + 204
9   UnityFramework                      0x000000010893ff8c _ZNK9ShaderLab11ShaderState16ApplyShaderStateEjPK19ShaderPropertySheetRK17ShaderPassContextRKN8keywords17LocalKeywordStateEP6ShaderPNS_4PassEPbPNS_11SubProgramsEPK22DeviceRenderStateBlockii + 144
10  UnityFramework                      0x000000010893fea0 _ZN9ShaderLab4Pass9ApplyPassEjPK19ShaderPropertySheetR17ShaderPassContextRKN8keywords17LocalKeywordStateEP6ShaderiiPbPKNS_10GrabPassesEPNS_11SubProgramsEPK22DeviceRenderStateBlock + 160
11  UnityFramework                      0x000000010892aaa4 _Z26ApplyMaterialPassWithCacheRK18SharedMaterialDataR17ShaderPassContextP6ShaderPN9ShaderLab4PassEiibPKNS6_10GrabPassesEPNS6_11SubProgramsEPK22DeviceRenderStateBlock + 356
12  UnityFramework                      0x000000010891b93c _ZN8Material11SetPassFastEPN9ShaderLab4PassER17ShaderPassContextP6ShaderiibPNS0_11SubProgramsE + 276
13  UnityFramework                      0x000000010891baa8 _ZN8Material21SetPassSlowWithShaderEP6ShaderiR17ShaderPassContextib + 104
14  UnityFramework                      0x000000010891b9a8 _ZN8Material11SetPassSlowEiR17ShaderPassContextib + 72
15  UnityFramework                      0x0000000108898a20 _ZL8DrawQuadRK5RectTIfEfP7TextureRK10ColorRGBAfS2_ + 128
16  UnityFramework                      0x000000010889077c _Z16DrawSplashScreenb + 1568
17  UnityFramework                      0x00000001088f1f80 _ZL14RenderOverlaysi + 152
18  UnityFramework                      0x00000001088f1e34 _Z12PlayerRenderb + 832
19  UnityFramework                      0x00000001087cb514 UnityRepaint + 24
20  UnityFramework                      0x00000001087bf878 -[UnityAppController(ViewHandling) showGameUI] + 180
21  UnityFramework                      0x00000001087c657c -[UnityAppController startUnity:] + 100
22  Foundation                          0x00000001a6d155a8 __NSFireDelayedPerform + 372
23  CoreFoundation                      0x00000001aca0132c 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 844588
24  CoreFoundation                      0x00000001ac9bd9a8 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 567720
25  CoreFoundation                      0x00000001ac961548 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 189768
26  CoreFoundation                      0x00000001ac9aefa0 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 507808
27  CoreFoundation                      0x00000001ac9b3eb0 CFRunLoopRunSpecific + 612
28  GraphicsServices                    0x00000001e6ba9368 GSEventRunModal + 164
29  UIKitCore                           0x00000001aeea9668 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 3806824
30  UIKitCore                           0x00000001aeea92cc UIApplicationMain + 340
31  UnityFramework                      0x00000001087cb020 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 92
32  SMTest1                             0x0000000104a77ccc main + 60
33  dyld                                0x00000001cb2ac960 4B042F28-0D14-30EC-A1DE-3DBB10866AD7 + 88416
Thread Performance Checker: Thread running at QOS_CLASS_USER_INTERACTIVE waiting on a thread without a QoS class specified. Investigate ways to avoid priority inversions
PID: 91014, TID: 30639178
Backtrace
=================================================================
3   UnityFramework                      0x0000000108d667a8 _ZN12UnityClassic31Baselib_SystemSemaphore_AcquireENS_30Baselib_SystemSemaphore_HandleE + 28
4   UnityFramework                      0x0000000108a48944 _ZN15GfxDeviceClient21WaitForPendingPresentEv + 132
5   UnityFramework                      0x0000000108a48848 _ZN15GfxDeviceClient10BeginFrameEv + 60
6   UnityFramework                      0x00000001088f1bfc _Z12PlayerRenderb + 264
7   UnityFramework                      0x00000001087cb4ec -[UnityAppController(Rendering) repaint] + 84
8   UnityFramework                      0x00000001087bf884 -[UnityAppController(ViewHandling) showGameUI] + 192
9   UnityFramework                      0x00000001087c657c -[UnityAppController startUnity:] + 100
10  Foundation                          0x00000001a6d155a8 __NSFireDelayedPerform + 372
11  CoreFoundation                      0x00000001aca0132c 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 844588
12  CoreFoundation                      0x00000001ac9bd9a8 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 567720
13  CoreFoundation                      0x00000001ac961548 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 189768
14  CoreFoundation                      0x00000001ac9aefa0 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 507808
15  CoreFoundation                      0x00000001ac9b3eb0 CFRunLoopRunSpecific + 612
16  GraphicsServices                    0x00000001e6ba9368 GSEventRunModal + 164
17  UIKitCore                           0x00000001aeea9668 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 3806824
18  UIKitCore                           0x00000001aeea92cc UIApplicationMain + 340
19  UnityFramework                      0x00000001087cb020 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 92
20  SMTest1                             0x0000000104a77ccc main + 60
21  dyld                                0x00000001cb2ac960 4B042F28-0D14-30EC-A1DE-3DBB10866AD7 + 88416
2023-05-31 22:15:25.480267-0700 SMTest1[91014:30639178] Unbalanced calls to begin/end appearance transitions for <SplashScreenController: 0x10593e350>.
Thread Performance Checker: Thread running at QOS_CLASS_USER_INTERACTIVE waiting on a thread without a QoS class specified. Investigate ways to avoid priority inversions
PID: 91014, TID: 30639178
Backtrace
=================================================================
3   UnityFramework                      0x0000000108d667a8 _ZN12UnityClassic31Baselib_SystemSemaphore_AcquireENS_30Baselib_SystemSemaphore_HandleE + 28
4   UnityFramework                      0x0000000108a41030 _ZN15GfxDeviceClient16CreateGpuProgramE20ShaderGpuProgramTypeRK13dynamic_arrayIhLm0EER22CreateGpuProgramOutput + 424
5   UnityFramework                      0x000000010894899c _ZN9ShaderLab10SubProgram7CompileERNS_15CompilationDataE + 568
6   UnityFramework                      0x0000000108949a84 _ZNK9ShaderLab7Program40EnsureCompiledAndMarkUnsupportedIfFailedEPKNS_10SubProgramEiRKN8keywords17LocalKeywordStateEPS5_R19ShaderSnippetResult + 168
7   UnityFramework                      0x0000000108949efc _ZNK9ShaderLab7Program21GetMatchingSubProgramEPK6ShaderPKNS_4PassERKN8keywords17LocalKeywordStateEjPS8_R19ShaderSnippetResult26AsyncShaderCompilationModebii + 888
8   UnityFramework                      0x0000000108940828 _ZNK9ShaderLab4Pass21ComputePassValuesHashERKN8keywords17LocalKeywordStateEPK19ShaderPropertySheetP6Shaderii + 268
9   UnityFramework                      0x000000010891a650 _ZN8Material12UpdateHashesEP6ShaderR18SharedMaterialData + 252
10  UnityFramework                      0x000000010891a3b0 _ZN8Material15BuildPropertiesEb + 292
11  UnityFramework                      0x000000010891ae98 _ZN8Material13AwakeFromLoadE17AwakeFromLoadMode + 324
12  UnityFramework                      0x00000001089fc554 _ZN18AwakeFromLoadQueue34PersistentManagerAwakeSingleObjectER6Object17AwakeFromLoadMode + 52
13  UnityFramework                      0x00000001089ff3ac _ZN17PersistentManager48IntegrateObjectAndUnlockIntegrationMutexInternalEi + 48
14  UnityFramework                      0x00000001088fa980 _ZN27TimeSliceAwakeFromLoadQueue19IntegrateTimeSlicedEi + 360
15  UnityFramework                      0x00000001088fb89c _ZN18LoadSceneOperation19IntegrateTimeSlicedEi + 24
16  UnityFramework                      0x00000001088fcbd8 _ZN14PreloadManager26UpdatePreloadingSingleStepENS_21UpdatePreloadingFlagsEi + 104
17  UnityFramework                      0x00000001088fd5bc _ZN14PreloadManager16UpdatePreloadingEv + 276
18  UnityFramework                      0x0000000108c9f144 _ZL19UnityPlayerLoopImplb + 416
19  UnityFramework                      0x00000001087cb4ec -[UnityAppController(Rendering) repaint] + 84
20  UnityFramework                      0x00000001087cb47c -[UnityAppController(Rendering) repaintDisplayLink] + 76
21  QuartzCore                          0x00000001adffeca4 3F8EDDC2-623F-301F-BA1D-12976C8A60E9 + 167076
22  QuartzCore                          0x00000001ae0106f8 3F8EDDC2-623F-301F-BA1D-12976C8A60E9 + 239352
23  CoreFoundation                      0x00000001ac9ae7f4 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 505844
24  CoreFoundation                      0x00000001ac9cbcd0 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 625872
25  CoreFoundation                      0x00000001ac9cd8d8 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 633048
26  CoreFoundation                      0x00000001ac9af110 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 508176
27  CoreFoundation                      0x00000001ac9b3eb0 CFRunLoopRunSpecific + 612
28  GraphicsServices                    0x00000001e6ba9368 GSEventRunModal + 164
29  UIKitCore                           0x00000001aeea9668 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 3806824
30  UIKitCore                           0x00000001aeea92cc UIApplicationMain + 340
31  UnityFramework                      0x00000001087cb020 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 92
32  SMTest1                             0x0000000104a77ccc main + 60
33  dyld                                0x00000001cb2ac960 4B042F28-0D14-30EC-A1DE-3DBB10866AD7 + 88416
UnloadTime: 2.655500 ms
ARController: ARController.Awake())
ARController:Awake()

ARController: ARController.OnEnable()
ARController:OnEnable()

2023-05-31 22:15:29.857370-0700 SMTest1[91014:30639178] [info] artoolkitX v1.1.9 initalised.
ARController: artoolkitX version 1.1.9 initialised.
ARController: ARController.Start(): Application.isPlaying = True autoStart: True
ARController:Start()

ARController: Starting AR.
<StartAR>d__112:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
ARController:Start()

ARController: Render device: Metal, using Unity texturing.
<StartAR>d__112:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
ARController:Start()

ARController: Starting artoolkitX video with vconf '-module=AVFoundation -preset=medium'.
<StartAR>d__112:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
ARController:Start()

2023-05-31 22:15:29.877439-0700 SMTest1[91014:30639178] [info] Starting...
2023-05-31 22:15:29.877481-0700 SMTest1[91014:30639178] [info] Setting video configuration '-module=AVFoundation -preset=medium'.
2023-05-31 22:15:29.877493-0700 SMTest1[91014:30639178] [info] Opening artoolkitX video using configuration '-module=AVFoundation -preset=medium'.
2023-05-31 22:15:29.877575-0700 SMTest1[91014:30639178] [info] Using supplied video config "-module=AVFoundation -preset=medium".
2023-05-31 22:15:29.877632-0700 SMTest1[91014:30639178] [info] Requesting capture session preset 'medium'.
Thread Performance Checker: -[AVCaptureSession startRunning] should be called from background thread. Calling it on the main thread can lead to UI unresponsiveness
PID: 91014, TID: 30639178
Backtrace
=================================================================
3   UnityFramework                      0x000000010953a5d0 zipClose2_64 + 5096
4   UnityFramework                      0x000000010953e624 ar2VideoOpenAsyncAVFoundation + 4344
5   UnityFramework                      0x0000000109547028 ar2VideoOpenAsync + 188
6   UnityFramework                      0x00000001094e5234 _ZN13ARVideoSource4openEv + 116
7   UnityFramework                      0x00000001094d8ffc _ZN12ARController12startRunningEPKcS1_S1_l + 128
8   UnityFramework                      0x00000001095d5418 ARX_pinvoke_arwStartRunningB_m0A4F0465540CB0DC87B61E5D6C7CDC2AD17D6F7D + 52
9   UnityFramework                      0x00000001095cc6c8 U3CStartARU3Ed__112_MoveNext_mB4F0D4D6FEDDBB31EB2AAA8373A16189B51794C1 + 2104
10  UnityFramework                      0x000000010971e0b0 SetupCoroutine_InvokeMoveNext_m4C8B79D8A35F69EEECAA16C82793525E74D75CE9 + 204
11  UnityFramework                      0x00000001091549e8 _ZN6il2cpp2vm7Runtime15InvokeWithThrowEPK10MethodInfoPvPS5_ + 100
12  UnityFramework                      0x0000000109154830 _ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException + 84
13  UnityFramework                      0x00000001089aa254 _Z23scripting_method_invoke18ScriptingMethodPtr18ScriptingObjectPtrR18ScriptingArgumentsP21ScriptingExceptionPtrb + 112
14  UnityFramework                      0x00000001089b5cec _ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb + 120
15  UnityFramework                      0x00000001089c2fb4 _ZN9Coroutine14InvokeMoveNextEP21ScriptingExceptionPtr + 168
16  UnityFramework                      0x00000001089c2b68 _ZN9Coroutine3RunEPb + 52
17  UnityFramework                      0x00000001089c4dac _ZN13MonoBehaviour24TryCreateAndRunCoroutineE18ScriptingObjectPtr18ScriptingMethodPtrPP9Coroutine + 344
18  UnityFramework                      0x00000001089c520c _ZN13MonoBehaviour22StartCoroutineManaged2E18ScriptingObjectPtr + 80
19  UnityFramework                      0x000000010881f224 _Z43MonoBehaviour_CUSTOM_StartCoroutineManaged2P37ScriptingBackendNativeObjectPtrOpaqueS0_ + 128
20  UnityFramework                      0x00000001095c3ce4 ARController_Start_mBDA280B9DE58B21F3302869F5C7F505C4133CB3E + 248
21  UnityFramework                      0x00000001091549e8 _ZN6il2cpp2vm7Runtime15InvokeWithThrowEPK10MethodInfoPvPS5_ + 100
22  UnityFramework                      0x0000000109154830 _ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException + 84
23  UnityFramework                      0x00000001089aa254 _Z23scripting_method_invoke18ScriptingMethodPtr18ScriptingObjectPtrR18ScriptingArgumentsP21ScriptingExceptionPtrb + 112
24  UnityFramework                      0x00000001089b5cec _ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb + 120
25  UnityFramework                      0x00000001089c5b48 _ZN13MonoBehaviour30InvokeMethodOrCoroutineCheckedE18ScriptingMethodPtr18ScriptingObjectPtrP21ScriptingExceptionPtr + 2012
26  UnityFramework                      0x00000001089c5ccc _ZN13MonoBehaviour30InvokeMethodOrCoroutineCheckedE18ScriptingMethodPtr18ScriptingObjectPtr + 84
27  UnityFramework                      0x00000001089c6550 _ZN13MonoBehaviour16DelayedStartCallEP6ObjectPv + 56
28  UnityFramework                      0x0000000108864a70 _ZN18DelayedCallManager6UpdateEi + 536
29  UnityFramework                      0x00000001088f2fac _Z17ExecutePlayerLoopP22NativePlayerLoopSystem + 100
30  UnityFramework                      0x00000001088f2fec _Z17ExecutePlayerLoopP22NativePlayerLoopSystem + 164
31  UnityFramework                      0x00000001088f3248 _Z10PlayerLoopv + 272
32  UnityFramework                      0x0000000108c9f014 _ZL19UnityPlayerLoopImplb + 112
33  UnityFramework                      0x00000001087cb4ec -[UnityAppController(Rendering) repaint] + 84
34  UnityFramework                      0x00000001087cb47c -[UnityAppController(Rendering) repaintDisplayLink] + 76
35  QuartzCore                          0x00000001adffeca4 3F8EDDC2-623F-301F-BA1D-12976C8A60E9 + 167076
36  QuartzCore                          0x00000001ae0106f8 3F8EDDC2-623F-301F-BA1D-12976C8A60E9 + 239352
37  CoreFoundation                      0x00000001ac9ae7f4 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 505844
38  CoreFoundation                      0x00000001ac9cbcd0 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 625872
39  CoreFoundation                      0x00000001ac9cd8d8 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 633048
40  CoreFoundation                      0x00000001ac9af110 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 508176
41  CoreFoundation                      0x00000001ac9b3eb0 CFRunLoopRunSpecific + 612
42  GraphicsServices                    0x00000001e6ba9368 GSEventRunModal + 164
43  UIKitCore                           0x00000001aeea9668 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 3806824
44  UIKitCore                           0x00000001aeea92cc UIApplicationMain + 340
45  UnityFramework                      0x00000001087cb020 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 92
46  SMTest1                             0x0000000104a77ccc main + 60
47  dyld                                0x00000001cb2ac960 4B042F28-0D14-30EC-A1DE-3DBB10866AD7 + 88416
ARController: Setting artoolkitX tracking settings.
<StartAR>d__112:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
ARController:Start()

AROrigin: Found 1 trackables eligible to become base trackable.
AROrigin:FindTrackables()

ARController: UpdateAR: Waiting for artoolkitX video.
ARController:UpdateAR()

2023-05-31 22:15:30.261909-0700 SMTest1[91014:30639178] [info] Waiting for video source.
2023-05-31 22:15:30.262827-0700 SMTest1[91014:30639178] [info] Loading '/private/var/containers/Bundle/Application/CD59883A-C379-42B2-BE15-2F02E2A96805/SMTest1.app/Data/Raw/gibraltar.fset'.
2023-05-31 22:15:30.262905-0700 SMTest1[91014:30639178] [info] 
### Surface No.1 ###
2023-05-31 22:15:30.262918-0700 SMTest1[91014:30639178] [info]   Read ImageSet.
2023-05-31 22:15:30.263428-0700 SMTest1[91014:30639178] [info] Imageset contains 7 images.
2023-05-31 22:15:30.263564-0700 SMTest1[91014:30639178] [error] Error reading JPEG file: JPEG parameter struct mismatch: library thinks size is 600, caller expects 632
2023-05-31 22:15:30.263642-0700 SMTest1[91014:30639178] [warning] Falling back to reading '/private/var/containers/Bundle/Application/CD59883A-C379-42B2-BE15-2F02E2A96805/SMTest1.app/Data/Raw/gibraltar.iset' in ARToolKit v4.x format.
2023-05-31 22:15:30.263694-0700 SMTest1[91014:30639178] [error] Out of memory!!
2023-05-31 22:15:30.264242-0700 SMTest1[91014:30639373] [client] No error handler for XPC error: Connection invalid
philip-lamb commented 1 year ago

It's definitely an issue where the wrong version of libjpeg is being picked up during the build, as I struck this identical problem a few versions back. How this has occurred is the question. I'll see if I can reproduce the issue.

gravyday commented 1 year ago

Ok, I figured out how to fix it on my local build. In Short, I went and found the libjpeg that is included in this codebase (/Source/Extras/artoolkitx/Source/depends/ios/lib/libjpeg.a) and dropped it in my Assets folder of my Unity project. Then linked it in the UnityFramework libraries in my Xcode build. It must come before libiphone-lib.a.

Here is a more detailed description:

The sample scene runs on my device flawlessly now.

Hope this helps! I think I will have to do something similar to get it working on Android now.

philip-lamb commented 1 year ago

Thanks for the reporting on this. If Unity are exposing libjpeg symbols in their libiphone-lib.a, that is annoying. Still, artoolkitX's libARX.a is supposed to have a single-object prelink step so that the jpeg symbols are already resolved, so it shouldn't have mattered. I'm investigating now...

philip-lamb commented 1 year ago

This will be picked up in artoolkitX for Unity v1.1.11.