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 Crashes in LTS 2021.3.13

Discussion in 'Android' started by sandeepsmartest, Dec 16, 2022.

  1. sandeepsmartest

    sandeepsmartest

    Joined:
    Nov 7, 2012
    Posts:
    138
    After switching from 2019 LTS to 2021.3.13 LTS encountering many crashes and causing my crash free users to single digit.
    Someone please help.
    Im using Unity as Library. I have added one of the crashes that are appearing in my Unity cloud diagnostics dashbord.
    Thanks in advance
    @JoshPeterson

    Native StackTrace:
    Thread 0 (crashed)
    0 libil2cpp.so 0x00000000676f26d0 GC_mark_from (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/bdwgc/mark.c:867)
    1 libil2cpp.so 0x00000000676ee4e8 GC_mark_some (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/bdwgc/mark.c:401)
    2 libil2cpp.so 0x00000000676ed4fc GC_stopped_mark (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/bdwgc/alloc.c:832)
    3 libil2cpp.so 0x00000000676ecec4 GC_try_to_collect_inner (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/bdwgc/alloc.c:580)
    4 libil2cpp.so 0x00000000676f01c0 GC_collect_or_expand (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/bdwgc/alloc.c:1484)
    5 libil2cpp.so 0x00000000676f3774 GC_alloc_large (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/bdwgc/malloc.c:64)
    6 libil2cpp.so 0x00000000676f0874 GC_generic_malloc (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/bdwgc/malloc.c:264)
    7 libil2cpp.so 0x00000000676f394c GC_malloc_kind_global (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/bdwgc/malloc.c:327)
    8 libil2cpp.so 0x000000006776c908 il2cpp::vm::Object::AllocatePtrFree(unsigned int, Il2CppClass*)
    9 libil2cpp.so 0x000000006775b8ec il2cpp::vm::String::NewUtf16(char16_t const*, int)
    10 libunity.so 0x00000000691628d5 scripting_string_new(unsigned short const*, unsigned int)
    11 libunity.so 0x0000000069011f61 AndroidJNIBindingsHelpers::CallStringMethod(void*, void*, dynamic_array<jvalue, 0u> const&)
    12 libunity.so 0x0000000069014c59 AndroidJNI_CUSTOM_CallStringMethod(void*, void*, ScriptingBackendNativeArrayPtrOpaque*)
    13 libil2cpp.so 0x00000000015bf328 AndroidJNI_CallStringMethod_m52FAF2826B75AF2AEA8F848AEC973A682216EC4C (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/UnityEngine.AndroidJNIModule.cpp:14640)
    14 libil2cpp.so 0x0000000068a0b334 AndroidJNISafe_CallStringMethod_mF2975892926478EF6ACB9D62CCC0829A8BDD2699 (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/UnityEngine.AndroidJNIModule.cpp:5396)
    15 libil2cpp.so 0x00000000688afa78 AndroidJavaObject__Call_TisIl2CppFullySharedGenericAny_mA1A866611778FF72A2067F7E30B32913C4EB4904_gshared (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/GenericMethods.cpp:16770)
    16 libil2cpp.so 0x000000006767b45c RuntimeInvoker_TrueIl2CppFullySharedGenericAny_RuntimeObject_RuntimeObject (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/Il2CppInvokerTable.cpp:25306)
    17 libil2cpp.so 0x000000000146248c (unknown) (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/GenericMethods.cpp:396)
    18 libil2cpp.so 0x00000000688ae49c AndroidJavaObject_Call_TisIl2CppFullySharedGenericAny_mCA7EED8FFBB862858FF426BD7D6B191F9C24234B_gshared (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/GenericMethods.cpp:16008)
    19 libil2cpp.so 0x00000000015c3db8 AndroidJavaObject_Call_TisString_t_m67FC2931E81004C3F259008314180511C3D2AF40 (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/UnityEngine.AndroidJNIModule.cpp:2616)
    20 libil2cpp.so 0x0000000068a0fdc0 AndroidJNIHelper_Unbox_m7D786B14E4A90E5411FC9AA7F985451DEBC95731 (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/UnityEngine.AndroidJNIModule.cpp:10988)
    21 libil2cpp.so 0x0000000068a0f4dc AndroidJavaProxy_Invoke_mCAE9C5E669AD50DE372494E12224FF1F31A43F1D (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/UnityEngine.AndroidJNIModule.cpp:7367)
    22 libil2cpp.so 0x00000000015c7f50 (unknown) (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/UnityEngine.AndroidJNIModule.cpp:55)
    23 libil2cpp.so 0x0000000068a13f5c AndroidJNIHelper_InvokeJavaProxyMethod_mCA9BD35B5AE99B6DFABBFE9968DD1EBE931F70C2 (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/UnityEngine.AndroidJNIModule.cpp:9676)
    24 libil2cpp.so 0x00000000676974e0 RuntimeInvoker_FalseIntPtr_t_RuntimeObject_IntPtr_t_IntPtr_t (/Nsks/MyProjs_2021_3_13/git-folder/MyGame/MyGame_AndroidBuild_Unity_Export/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/Il2CppInvokerTable.cpp:35896)
    25 libil2cpp.so 0x000000006774dcb0 il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const*, void*, void**)
    26 libil2cpp.so 0x000000006774da70 il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**)
    27 libunity.so 0x0000000069162421 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
    28 libunity.so 0x000000006916cae1 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
    29 libunity.so 0x00000000690111c1
    UnityJavaProxy_invoke[ICODE]
    [/ICODE](_JNIEnv*, _jobject*, long long, _jstring*, _jobjectArray*)
    30 base.odex 0x000000007e0f8f3d <symbols missing for uuid: 0000000000000000000000000000000000000000>
     
    Vladnee likes this.
  2. sandeepsmartest

    sandeepsmartest

    Joined:
    Nov 7, 2012
    Posts:
    138
  3. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,771
    Is this something that you can reproduce locally?
     
  4. sandeepsmartest

    sandeepsmartest

    Joined:
    Nov 7, 2012
    Posts:
    138
    Im sorry @JoshPeterson not even once i could reproduce. I executed many automations on afew devices but no luck.
    I checked this repo https://github.com/ivmai/bdwgc if any similar issues were being fixed but no luck here aswell. This is the crash that is impacting our crash free users and causing great impact on users experience and retention.
    There are few other stack traces leading to same crash at dwgc/mark.c:867.
    Does unity 2021.3.13 LTS has latest GC code? or upgrading to 2021.3.16 can help us in anyway?
    FYI, We are not using incremental GC.
    Please throw some light.
    Thanks in advance
     
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,771
    Unfortunately this crash could be indicative of a number of different issues. I don't think the problem is in the BDWGC code though. It is likely the place where corrupted memory was noticed.

    Upgrading to 2021.3.16 might help - I don't know of any specific fixes related to member corruption between .13 and .16, but something outside of my knowledge may have gone in.
     
  6. y0rshl

    y0rshl

    Joined:
    Jul 12, 2013
    Posts:
    20
    @JoshPeterson
    It seems to be related to incremental GC. I have 2 projects on 2021.3.16 published. The project with Incremental CG is having several crashes at mark.c - GC_mark_from while the other one doesn't have a single crash on that.
     
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,771
    Thanks for the information!
     
  8. YichenYu525

    YichenYu525

    Joined:
    Dec 8, 2020
    Posts:
    9
    Getting this crash on 2021.3.9
    Any way to solve it ?