iOS app crash when using TextMeshPro UGUI in scene (case 1153191)

@Stephan_B hoping to get your eyes on this as it seems to be related to TextMesh Pro.

I’m having an issue where the built iOS app will crash with Exception Type: EXC_CRASH (SIGABRT) if I have a scene with a canvas containing a TextMesh Pro UGUI component. Removing the text component, the scene will load fine without any problems. I have reported this with case # 1153191.

Weirdly this only happens intermittently when doing a local build, but happens always with a build from Unity Cloud Build.

Any help with this issue would be much appreciated.

Log

Thread 32 name:  Loading.PreloadManager
Thread 32 Crashed:
0   libsystem_kernel.dylib            0x00000001c753d0e4 __pthread_kill + 8
1   libsystem_c.dylib                0x00000001c7493fcc abort + 144
2   libc++abi.dylib                  0x00000001c6b93818 __cxa_bad_cast + 0
3   libc++abi.dylib                  0x00000001c6b939d8 default_unexpected_handler+ 6616 () + 0
4   libobjc.A.dylib                  0x00000001c6bac6d8 _objc_terminate+ 26328 () + 140
5   libc++abi.dylib                  0x00000001c6ba02d0 std::__terminate(void (*)+ 58064 ()) + 20
6   libc++abi.dylib                  0x00000001c6b9fbf8 __cxxabiv1::exception_cleanup_func+ 56312 (_Unwind_Reason_Code, _Unwind_Exception*) + 0
7   xxxxxxxxxxxxxxx                  0x0000000105eadd50 il2cpp::vm::Exception::RaiseOutOfMemoryException(Il2CppSequencePoint*) + 17112400 (Exception.cpp:70)
8   xxxxxxxxxxxxxxx                  0x0000000105ea16a4 il2cpp::vm::Array::NewSpecific(Il2CppClass*, unsigned long) + 17061540 (Array.cpp:111)
9   xxxxxxxxxxxxxxx                  0x00000001057f8494 scripting_array_new(ScriptingClassPtr, unsigned long, unsigned long) + 10077332 (ScriptingApi_Il2Cpp.cpp:546)
10  xxxxxxxxxxxxxxx                  0x00000001050a0ba0 SerializeTraits<ArrayOfManagedObjectsTransferer>::ResizeSTLStyleArray(ArrayOfManagedObjectsTransferer&, int) + 2378656 (ManagedObject.h:168)
11  xxxxxxxxxxxxxxx                  0x000000010581bd90 void StreamedBinaryRead::TransferSTLStyleArray<ArrayOfManagedObjectsTransferer>(ArrayOfManagedObjectsTransferer&, TransferMetaFlags) + 10222992 (StreamedBinaryRead.h:82)
12  xxxxxxxxxxxxxxx                  0x0000000105818188 void Transfer_ManagedObject<StreamedBinaryRead, true>(SerializationCommandArguments const&, RuntimeSerializationCommandInfo&) + 10207624 (ManagedObject.h:237)
13  xxxxxxxxxxxxxxx                  0x0000000105817f04 void TransferField_LinearCollection<StreamedBinaryRead>(SerializationCommandArguments const&, RuntimeSerializationCommandInfo&) + 10206980 (InitializeTransferFunctionScriptingTraits.h:72)
14  xxxxxxxxxxxxxxx                  0x000000010581bd10 void ExecuteSerializationCommands<StreamedBinaryRead>(SerializationCommandProvider&, StreamedBinaryRead&, GeneralMonoObject const&) + 10222864 (SerializationCommands.h:117)
15  xxxxxxxxxxxxxxx                  0x0000000105814f88 void TransferScriptingObject<StreamedBinaryRead>(StreamedBinaryRead&, ScriptingObjectPtr, ScriptingClassPtr, SerializationCache::smile:ata*&) + 10194824 (TransferScriptingObjectImpl.h:133)
16  xxxxxxxxxxxxxxx                  0x00000001058092ac ManagedObjectHostTransferRedirect<MonoBehaviour>::Transfer(MonoBehaviour&, StreamedBinaryRead&) + 10146476 (ManagedObjectHostTransferRedirect.h:202)
17  xxxxxxxxxxxxxxx                  0x000000010584e4d8 SerializedFile::ReadObject(long long, ObjectCreationMode, bool, TypeTree const**, bool*, Object&) + 10429656 (SerializedFile.cpp:2207)
18  xxxxxxxxxxxxxxx                  0x000000010583e490 PersistentManager::ReadAndActivateObjectThreaded(int, SerializedObjectIdentifier const&, SerializedFile*, bool, bool, PersistentManager::LockFlags) + 10364048 (PersistentManager.cpp:0)
19  xxxxxxxxxxxxxxx                  0x000000010583ebfc PersistentManager::LoadFileCompletelyThreaded(core::basic_string<char, core::StringStorageDefault<char> > const&, long long*, int*, int, PersistentManager::LoadFlags, LoadProgress&, PersistentManager::LockFlags) + 10365948 (PersistentManager.cpp:0)
20  xxxxxxxxxxxxxxx                  0x00000001055f74d4 LoadSceneOperation::Perform() + 7976148 (LoadSceneOperation.cpp:140)
21  xxxxxxxxxxxxxxx                  0x00000001055f9370 PreloadManager::ProcessSingleOperation() + 7983984 (Profiler.h:519)
22  xxxxxxxxxxxxxxx                  0x00000001055f90ec PreloadManager::Run() + 7983340 (PreloadManager.cpp:316)
23  xxxxxxxxxxxxxxx                  0x00000001055f9088 PreloadManager::Run(void*) + 7983240 (PreloadManager.cpp:177)
24  xxxxxxxxxxxxxxx                  0x0000000105690fc0 Thread::RunThreadWrapper(void*) + 8605632 (Thread.cpp:87)
25  libsystem_pthread.dylib          0x00000001c75b3974 _pthread_body + 132
26  libsystem_pthread.dylib          0x00000001c75b38d0 _pthread_start + 52
27  libsystem_pthread.dylib          0x00000001c75bbddc thread_start + 4

