Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Native Crash - CollisionMeshData::Cleanup()

Discussion in 'iOS and tvOS' started by koshelev_unity, Jan 10, 2023.

  1. koshelev_unity

    koshelev_unity

    Joined:
    Mar 11, 2019
    Posts:
    5
    We have crashes in Crashlytics dashboard and unity console on iOS. But we can't reproduce them.
    Unity version: 2021.3.13f
    On the previous version 2020.3.26f, we did not have the error.

    Code (CSharp):
    1. Native Crash - CollisionMeshData::Cleanup() (/Users/bokken/build/output/unity/unity/Modules/Physics/CollisionMeshData.cpp:26)
    2.  
    3. Thread 23 (crashed)
    4. 0   UnityFramework                     0x0000000109e7d448 CollisionMeshData::Cleanup() (/Users/bokken/build/output/unity/unity/Modules/Physics/CollisionMeshData.cpp:26)
    5. 1   UnityFramework                     0x000000010a40f200 Mesh::~Mesh() (/Users/bokken/build/output/unity/unity/Runtime/Graphics/Mesh/Mesh.cpp:3412)
    6. 2   UnityFramework                     0x0000000109d17ee4 delete_object_internal_step2(Object*) (/Users/bokken/build/output/unity/unity/Runtime/BaseClasses/BaseObject.cpp:1081)
    7. 3   UnityFramework                     0x0000000109dd1748 BatchDeleteStep2Threaded(void*) (/Users/bokken/build/output/unity/unity/Runtime/Misc/BatchDeleteObjects.cpp:101)
    8. 4   UnityFramework                     0x0000000109e7a670 Thread::RunThreadWrapper(void*) (/Users/bokken/build/output/unity/unity/Runtime/Threads/Thread.cpp:82)
    9. 5   libsystem_pthread.dylib            0x00000001ddd6a348 <symbols missing for uuid: 9d142bffcae834649d2e72902c470641>
    10. 6   libsystem_pthread.dylib            0x00000001ddd68948 <symbols missing for uuid: 9d142bffcae834649d2e72902c470641>
     
    cknoll, wangyifu-lg, M-Ansley and 2 others like this.
  2. lfg_ryan

    lfg_ryan

    Joined:
    May 8, 2019
    Posts:
    7
    Facing the same issue. No additional details to provide.
     
  3. hmtyzr

    hmtyzr

    Joined:
    Dec 22, 2016
    Posts:
    7
    Has the same issues, as well. Any update on this?
     
  4. gelllard

    gelllard

    Joined:
    Jan 11, 2019
    Posts:
    3
    The same problem. On all versions of i-devices and all iOS versions. Unity 2021.3.14. We see this crash in Crashlytics. And interesting that unity log at crash moment was empty. Thats why I think than this crash happens on application start.
     
    M-Ansley, vovo801 and lenchez-mrg like this.
  5. CameronND

    CameronND

    Joined:
    Oct 2, 2018
    Posts:
    81
    We are encountering the same issue for ios devices. We are using Unity 2021.3.16f.
    We are using addressables as well as doing some mesh creation/modification through code so were not sure if its related to either of those.
     
    M-Ansley, vovo801 and lenchez-mrg like this.
  6. M-Ansley

    M-Ansley

    Joined:
    Sep 24, 2020
    Posts:
    5
    We're having the same issue ourselves atm. We upgraded our project from Unity 2020.3.36f1 to Unity 2021.3.11f1 and our crash rates have gone up drastically on iOS ever since. Also unable to reproduce just yet
     
    Last edited: Mar 29, 2023
    vovo801 likes this.
  7. RaventurnPatrick

    RaventurnPatrick

    Joined:
    Aug 9, 2011
    Posts:
    165
    Same issue here
     
  8. M-Ansley

    M-Ansley

    Joined:
    Sep 24, 2020
    Posts:
    5
    I think we finally managed to run into this issue while testing. At least for us, this happened on an occasion when I pressed the home button twice and swiped the app up to close it in the background. Upon reopening the app, I immediately got an iOS popup telling me the application had crashed and asking whether I wanted to send a crash report (like the one attached).

    I checked Unity Analytics shortly after and saw one CollisionMeshData crash from when I was testing and from the same device type (an iPad Pro 10.5-inch, 2017 ("iPad7,4")). If it hadn't been for the popup (which maybe I only got because I was on a TestFlight version), I wouldn't have noticed the crash.

    From checking through the stack traces in Unity Analytics, they all appear to be happening for us as part of the cleanup/exit process (CleanupBatchDelete, PlayerCleanup, UnityCleanup, are all mentioned in Thread 0 of the stacktrace):

    Code (CSharp):
    1. Thread 0
    2. 0   libsystem_kernel.dylib             0x00000001d97ecbb4 <symbols missing for uuid: 05f9a5076ae5382fafc54d2e83818c99>
    3. 1   UnityFramework                     0x00000001075b1f80 PlatformThread::Join(Thread const*) (/Users/bokken/buildslave/unity/build/Runtime/Threads/Posix/PlatformThread.cpp:0)
    4. 2   UnityFramework                     0x00000001075b02d0 Thread::WaitForExit(bool) (/Users/bokken/buildslave/unity/build/Runtime/Threads/Thread.cpp:146)
    5. 3   UnityFramework                     0x00000001074fe608 CleanupBatchDelete() (/Users/bokken/buildslave/unity/build/Runtime/Misc/BatchDeleteObjects.cpp:64)
    6. 4   UnityFramework                     0x0000000107504438 CleanupEngine() (/Users/bokken/buildslave/unity/build/Runtime/Misc/SaveAndLoadHelper.cpp:597)
    7. 5   UnityFramework                     0x000000010750f34c PlayerCleanup(bool) (/Users/bokken/buildslave/unity/build/Runtime/Misc/Player.cpp:664)
    8. 6   UnityFramework                     0x0000000107c5f840 UnityCleanup (/Users/bokken/buildslave/unity/build/PlatformDependent/iPhonePlayer/LibEntryPoint.mm:210)
    Wondering whether this issue might have something to do with Unity's application quit/cleanup process in general, and potentially have something to do with these sorts of issues: https://forum.unity.com/threads/ios-crash-on-app-exit.1203643/

    The forum thread above also mentions PlayerCleanup and UnityCleanup, as well as how Apple introduced "a watchdog timer in iOS 15 to kill processes lasting longer than 5 seconds after the shutdown request".

    Not sure what to do with this information exactly but thought it'd be worth sharing here in case it helps
     

    Attached Files:

  9. M-Ansley

    M-Ansley

    Joined:
    Sep 24, 2020
    Posts:
    5
    Also, the scene I was in when I tried closing the application did have a generous number of MeshColliders (maybe 10-20), in case that's relevant to this CollisionMeshData cleanup process. All of the models had read/write enabled on them, as I've heard having this set to false can cause some issues.
     
  10. mango26

    mango26

    Joined:
    Nov 3, 2016
    Posts:
    2
    Same issue here. Unity2021.3.21
     
  11. mango26

    mango26

    Joined:
    Nov 3, 2016
    Posts:
    2
    In my project, when this crash occurs, [UIApplication DidEnterBackground] with it !
     
  12. IgorGalimskiy

    IgorGalimskiy

    Joined:
    May 30, 2017
    Posts:
    30
    Any updates?
    we also have this crash on Unity 2021.3.26
     
  13. hassanyawar

    hassanyawar

    Joined:
    Aug 27, 2015
    Posts:
    2
    Any update on this issue? I'm also facing this issue and at this point in crashlytics this has gone to highest occurrence.

    Code (CSharp):
    1. Crashed: BatchDeleteObjects
    2. 0  UnityFramework                 0x5cb5dc CollisionMeshData::Cleanup() + 25 (CollisionMeshData.cpp:25)
    3. 1  UnityFramework                 0xbed1e8 Mesh::~Mesh() + 3490 (Mesh.cpp:3490)
    4. 2  UnityFramework                 0x443628 delete_object_internal_step2(Object*) + 1123 (BaseObject.cpp:1123)
    5. 3  UnityFramework                 0x519e2c BatchDeleteStep2Threaded(void*) + 101 (BatchDeleteObjects.cpp:101)
    6. 4  UnityFramework                 0x5c8850 Thread::RunThreadWrapper(void*) + 82 (Thread.cpp:82)
    7. 5  libsystem_pthread.dylib        0x2458 _pthread_start + 116
    8. 6  libsystem_pthread.dylib        0xab0 thread_start + 8
     
  14. tangjingjing_kingnet

    tangjingjing_kingnet

    Joined:
    Jun 5, 2021
    Posts:
    1
    Any updates?
    we also have this crash on Unity 2021.3.31
     
    Evorowy likes this.