Hello!
I’ve been implementing a feature into my game that displays a notification after an ad is shown (using Unity Ads)
It’s a simple object with some Image & TextMeshPro objects (all animated with a timeline) running in a coroutinue.
Nothing fancy and it works perfectly well in the player. But I’ve just noticed it’s started to crash on Android 10 (in a IL2CPP build). Unfortunately I’m not aware of the exact change that triggered it.
I’m using Unity 2020.3.28f1 & TextMeshPro 3.0.6
Looking at the crash report in the Unity Dashboard shows this…
Native Crash - Mesh::CreateMesh()
Mesh::CreateMesh()
Native StackTrace:
Thread 0 (crashed)
0 libunity.so 0x00000078cafb252c Mesh::CreateMesh()
1 libunity.so 0x00000078cafb3f20 Mesh::UploadMeshData(bool)
2 libunity.so 0x00000078cafb40e8 Mesh::AwakeFromLoad(AwakeFromLoadMode)
3 libunity.so 0x00000078caca9e54 Mesh_CUSTOM_Internal_Create(ScriptingBackendNativeObjectPtrOpaque*)
4 libil2cpp.so 0x00000078c98ac178 TextMeshProUGUI_Awake_m0DE2F43DC61FDDBF84F013ABDB89D59BA6EE4889 (C:\workspace\workspace\p\Library\Il2cppBuildCache\Android\arm64-v8a\il2cppOutput\Unity.TextMeshPro4.cpp:15069)
5 libil2cpp.so 0x00000078c8dfe370 RuntimeInvoker_TrueVoid_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5(void ()(), MethodInfo const, void*, void**) (C:\workspace\workspace\p\Library\Il2cppBuildCache\Android\arm64-v8a\il2cppOutput\Il2CppInvokerTable.cpp:64361)
6 libil2cpp.so 0x00000078c8f1f09c il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) (C:\Program Files\Unity\Editor\Data\il2cpp\libil2cpp\vm\Runtime.cpp:568)
7 libunity.so 0x00000078cac05f64 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
8 libunity.so 0x00000078cac130e8 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
9 libunity.so 0x00000078cac150a8 ScriptingInvocation::InvokeChecked(ScriptingExceptionPtr*)
10 libunity.so 0x00000078cac51368 SerializableManagedRef::CallMethod(Object&, ScriptingMethodPtr)
11 libunity.so 0x00000078cac2043c MonoBehaviour::CallAwake()
12 libunity.so 0x00000078cac20858 MonoBehaviour::AddToManager()
13 libunity.so 0x00000078cac203a4 MonoBehaviour::AwakeFromLoad(AwakeFromLoadMode)
14 libunity.so 0x00000078cac61078 AwakeFromLoadQueue::InvokeAwakeFromLoad(AwakeFromLoadQueue::Item*, unsigned int, AwakeFromLoadMode)
15 libunity.so 0x00000078cac60fa4 AwakeFromLoadQueue::AwakeFromLoadAllQueues(AwakeFromLoadMode, bool)
16 libunity.so 0x00000078caaec554 AwakeAndActivateClonedObjects(Object**, vector_map<int, int, std::__ndk1::less, stl_allocator<std::__ndk1:air<int, int>, (MemLabelIdentifier)1, 16> > const&)
17 libunity.so 0x00000078caaecb64 CloneObject(Object&, Transform&, bool)
Looking further down the log (not shown here) it looks like it could have been triggered when text is assigned to the component, but can’t say 100% for sure.
Disabling the notification stops the error, so I know it’s related to that branch of code. But isolating it further is proving harder. It also crashes the process and hangs the OS for a while, so is proving problematic to debug on the device.
Any help would be much appreciated.