Hey @steego do you use the latest version of TM Pro? I remember I had this issue with an old version, updating TMP Pro remove it.

@Aymeric_1 thanks for the suggestion, but this is with the latest version, 2.0.1, using Unity 2019.1.

I’ll try taking a look at the case tomorrow.

1 Like

Did you have a chance to take a look?

@Stephan_B Any news?

I’ve added TextMeshPro in my game and it crashes on iOS when the scene containing the TextMeshPro gameObject is loaded.

  • TextMeshPro version : 2.0.1
  • Unity version : 2019.1.13f1

Stacktrace:

Crashed: Loading.PreloadManager
                        0x103885ce4 il2cpp::vm::Array::NewSpecific(Il2CppClass*, unsigned long) + 55 (Object.cpp:55)
                        0x10324985c scripting_array_new(ScriptingClassPtr, unsigned long, unsigned long) + 546 (ScriptingApi_Il2Cpp.cpp:546)
                        0x102ef1634 SerializeTraits<ArrayOfManagedObjectsTransferer>::ResizeSTLStyleArray(ArrayOfManagedObjectsTransferer&, int) + 168 (ManagedObject.h:168)
                        0x10326ad30 void StreamedBinaryRead::TransferSTLStyleArray<ArrayOfManagedObjectsTransferer>(ArrayOfManagedObjectsTransferer&, TransferMetaFlags) + 123 (ScriptingTypes.h:123)
                        0x103267460 void Transfer_ManagedObject<StreamedBinaryRead, true>(SerializationCommandArguments const&, RuntimeSerializationCommandInfo&) + 237 (ManagedObject.h:237)
                        0x1032671ec void TransferField_LinearCollection<StreamedBinaryRead>(SerializationCommandArguments const&, RuntimeSerializationCommandInfo&) + 72 (InitializeTransferFunctionScriptingTraits.h:72)
                        0x10326acb0 void ExecuteSerializationCommands<StreamedBinaryRead>(SerializationCommandProvider&, StreamedBinaryRead&, GeneralMonoObject const&) + 117 (SerializationCommands.h:117)
                        0x10326449c void TransferScriptingObject<StreamedBinaryRead>(StreamedBinaryRead&, ScriptingObjectPtr, ScriptingClassPtr, SerializationCache::smile:ata*&) + 568 (dynamic_array.h:568)
                        0x1032939ac SerializedFile::ReadObject(long long, ObjectCreationMode, bool, TypeTree const**, bool*, Object&) + 2207 (SerializedFile.cpp:2207)
                        0x10328a54c PersistentManager::ReadAndActivateObjectThreaded(int, SerializedObjectIdentifier const&, SerializedFile*, bool, bool, PersistentManager::LockFlags) + 2385 (PersistentManager.cpp:2385)
                        0x10328ab8c PersistentManager::LoadFileCompletelyThreaded(core::basic_string<char, core::StringStorageDefault<char> > const&, long long*, int*, int, PersistentManager::LoadFlags, LoadProgress&, PersistentManager::LockFlags) + 1978 (PersistentManager.cpp:1978)
                        0x10319d9e8 LoadSceneOperation::Perform() + 140 (LoadSceneOperation.cpp:140)
                        0x10319f34c PreloadManager::ProcessSingleOperation() + 273 (PreloadManager.cpp:273)
                        0x10319f0ec PreloadManager::Run() + 316 (PreloadManager.cpp:316)
                        0x10319f0a0 PreloadManager::Run(void*) + 179 (PreloadManager.cpp:179)
                        0x1031e061c Thread::RunThreadWrapper(void*) + 87 (Thread.cpp:87)
libsystem_pthread.dylib 0x1c3429840 _pthread_start + 168
libsystem_pthread.dylib 0x1c34319f4 thread_start + 8

Please be sure to test with the latest release for Unity 2019.x which is version 2.1.0-preview.3 and let me know if the issue persists.

Hello @Stephan_B ,

Sorry for the late reply, I didn’t have time to test before today. For an unexplainable reason, it worked today with the 2.0.1 version of TextMeshPro.

