Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Bug NPE in TMP_InputField.OnSubmit

Discussion in 'UGUI & TextMesh Pro' started by thiagolrosa, Nov 28, 2023.

  1. thiagolrosa

    thiagolrosa

    Joined:
    Feb 22, 2017
    Posts:
    60
    Code (CSharp):
    1. Non-fatal Exception: java.lang.Exception: NullReferenceException : Object reference not set to an instance of an object.
    2.        at TMPro.TMP_InputField.OnSubmit(TMPro.TMP_InputField)
    3.        at TMPro.TMP_InputField.LateUpdate(TMPro.TMP_InputField)
    Hi,

    I have been struggling with this crash for 3+ months, it started happening when I upgraded Unity LTS from 2021.3.22f1 (textmesh 3.2.0-pre.4) to 2021.3.29f1 (textmesh 3.2.0-pre.5).

    I already tried to rollback the textmesh version to pre.4, tried the latest version, tried to upgrade to LTS 2022, but now I'm back to 2021.3.32f1.

    I'm not able to reproduce this issue in the editor, it only happens on devices (Android) on the field and this crash happens thousands of times

    Apparently this is a silent crash, not affecting the game itself and it seems to be happening after the user interacts with the input field.

    Does anyone have any idea how to fix this or how to investigate further?

    Thanks!
     
  2. KrisGayClipwire

    KrisGayClipwire

    Joined:
    May 26, 2021
    Posts:
    41
  3. thiagolrosa

    thiagolrosa

    Joined:
    Feb 22, 2017
    Posts:
    60
    OMG! I was losing my hair on this one, thanks a lot!
     
    Thygrrr likes this.