Search Unity

TextMesh Pro TMP_InputField causes ArgumentOutOfRangeException in TouchScreenKeyboard

Discussion in 'UGUI & TextMesh Pro' started by Peter77, Dec 21, 2021.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,610
    Unity 2019.4.20f1, TextMeshPro2.1.6

    I have a few users that run, according to Cloud Diagnostics, in the following issue:
    Code (CSharp):
    1. UnityEngine.TouchScreenKeyboard.set_selection (UnityEngine.RangeInt value)
    2. TMPro.TMP_InputField.ActivateInputFieldInternal ()
    3. TMPro.TMP_InputField.LateUpdate ()
    The following warning is logged as well, might be related:
    Code (CSharp):
    1. The character with Unicode value \uFFFC was not found in the [merriweather_black_latin] font asset or any potential fallbacks. It was replaced by Unicode character \u0020 in text object [text].
    I don't know how to reproduce the issue. Perhaps you (Stephan) know and it helps you to fix the problem.

    Device Model: iPhone9,4
    OS: iOS 13.3.1
    System Language: German
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    This should have been fixed in 2.2.0-preview.2.
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,610
    Thank you for the reply.

    Do you happen to know how I could reproduce this issue? I would love to be able to reproduce it, so I can also test it myself whether the update fixes it.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Many of these appear to be timing related on some devices. As such, it has been hard to reproduce many of these which was happening more frequently when selecting multiple characters and using insert or delete. I added a range check on those arrays which will ensure the indexes are correct but reproducing was still challenging.

    Preview 3 will also include additional changes / tweaks related to this.
     
    Peter77 likes this.
  5. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,610
    In the meantime we updated to Unity 2021.3.11f1 and TextMeshPro 3.0.6, but unfortunately, we still see this issue. Exact same error message as posted in the first message (link).

    Device Model: iPad11,6
    OS: iPadOS 15.7
    System Language: English

    I can't find a newer TMP version in the Package Manager window, so I suppose the issue is fixed in a newer version than 3.0.6 that's no longer compatible with Unity 2021.3?