I am having a crash only on one specific scene in my AR Foundation Unity build with the following error.
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000020 VM Region Info: 0x20 is not in any region. Bytes before following region: 4362387424 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START
__TEXT 10404c000-104050000 [ 16K] r-x/r-x SM=COW …lycoroTestApp
Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [5380] Triggered by Thread: 28
Thread 28 name: Thread 28 Crashed: 0 libobjc.A.dylib 0x0000000195ac5ac0 objc_retain + 16 (objc-object.h:636) 1 UnityFramework 0x00000001066d5320 TexturesMetal::AddCreatedTexture(TextureID, id, bool) + 32 (TexturesMetal.mm:481) 2 UnityFramework 0x0000000106634828 GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) + 21972 (GfxDeviceWorker.cpp:0) 3 UnityFramework 0x00000001066aa2ec GfxDeviceWorkerAutoreleasePoolProxy + 68 (GfxDeviceMetal.mm:5242) 4 UnityFramework 0x0000000106636bd0 GfxDeviceWorker::RunExt(ThreadedStreamBuffer&) + 92 (GfxDeviceWorker.cpp:389) 5 UnityFramework 0x0000000106636b68 GfxDeviceWorker::Run() + 156 (GfxDeviceWorker.cpp:373) 6 UnityFramework 0x000000010662ef70 GfxDeviceWorker::RunGfxDeviceWorker(void*) + 12 (GfxDeviceWorker.cpp:352) 7 UnityFramework 0x00000001062289f8 Thread::RunThreadWrapper(void*) + 496 (Thread.cpp:81) 8 libsystem_pthread.dylib 0x00000001c9777c74 _pthread_start + 288 (pthread.c:887) 9 libsystem_pthread.dylib 0x00000001c977c878 thread_start + 8
At first I thought it was because I was missing the Environmental Probe manager in that scene (no). Then I thought perhaps it was because I was using a specific shader that didn’t use a _MainTex. But I use that shader no problem in other working scenes.
And then I built the scene with only a simple primitive and my UI and still received this error. After that crash the scene did open successfully, but obviously the problem is still there. The UI is the exact same as the other working scenes.
I can’t find out much about this specific error: TexturesMetal::AddCreatedTexture - only that there may be this bug with GLES3 and PVRTC textures - but they aren’t present in the most recent build.
The scene works perfectly in Android - it only crashes in iOS.
Any ideas? Full report below.
Symbolicated Crash Report:
Incident Identifier: 737D5FE1-150B-408D-B8C9-92C9B64AD03C Hardware Model: iPad7,6 Process: PolycoroTestApp [5380] Path: /private/var/containers/Bundle/Application/D94E59DD-6182-4DB3-876C-0B6435E5864A/PolycoroTestApp.app/PolycoroTestApp Identifier: com.polycoro.app Version: 6 (4) AppStoreTools: 13F15 AppVariant: 1:iPad7,6:14 Beta: YES Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.polycoro.app [327]
Date/Time: 2022-05-22 20:40:45.2873 -0300 Launch Time: 2022-05-22 20:40:23.3315 -0300 OS Version: iPhone OS 14.8.1 (18H107) Release Type: User Baseband Version: 8.80.01 Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000020 VM Region Info: 0x20 is not in any region. Bytes before following region: 4362387424 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START
__TEXT 10404c000-104050000 [ 16K] r-x/r-x SM=COW …lycoroTestApp
Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [5380] Triggered by Thread: 28
Thread 0 name: Thread 0: 0 libsystem_platform.dylib 0x00000001c9767588 OSAtomicAdd64Barrier$VARIANT$mp + 8 1 UnityFramework 0x0000000105cdd140 MemoryManager::RegisterDeallocation(MemoryManager::AllocationLogDetails const&, BaseAllocator*) + 116 (MemoryManager.cpp:2522) 2 UnityFramework 0x0000000105cda0c4 MemoryManager:
eallocate(void*, MemLabelId const&, char const*, int) + 300 (MemoryManager.cpp:1937) 3 UnityFramework 0x0000000105cd60a4 operator delete(void*) + 52 (MemoryManager.cpp:270) 4 UnityFramework 0x0000000106b8d148 std::__1::_DeallocateCaller::__do_call(void*) + 8 (new:334) 5 UnityFramework 0x0000000106b8d148 std::__1::_DeallocateCaller::__do_deallocate_handle_size(void*, unsigned long) + 8 (new:292) 6 UnityFramework 0x0000000106b8d148 std::__1::_DeallocateCaller::__do_deallocate_handle_size_align(void*, unsigned long, unsigned long) + 8 (new:262) 7 UnityFramework 0x0000000106b8d148 std::__1::__libcpp_deallocate(void*, unsigned long, unsigned long) + 8 (new:340) 8 UnityFramework 0x0000000106b8d148 std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, int>, void*> >::deallocate(std::__1::__h… + 8 (memory:1816) 9 UnityFramework 0x0000000106b8d148 std::__1::allocator_traits<std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, int>, void*> … + 8 (memory:1554) 10 UnityFramework 0x0000000106b8d148 std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, int>, std::__1::__unordered_map_hasher<std::__1::basic_stri… + 48 (__hash_table:1601) 11 UnityFramework 0x0000000106b8d0f8 std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, int>, std::__1::__unordered_map_hasher<std::__1::basic_stri… + 24 (__hash_table:1539) 12 UnityFramework 0x0000000106b896b4 std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, int>, std::__1::__unordered_map_hasher<std::__1::basic_stri… + 4 (__hash_table:1531) 13 UnityFramework 0x0000000106b896b4 std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, int, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits, std::__1… + 8 (unordered_map:968) 14 UnityFramework 0x0000000106b896b4 std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, int, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits, std::__1… + 8 (unordered_map:966) 15 UnityFramework 0x0000000106b896b4 (anonymous namespace)::ARKitXRHumanBodyProvider::~ARKitXRHumanBodyProvider() + 56 (ARKitXRHumanBodyProvider.mm:441) 16 UnityFramework 0x0000000106b896b4 (anonymous namespace)::ARKitXRHumanBodyProvider::~ARKitXRHumanBodyProvider() + 56 (ARKitXRHumanBodyProvider.mm:439) 17 UnityFramework 0x0000000106b896b4 Singleton<(anonymous namespace)::ARKitXRHumanBodyProvider>:
estroy() + 68 (Singleton.h:21) 18 UnityFramework 0x0000000106b896b4 UnityARKit_HumanBodyProvider_Destruct + 104 (ARKitXRHumanBodyProvider.mm:223) 19 UnityFramework 0x0000000107da1dd8 XRLoaderHelper_DestroySubsystem_TisXRHumanBodySubsystem_t71FBF94503DCE781657FA4F362464EA389CD9F2B_mCCDC945F782D622FA46348FCC043F97214C45ACD(XRLoaderHelper_t37A55C343AC31D25BB3EBD203DABFA357F51C013*… + 8 (Unity.XR.ARKit.cpp:13869) 20 UnityFramework 0x0000000107da1dd8 ARKitLoader_Deinitialize_m311305E2E4C25A008BAE146CFF1F6C3E1349D7C8 + 368 (Unity.XR.ARKit.cpp:18762) 21 UnityFramework 0x0000000107dbfef8 VirtFuncInvoker0::Invoke(unsigned short, Il2CppObject*) + 12 (Unity.XR.Management.cpp:22) 22 UnityFramework 0x0000000107dbfef8 XRManagerSettings_DeinitializeLoader_m6AD4F079818DF78946C99AD8D49E3D343DAAF290 + 168 (Unity.XR.Management.cpp:3954) 23 UnityFramework 0x0000000106e076b0 LoadScene21_ManageScene_m49ABF3F248311CCD4BC7DC4BE373F07C66CE784E + 132 (Assembly-CSharp8.cpp:32704) 24 UnityFramework 0x0000000107e2075c UnityAction_Invoke_mFFF1FFE59D8285F8A81350E6D5C4D791F44F6AC9 + 276 25 UnityFramework 0x0000000107e20e94 UnityEvent_Invoke_mDA46AA9786AD4C34211C6C6ADFB0963DFF430AF5 + 384 26 UnityFramework 0x00000001070aa6f4 EventFunction_1_Invoke_mABDD3477D1119860783D5F9F20AB8E9996113F2D_gshared + 424 27 UnityFramework 0x0000000106f65c64 ExecuteEvents_Execute_TisRuntimeObject_m20F4B1FD39A6BA916CF0A469A0D71DE4DC727B26_gshared + 356 (GenericMethods9.cpp:30346) 28 UnityFramework 0x0000000107ea0690 ExecuteEvents_Execute_TisIPointerClickHandler_t57AF4E82BAF414DDFD2F2D4E7833C97AE881591A_m008259182237138FF111EC7A20CE559CBE1B67C2(GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319*, BaseEventDat… + 12 (UnityEngine.UI3.cpp:12503) 29 UnityFramework 0x0000000107ea0690 StandaloneInputModule_ProcessTouchPress_m1ACFC2288CC51BD8C85C6894994923B1762B0B49 + 1140 (UnityEngine.UI3.cpp:22180) 30 UnityFramework 0x0000000107e9fd8c StandaloneInputModule_ProcessTouchEvents_m2C06F4FED9D3F300031E889330180C5004034DBA + 252 (UnityEngine.UI3.cpp:21729) 31 UnityFramework 0x0000000107e9fac0 StandaloneInputModule_Process_mEA8D89C754B958916467AEB75592670B15519D98 + 60 (UnityEngine.UI3.cpp:21579) 32 UnityFramework 0x00000001058ecc34 RuntimeInvoker_TrueVoid_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5(void ()(), MethodInfo const, void*, void**) + 20 (Il2CppInvokerTable.cpp:112887) 33 UnityFramework 0x0000000106b40994 il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) + 116 (Runtime.cpp:568) 34 UnityFramework 0x00000001062d6244 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) + 124 (ScriptingApi_Il2Cpp.cpp:292) 35 UnityFramework 0x00000001062e5444 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) + 140 (ScriptingInvocation.cpp:273) 36 UnityFramework 0x00000001062f4de4 Invoke + 20 (ScriptingInvocation.h:68) 37 UnityFramework 0x00000001062f4de4 CallMethodIfAvailable + 68 (MonoBehaviour.cpp:418) 38 UnityFramework 0x00000001062f4de4 MonoBehaviour::CallUpdateMethod(int) + 272 (MonoBehaviour.cpp:517) 39 UnityFramework 0x0000000105e59930 UpdateBehaviour + 12 (Behaviour.cpp:178) 40 UnityFramework 0x0000000105e59930 void BaseBehaviourManager::CommonUpdate() + 228 (Behaviour.cpp:156) 41 UnityFramework 0x0000000105e597f8 BehaviourManager::Update() + 36 (Behaviour.cpp:173) 42 UnityFramework 0x000000010602c754 InitPlayerLoopCallbacks()::UpdateScriptRunBehaviourUpdateRegistrator::Forward() + 76 (Player.cpp:1578) 43 UnityFramework 0x0000000106023528 ExecutePlayerLoop(NativePlayerLoopSystem*) + 100 (PlayerLoop.cpp:383) 44 UnityFramework 0x000000010602358c ExecutePlayerLoop(NativePlayerLoopSystem*) + 200 (PlayerLoop.cpp:404) 45 UnityFramework 0x00000001060238a4 PlayerLoop() + 292 (PlayerLoop.cpp:504) 46 UnityFramework 0x00000001066de3c0 UnityPlayerLoopImpl(bool) + 316 (LibEntryPoint.mm:0) 47 UnityFramework 0x0000000105818714 UnityRepaint + 12 (UnityAppController+Rendering.mm:230) 48 UnityFramework 0x0000000105818714 -[UnityAppController(Rendering) repaint] + 108 (UnityAppController+Rendering.mm:90) 49 UnityFramework 0x000000010581867c -[UnityAppController(Rendering) repaintDisplayLink] + 108 (UnityAppController+Rendering.mm:71) 50 QuartzCore 0x0000000184dfa200 CA:
isplay:
isplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 676 (CADisplay.mm:2646) 51 IOKit 0x000000018c2e50f8 IODispatchCalloutFromCFMessage + 376 (IOKitLib.c:1669) 52 CoreFoundation 0x0000000181c85bf4 __CFMachPortPerform + 172 (CFMachPort.c:537) 53 CoreFoundation 0x0000000181ca97e8 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 56 (CFRunLoop.c:1991) 54 CoreFoundation 0x0000000181ca8bec __CFRunLoopDoSource1 + 588 (CFRunLoop.c:2131) 55 CoreFoundation 0x0000000181ca2d60 __CFRunLoopRun + 2376 (CFRunLoop.c:3146) 56 CoreFoundation 0x0000000181ca1ed0 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3242) 57 GraphicsServices 0x00000001983ed570 GSEventRunModal + 160 (GSEvent.c:2259) 58 UIKitCore 0x00000001845cf2d0 -[UIApplication _run] + 1052 (UIApplication.m:3269) 59 UIKitCore 0x00000001845d484c UIApplicationMain + 164 (UIApplication.m:4740) 60 UnityFramework 0x0000000105818160 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 108 (main.mm:96) 61 PolycoroTestApp 0x0000000104053e1c main + 68 (main.mm:26) 62 libdyld.dylib 0x0000000181980140 start + 4
Thread 1 name:
Thread 28 name: Thread 28 Crashed: 0 libobjc.A.dylib 0x0000000195ac5ac0 objc_retain + 16 (objc-object.h:636) 1 UnityFramework 0x00000001066d5320 TexturesMetal::AddCreatedTexture(TextureID, id, bool) + 32 (TexturesMetal.mm:481) 2 UnityFramework 0x0000000106634828 GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) + 21972 (GfxDeviceWorker.cpp:0) 3 UnityFramework 0x00000001066aa2ec GfxDeviceWorkerAutoreleasePoolProxy + 68 (GfxDeviceMetal.mm:5242) 4 UnityFramework 0x0000000106636bd0 GfxDeviceWorker::RunExt(ThreadedStreamBuffer&) + 92 (GfxDeviceWorker.cpp:389) 5 UnityFramework 0x0000000106636b68 GfxDeviceWorker::Run() + 156 (GfxDeviceWorker.cpp:373) 6 UnityFramework 0x000000010662ef70 GfxDeviceWorker::RunGfxDeviceWorker(void*) + 12 (GfxDeviceWorker.cpp:352) 7 UnityFramework 0x00000001062289f8 Thread::RunThreadWrapper(void*) + 496 (Thread.cpp:81) 8 libsystem_pthread.dylib 0x00000001c9777c74 _pthread_start + 288 (pthread.c:887) 9 libsystem_pthread.dylib 0x00000001c977c878 thread_start + 8