Because of the issue last week, I used the plain Text component, and removed Text Mesh Pro Essentials I had imported, but kept "com.unity.textmeshpro": "2.0.1" as dependency in my packages

Then, today, I reimported TMPro Essentials, triggered a build on my C.I and it worked.

  • Ipad Mini iOS 12
  • Ipod Touch iOS 11
  • Ipad Pro iOS 12
  • iPhone XR iOS 13

I hope I won’t have any issue in the future. If so, I will try to update to 2.0.1-preview.3

──────────────────────────────────────────────

Edit tested on an iPhone XS iOS13.3 and I crashed and got the following log:

Crashed: Loading.PreloadManager
0x104744e38 CLSProcessRecordAllThreads + 4296986168
0x104745220 CLSProcessRecordAllThreads + 4296987168
0x104734a98 CLSHandler + 4296919704
0x10474343c __CLSExceptionRecord_block_invoke + 4296979516
0x1c33c5fd8 _dispatch_client_callout + 20
0x1c33d27f4 _dispatch_lane_barrier_sync_invoke_and_complete + 60
0x104742ea8 CLSExceptionRecord + 4296978088
0x104742a34 CLSTerminateHandler() + 4296976948
0x1c34df634 std::__terminate(void (*)()) + 20
0x1c34def58 __cxa_get_exception_ptr + 34
0x1c34def10 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 126
0x1052e12cc il2cpp::vm::Exception::RaiseOutOfMemoryException(Il2CppSequencePoint*) + 70 (Exception.cpp:70)
0x1052d4b90 il2cpp::vm::Array::NewSpecific(Il2CppClass*, unsigned long) + 91 (Array.cpp:91)
0x104c985b8 scripting_array_new(ScriptingClassPtr, unsigned long, unsigned long) + 546 (ScriptingApi_Il2Cpp.cpp:546)
0x104940464 SerializeTraits<ArrayOfManagedObjectsTransferer>::ResizeSTLStyleArray(ArrayOfManagedObjectsTransferer&, int) + 168 (ManagedObject.h:168)
0x104cb9a8c void StreamedBinaryRead::TransferSTLStyleArray<ArrayOfManagedObjectsTransferer>(ArrayOfManagedObjectsTransferer&, TransferMetaFlags) + 123 (ScriptingTypes.h:123)
0x104cb61bc void Transfer_ManagedObject<StreamedBinaryRead, true>(SerializationCommandArguments const&, RuntimeSerializationCommandInfo&) + 237 (ManagedObject.h:237)
0x104cb5f48 void TransferField_LinearCollection<StreamedBinaryRead>(SerializationCommandArguments const&, RuntimeSerializationCommandInfo&) + 72 (InitializeTransferFunctionScriptingTraits.h:72)
0x104cb9a0c void ExecuteSerializationCommands<StreamedBinaryRead>(SerializationCommandProvider&, StreamedBinaryRead&, GeneralMonoObject const&) + 117 (SerializationCommands.h:117)
0x104cb31f8 void TransferScriptingObject<StreamedBinaryRead>(StreamedBinaryRead&, ScriptingObjectPtr, ScriptingClassPtr, SerializationCache::smile:ata*&) + 568 (dynamic_array.h:568)
0x104ce2708 SerializedFile::ReadObject(long long, ObjectCreationMode, bool, TypeTree const**, bool*, Object&) + 2207 (SerializedFile.cpp:2207)
0x104cd92a8 PersistentManager::ReadAndActivateObjectThreaded(int, SerializedObjectIdentifier const&, SerializedFile*, bool, bool, PersistentManager::LockFlags) + 2385 (PersistentManager.cpp:2385)
0x104cd98e8 PersistentManager::LoadFileCompletelyThreaded(core::basic_string<char, core::StringStorageDefault<char> > const&, long long*, int*, int, PersistentManager::LoadFlags, LoadProgress&, PersistentManager::LockFlags) + 1978 (PersistentManager.cpp:1978)
0x104bec860 LoadSceneOperation::Perform() + 140 (LoadSceneOperation.cpp:140)
0x104bee1c4 PreloadManager::ProcessSingleOperation() + 273 (PreloadManager.cpp:273)
0x104bedf64 PreloadManager::Run() + 316 (PreloadManager.cpp:316)
0x104bedf18 PreloadManager::Run(void*) + 179 (PreloadManager.cpp:179)
0x104c2f378 Thread::RunThreadWrapper(void*) + 87 (Thread.cpp:87)
0x1c3429840 _pthread_start + 168
0x1c34319f4 thread_start + 8

Note: The phone had 200Mb of free RAM when it crashed.

I am going to test with TextMeshPro 2.1.0-preview3

@Stephan_B

With the TextMeshPro 2.1.0-preview3 version, I don’t get the crash anymore on iPhone XS iOS13.3. I’ve also tested on an Ipad Pro iOS 12 and iPhone XR iOS 13 and everything worked well.

However, since it’s a preview package, can I serenely ship my game?

Preview 4 should be available within a day or two. I would suggest testing that latest release once available and that if everything appears to be working as expected on your end that you should be fine moving forward with it.