Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TextMesh Pro Unity 2021.2.5 TextCore GetKerning Crash When Building

Discussion in 'UGUI & TextMesh Pro' started by Ferazel, Dec 14, 2021.

  1. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    517
    This upgrade to 2021.2.5 has been very problematic. We're using a modified version of 3.0.5 TMP, and the current problem I'm running into is that when making builds I'm getting a crash within the FontEngine (inconsistently) that I'm wondering if someone might be able to shed some light on as it appears to be crashing in the middle of making a build.

    Code (CSharp):
    1. Received signal SIGSEGV
    2. Obtained 59 stack frames
    3. 0x00007ff69a815df1 (Unity) cff_get_kerning
    4. 0x00007ff69a845afa (Unity) UNITY_FT_Get_Kerning
    5. 0x00007ff6993980a3 (Unity) TextCore::FontEngine::PopulatePairAdjustmentRecordMarshallingArray
    6. 0x00007ff69823682d (Unity) FontEngine_CUSTOM_PopulatePairAdjustmentRecordMarshallingArray_from_GlyphIndexes
    7. 0x00000228443477d5 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.TextCore.LowLevel.FontEngine:PopulatePairAdjustmentRecordMarshallingArray_from_GlyphIndexes (uint[],int&)
    8. 0x000002284434738b (Mono JIT Code) UnityEngine.TextCore.LowLevel.FontEngine:GetGlyphPairAdjustmentRecords (System.Collections.Generic.List`1<uint>,int&)
    9. 0x0000022844346ea3 (Mono JIT Code) [TMP_FontAsset.cs:2505] TMPro.TMP_FontAsset:UpdateGlyphAdjustmentRecords ()
    10. 0x0000022844346d3b (Mono JIT Code) [TMP_FontAsset.cs:1285] TMPro.TMP_FontAsset:UpdateFontFeaturesForFontAssetsInQueue ()
    11. 0x000002284433d623 (Mono JIT Code) [TMPro_Private.cs:1537] TMPro.TextMeshPro:OnPreRenderObject ()
    12. 0x000002284433d45b (Mono JIT Code) [TextMeshPro.cs:282] TMPro.TextMeshPro:Rebuild (UnityEngine.UI.CanvasUpdate)
    13. 0x00000228442e6ddc (Mono JIT Code) [TMP_UpdateManager.cs:175] TMPro.TMP_UpdateManager:DoRebuilds ()
    14. 0x00000228442e6a22 (Mono JIT Code) (wrapper delegate-invoke) <Module>:invoke_void ()
    15. 0x0000022889e864fc (Mono JIT Code) UnityEngine.Canvas:SendWillRenderCanvases ()
    16. 0x00000228442e690b (Mono JIT Code) UnityEngine.Canvas:ForceUpdateCanvases ()
    17. 0x00000228442e689b (Mono JIT Code) UnityEditor.DrivenRectTransformUndo:ForceUpdateCanvases ()
    18. 0x00000228442e6700 (Mono JIT Code) UnityEditor.Undo:Internal_CallWillFlushUndoRecord ()
    19. 0x0000022805071cb5 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    20. 0x00007fff0e99e034 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    21. 0x00007fff0e8de724 (mono-2.0-bdwgc) [object.c:3064] do_runtime_invoke
    22. 0x00007fff0e8de8bc (mono-2.0-bdwgc) [object.c:3111] mono_runtime_invoke
    23. 0x00007ff698d73914 (Unity) scripting_method_invoke
    24. 0x00007ff698d6e534 (Unity) ScriptingInvocation::Invoke
    25. 0x00007ff699c8cc72 (Unity) PropertyUndoManager::Flush
    26. 0x00007ff699c821cf (Unity) UndoManager::FlushTrackedObjects
    27. 0x00007ff699c812d3 (Unity) UndoManager::ClearAll
    28. 0x00007ff699c3730a (Unity) EditorSceneManager::OpenSceneForBuild
    29. 0x00007ff69a77c9b1 (Unity) BuildCopyGameScene
    30. 0x00007ff69a782145 (Unity) BuildPlayerData
    31. 0x00007ff69a78cc2c (Unity) DoBuildPlayer_Build
    32. 0x00007ff69a78b5e6 (Unity) DoBuildPlayer
    33. 0x00007ff69a77f62d (Unity) BuildPlayer
    I'm not sure why the code is trying to generate kerning pairs when I'm in the middle of making a build, but it is definitely giving me some headaches.

    As you can see this is happening when I'm making a build and it is trying to grab font metrics for some reason. Is this something that I can work around without a new version of Unity or a new version of TMP? Any help would be appreciated.
     
    Last edited: Dec 14, 2021
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I would suggest testing with version 3.2.0-pre.2 as I believe it might address this behavior. Let me know what happens and we can go from there in case you have to use version 3.0.5.