Search Unity

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

Discussion in 'UGUI & TextMesh Pro' started by steego, May 23, 2019.

  1. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    969
    @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.


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

    -Aymeric-

    Joined:
    Oct 21, 2014
    Posts:
    110
    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.
     
  3. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    969
    @-Aymeric- thanks for the suggestion, but this is with the latest version, 2.0.1, using Unity 2019.1.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I'll try taking a look at the case tomorrow.
     
    steego likes this.
  5. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    969
    Did you have a chance to take a look?
     
  6. Hellium

    Hellium

    Joined:
    Sep 25, 2014
    Posts:
    43
    @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:

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

    https://forum.unity.com/threads/i-m...build-the-windows-player.538381/#post-5373213
     
    Last edited: Jan 16, 2020
  7. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    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.
     
  8. Hellium

    Hellium

    Joined:
    Sep 25, 2014
    Posts:
    43
    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:

    Code (CSharp):
    1. Crashed: Loading.PreloadManager
    2. 0x104744e38 CLSProcessRecordAllThreads + 4296986168
    3. 0x104745220 CLSProcessRecordAllThreads + 4296987168
    4. 0x104734a98 CLSHandler + 4296919704
    5. 0x10474343c __CLSExceptionRecord_block_invoke + 4296979516
    6. 0x1c33c5fd8 _dispatch_client_callout + 20
    7. 0x1c33d27f4 _dispatch_lane_barrier_sync_invoke_and_complete + 60
    8. 0x104742ea8 CLSExceptionRecord + 4296978088
    9. 0x104742a34 CLSTerminateHandler() + 4296976948
    10. 0x1c34df634 std::__terminate(void (*)()) + 20
    11. 0x1c34def58 __cxa_get_exception_ptr + 34
    12. 0x1c34def10 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 126
    13. 0x1052e12cc il2cpp::vm::Exception::RaiseOutOfMemoryException(Il2CppSequencePoint*) + 70 (Exception.cpp:70)
    14. 0x1052d4b90 il2cpp::vm::Array::NewSpecific(Il2CppClass*, unsigned long) + 91 (Array.cpp:91)
    15. 0x104c985b8 scripting_array_new(ScriptingClassPtr, unsigned long, unsigned long) + 546 (ScriptingApi_Il2Cpp.cpp:546)
    16. 0x104940464 SerializeTraits<ArrayOfManagedObjectsTransferer>::ResizeSTLStyleArray(ArrayOfManagedObjectsTransferer&, int) + 168 (ManagedObject.h:168)
    17. 0x104cb9a8c void StreamedBinaryRead::TransferSTLStyleArray<ArrayOfManagedObjectsTransferer>(ArrayOfManagedObjectsTransferer&, TransferMetaFlags) + 123 (ScriptingTypes.h:123)
    18. 0x104cb61bc void Transfer_ManagedObject<StreamedBinaryRead, true>(SerializationCommandArguments const&, RuntimeSerializationCommandInfo&) + 237 (ManagedObject.h:237)
    19. 0x104cb5f48 void TransferField_LinearCollection<StreamedBinaryRead>(SerializationCommandArguments const&, RuntimeSerializationCommandInfo&) + 72 (InitializeTransferFunctionScriptingTraits.h:72)
    20. 0x104cb9a0c void ExecuteSerializationCommands<StreamedBinaryRead>(SerializationCommandProvider&, StreamedBinaryRead&, GeneralMonoObject const&) + 117 (SerializationCommands.h:117)
    21. 0x104cb31f8 void TransferScriptingObject<StreamedBinaryRead>(StreamedBinaryRead&, ScriptingObjectPtr, ScriptingClassPtr, SerializationCache::Data*&) + 568 (dynamic_array.h:568)
    22. 0x104ce2708 SerializedFile::ReadObject(long long, ObjectCreationMode, bool, TypeTree const**, bool*, Object&) + 2207 (SerializedFile.cpp:2207)
    23. 0x104cd92a8 PersistentManager::ReadAndActivateObjectThreaded(int, SerializedObjectIdentifier const&, SerializedFile*, bool, bool, PersistentManager::LockFlags) + 2385 (PersistentManager.cpp:2385)
    24. 0x104cd98e8 PersistentManager::LoadFileCompletelyThreaded(core::basic_string<char, core::StringStorageDefault<char> > const&, long long*, int*, int, PersistentManager::LoadFlags, LoadProgress&, PersistentManager::LockFlags) + 1978 (PersistentManager.cpp:1978)
    25. 0x104bec860 LoadSceneOperation::Perform() + 140 (LoadSceneOperation.cpp:140)
    26. 0x104bee1c4 PreloadManager::ProcessSingleOperation() + 273 (PreloadManager.cpp:273)
    27. 0x104bedf64 PreloadManager::Run() + 316 (PreloadManager.cpp:316)
    28. 0x104bedf18 PreloadManager::Run(void*) + 179 (PreloadManager.cpp:179)
    29. 0x104c2f378 Thread::RunThreadWrapper(void*) + 87 (Thread.cpp:87)
    30. 0x1c3429840 _pthread_start + 168
    31. 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
     
    Last edited: Jan 23, 2020
  9. Hellium

    Hellium

    Joined:
    Sep 25, 2014
    Posts:
    43
    @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?
     
  10. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    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.