Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug iOS crashes when closing the application.

Discussion in 'UGUI & TextMesh Pro' started by sunlight1994, Mar 30, 2022.

  1. sunlight1994

    sunlight1994

    Joined:
    Sep 16, 2018
    Posts:
    3
    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
     
  2. sunlight1994

    sunlight1994

    Joined:
    Sep 16, 2018
    Posts:
    3
    I had the same crash in version 3.2.0-pre3 of TMP.
    What should I do?
     
    eran_bb likes this.
  3. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    428
    I met the same issue on PC build, does any one how to fix this?
     
  4. IgorBoyko

    IgorBoyko

    Joined:
    Sep 28, 2020
    Posts:
    90
    Same here with latest 2021 LTS and latest TMP
     
  5. shivaprasad_unity

    shivaprasad_unity

    Joined:
    Mar 30, 2021
    Posts:
    19
    +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)
     
  6. Tudamun

    Tudamun

    Joined:
    Sep 20, 2022
    Posts:
    11
    @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