Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question Multiple crashes in Unity Analytics

Discussion in 'Unity Analytics' started by dri_richard, Aug 29, 2020.

Thread Status:
Not open for further replies.
  1. dri_richard

    dri_richard

    Joined:
    Mar 10, 2017
    Posts:
    154
    We just released an app update on iOS and are seeing multiple crashes in Crash Reporting.
    They are all different, but have two things in common:

    1. The main thread callstack shows something memory-related - e.g. it's in
    UnityDefaultAllocator, GC_lock ,fastMalloc (in a plugin we use) or similar.
    2. The crashed thread is *always* this:

    Code (CSharp):
    1. 0   <app name>                          0x000000010106c920 bool UnityDefaultAllocator<LowLevelAllocator>::AllocationPage<(RequestType)1>(void const*) const (UnityDefaultAllocator.cpp:140)
    2. 1   <app name>                          0x000000010106c3f4 UnityDefaultAllocator<LowLevelAllocator>::RegisterDeallocation(void const*) (Mutex.h:30)
    3. 2   <app name>                          0x000000010106c468 UnityDefaultAllocator<LowLevelAllocator>::Deallocate(void*) (AllocationHeader.h:55)
    4. 3   <app name>                          0x0000000100bb1648 Unity::rapidjson::GenericValue<Unity::rapidjson::UTF8<char>, JSONAllocator>::~GenericValue() (document.h:581)
    5. 4   <app name>                          0x0000000100bb1608 Unity::rapidjson::GenericValue<Unity::rapidjson::UTF8<char>, JSONAllocator>::~GenericValue() (document.h:558)
    6. 5   <app name>                          0x0000000100c02704 UnityEngine::Analytics::UserCustomEvent::~UserCustomEvent() (String.h:191)
    7. 6   <app name>                          0x0000000100c02510 UnityEngine::Analytics::UserCustomEvent::Internal_Destroy(void*) (MemoryMacros.h:188)
    8. 7   <app name>                          0x000000010238346c CustomEventData_Destroy_m60BE08121AFF38808FBD62CC9BF5929E30C444CA (Bulk_UnityEngine.UnityAnalyticsModule_0.cpp:1895)
    9. 8   <app name>                          0x00000001023833e4 CustomEventData_Finalize_mD75450572E12709EC321DF5E82B8FF0F861EE423 (Bulk_UnityEngine.UnityAnalyticsModule_0.cpp:2900)
    10. 9   <app name>                          0x000000010093ad48 RuntimeInvoker_TrueVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017(void (*)(), MethodInfo const*, void*, void**) (Il2CppInvokerTable.cpp:49102)
    11. 10  <app name>                          0x00000001014bb62c il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) (Runtime.cpp:584)
    12. 11  <app name>                          0x0000000101477228 il2cpp::gc::GarbageCollector::RunFinalizer(void*, void*) (GarbageCollector.cpp:159)
    13. 12  <app name>                          0x0000000101471720 GC_invoke_finalizers (finalize.c:1298)
    14. 13  <app name>                          0x000000010147715c il2cpp::gc::FinalizerThread(void*) (GarbageCollector.cpp:97)
    15. 14  <app name>                          0x0000000101494608 il2cpp::os::Thread::RunWrapper(void*) (Thread.cpp:173)
    16. 15  <app name>                          0x000000010149664c il2cpp::os::ThreadImpl::ThreadStartWrapper(void*) (ThreadImpl.cpp:106)
    17. 16  libsystem_pthread.dylib            0x0000000191097d8c _pthread_start
    18. 17  libsystem_pthread.dylib            0x000000019109b76c thread_start
    We're on Unity 2018.4.22, Analytics 3.2.3

    Any thoughts? It feels unlikely that we have a game-side issue that manifests in this same behaviour in Analytics, when all kinds of other Unity systems would be affected if we were corrupting the heap.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Are you able to reproduce? Unfortunately the stack trace doesn't include actionable information. Are your users complaining, does the app crash? Can you share the code you are using to send Custom Events? I might be able to spot something.
     
  3. amitn_papaya

    amitn_papaya

    Joined:
    Feb 22, 2024
    Posts:
    1
    Hi @dri_richard, I'm from the far-future. Were you able to solve the issue?
     
  4. dri_richard

    dri_richard

    Joined:
    Mar 10, 2017
    Posts:
    154
    Looking at our commit history I don't think we figured it out - we just stopped sending those events. (it's an old game that's no longer maintained)
     
  5. Laurie-Unity

    Laurie-Unity

    Unity Technologies

    Joined:
    Mar 5, 2020
    Posts:
    227
Thread Status:
Not open for further replies.