iOS crashes when closing the application.

Unity 2020.3.32f
TextMeshPro 3.0.6

Crashes when the application is closed.
iOS only, Android not

Thread -> id: 171013000 -> priority: 1

Uploading Crash Report

NullReferenceException: Object reference not set to an instance of an object.

at UnityEngine.Material.GetFloatImpl (System.Int32 name) [0x00000] in <00000000000000000000000000000000>:0

at UnityEngine.Material.GetFloat (System.String name) [0x00000] in <00000000000000000000000000000000>:0

at TMPro.TMP_SubMeshUI.UpdateMaterial () [0x00000] in <00000000000000000000000000000000>:0

at TMPro.TMP_SubMeshUI.SetMaterialDirty () [0x00000] in <00000000000000000000000000000000>:0

at UnityEngine.UI.MaskableGraphic.OnDisable () [0x00000] in <00000000000000000000000000000000>:0

at TMPro.TMP_SubMeshUI.OnDisable () [0x00000] in <00000000000000000000000000000000>:0

I had the same crash in version 3.2.0-pre3 of TMP.
What should I do?

1 Like

I met the same issue on PC build, does any one how to fix this?

Same here with latest 2021 LTS and latest TMP

+1

NullReferenceException: Object reference not set to an instance of an object.
UnityEngine.Material.GetFloatImpl (System.Int32 name) (at <00000000000000000000000000000000>:0)
UnityEngine.Material.GetFloat (System.String name) (at <00000000000000000000000000000000>:0)
TMPro.TMP_SubMeshUI.UpdateMaterial () (at <00000000000000000000000000000000>:0)
TMPro.TMP_SubMeshUI.SetMaterialDirty () (at <00000000000000000000000000000000>:0)
UnityEngine.UI.MaskableGraphic.OnCanvasHierarchyChanged () (at <00000000000000000000000000000000>:0)
UnityEngine.Object.Destroy (UnityEngine.Object obj, System.Single t) (at <00000000000000000000000000000000>:0)
UnityEngine.Object.Destroy (UnityEngine.Object obj) (at <00000000000000000000000000000000>:0)
UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider.ReleaseInstance (UnityEngine.ResourceManagement.ResourceManager resourceManager, UnityEngine.GameObject instance) (at <00000000000000000000000000000000>:0)
UnityEngine.ResourceManagement.ResourceManager+InstanceOperation.Destroy () (at <00000000000000000000000000000000>:0)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].DecrementReferenceCount () (at <00000000000000000000000000000000>:0)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.DecrementReferenceCount () (at <00000000000000000000000000000000>:0)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.Release () (at <00000000000000000000000000000000>:0)
UnityEngine.ResourceManagement.ResourceManager.Release (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle handle) (at <00000000000000000000000000000000>:0)
UnityEngine.AddressableAssets.AddressablesImpl.Release (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle handle) (at <00000000000000000000000000000000>:0)
UnityEngine.AddressableAssets.AddressablesImpl.Release[TObject] (TObject obj) (at <00000000000000000000000000000000>:0)
UnityEngine.AddressableAssets.Addressables.Release[TObject] (TObject obj) (at <00000000000000000000000000000000>:0)

@Stephan_B Do you perhaps know if this was already fixed?
We are encountering this with TMP 3.0.6 and Unity 2020.3.26f1