Reproduction steps:
1. Open the attached “ReproProj” project
2. Opent Window > TextMeshPro > Font Asset Creator
3. Select the “NotoSansRegular-SC” Font as the Source Font
4. Close the Font Asset Creator window
5. Repeat 2nd step
Expected result: Font Asset Creator window is opened
Actual result: “NullReferenceException” and “GUI Error” errors are thrown/ The Editor crashes
Reproducible with: 3.2.0-pre.10 (2021.3.43f1), 4.0.0-pre.2 (2022.3.43f1), built-in 6000.0.16f1
Reproducible on: MacOS 14.6.1 (M1 Max)
Not reproducible on: No other environment tested
Note: The crash was only reproducible on the 6000.0 stream
First few lines of the stack trace:
#0 0x0000019f74fa24 in flockfile
#1 0x6a2f80019f753dc8 in fseek
#2 0x9966800102dcc838 in ft_ansi_stream_io
#3 0x00000102dd3508 in UNITY_FT_Stream_Seek
#4 0x00000102e00144 in UNITY_tt_face_init
#5 0x00000102dd456c in open_face
#6 0x00000102dcfd48 in ft_open_face_internal
#7 0x0000010139cea0 in TextCore::FontEngine::GetFontFaces()
#8 0x000001004e025c in FontEngine_CUSTOM_GetFontFaces_Internal()
#9 0x000003ea0fc7e0 in (wrapper managed-to-native) UnityEngine.TextCore.LowLevel.FontEngine:GetFontFaces_Internal () [
{0x3df08d0f8}
+ 0x58] (0x3ea0fc788 0x3ea0fc844) [0x32e20aa80 - Unity Child Domain]
#10 0x000003ea0fc6e4 in UnityEngine.TextCore.LowLevel.FontEngine:GetFontFaces () [
{0x3df08cff8}
+ 0x14] [/Users/bokken/build/output/unity/unity/Modules/TextCoreFontEngine/Managed/FontEngine.bindings.cs :: 547u] (0x3ea0fc6d0 0x3ea0fc734) [0x32e20aa80 - Unity Child Domain]
#11 0x000003ea0fc65c in TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow:GetFontFaces () [
{0x3344bcdf8}
+ 0x34] [./Library/PackageCache/com.unity.ugui/Editor/TMP/TMPro_FontAssetCreatorWindow.cs :: 1224u] (0x3ea0fc628 0x3ea0fc66c) [0x32e20aa80 - Unity Child Domain]