arfoundation-samples
arfoundation-samples copied to clipboard
[Bug] ARFoundation on iOS crashes randomly
My application is crashing at random times when using Unity + ArFoundation (Unity 2021.3.23, ARFoundation 4.2.1, iOS 15.1). It happens 5 to 60 minutes after launching the application. Even when tablet is just laying on the table. Is there anything that I can do to prevent this. It looks like it's something internal in ARKit library. The stacktrace looks almost every time like this:
Incident Identifier: CE070608-F00B-4D9B-A87A-3ED77478057E
CrashReporter Key: c3b63988ad0fc60f6a6e6754471c2eba00025ebe
Hardware Model: iPad11,6
Process: AREscape [13803]
Path: /private/var/containers/Bundle/Application/313401B0-2B1A-4C92-B02C-59DDE3403CB1/AREscape.app/AREscape
Identifier: com.MedwaySp.zo.o..AREscape
Version: 0.1.4 (4)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.MedwaySp.zo.o..AREscape [414]
Date/Time: 2022-04-21 13:42:38.5620 +0200
Launch Time: 2022-04-21 13:19:32.4175 +0200
OS Version: iPhone OS 15.1 (19B74)
Release Type: User
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 60
Application Specific Information:
abort() called
Code (CSharp):
Thread 60 name: Dispatch queue: SurfaceDetectionNode_Scheduler
Thread 60 Crashed:
0 libsystem_kernel.dylib 0x1bab75964 __pthread_kill + 8
1 libsystem_pthread.dylib 0x1f3a9c378 pthread_kill + 268
2 libsystem_c.dylib 0x18f743f50 abort + 164
3 AppleCV3D 0x1c4db857c 0x1c4b69000 + 2422140
4 AppleCV3D 0x1c4db8834 0x1c4b69000 + 2422836
5 AppleCV3D 0x1c61d3c04 0x1c4b69000 + 23505924
6 libdispatch.dylib 0x184578660 _dispatch_client_callout + 20
7 libdispatch.dylib 0x18457fec4 _dispatch_lane_serial_drain + 896
8 libdispatch.dylib 0x18458098c _dispatch_lane_invoke + 444
9 libdispatch.dylib 0x184581c74 _dispatch_workloop_invoke + 1796
10 libdispatch.dylib 0x18458b1a8 _dispatch_workloop_worker_thread + 656
11 libsystem_pthread.dylib 0x1f3a960f4 _pthread_wqthread + 288
12 libsystem_pthread.dylib 0x1f3a95e94 start_wqthread + 8
Please file a bug. https://unity3d.com/unity/qa/bug-reporting
Hi, your stack trace looks different, but as it's a quick test, you could try to disable Multithreaded Rendering in Player Settings.
It worked around random crashes with the current versions, that we experienced from (what seems to be) a regressed bug described here: https://github.com/Unity-Technologies/arfoundation-samples/issues/95
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
We have not seen this issue in our internal testing. As requested by @andyb-unity, can you file a bug with a project that can reproduce this issue? https://unity3d.com/unity/qa/bug-reporting
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing this issue due to lack of response. As suggested above, you could try disabling the Multithreaded Rendering in Player Settings. Since Unity cannot reproduce it, you will need to file a bug (https://unity3d.com/unity/qa/bug-reporting) for Unity to investigate this further.
Feel free to re-open the issue if you have further questions.
Since nobody else bothered to do it, I have reported this issue being caused by MultiThreaded Rendering at Unity Bug: IN-35599 - [AR Foundation] MultiThreaded Rendering crash AR Foundation when enable/disable AR Session on iOS+Android
Forum post: https://forum.unity.com/threads/multithreaded-rendering-crash-ar-foundation-when-enable-disable-ar-session.1413507/