Search Issue Tracker

Fixed in 1.4.2 & 2.0.2

Votes

2

Found in [Package]

1.4.0 - preview.1b

Issue ID

1162514

Regression

Yes

TextMeshPro InputField throws ArgumentOutOfRangeException when emptied with "Hide Mobile Input" enabled

Package: TextMeshPro

-

To reproduce:

1. Download attached "TextMeshProInputFieldCrash.zip" project and open in Unity
2. Open "SampleScene" scene
3. Build for iOS
4. Deploy the Xcode project to the iOS device
5. Click on the InputField
6. Type something
7. Hold down Backspace on the on-screen Keyboard until the Text is completely deleted and hold it for a bit more

Expected results: No Crashes and no Exceptions are being thrown when deleting the Text from the InputField
Actual results: The Game does not crash, but Exceptions are being thrown in the Log:

"ArgumentOutOfRangeException: Selection is out of range.
Parameter name: selection
at UnityEngine.TouchScreenKeyboard.set_selection (UnityEngine.RangeInt value) [0x0003a] in <f87863d3d6d8426eb49e406f337e22e4>:0
at TMPro.TMP_InputField.GenerateCaret (UnityEngine.UI.VertexHelper vbo, UnityEngine.Vector2 roundingOffset) [0x00109] in <9018cd3bccf849d69e032463692a8446>:0
at TMPro.TMP_InputField.OnFillVBO (UnityEngine.Mesh vbo) [0x0009f] in <9018cd3bccf849d69e032463692a8446>:0
at TMPro.TMP_InputField.UpdateGeometry () [0x0001f] in <9018cd3bccf849d69e032463692a8446>:0
at TMPro.TMP_InputField.Rebuild (UnityEngine.UI.CanvasUpdate update) [0x00004] in <9018cd3bccf849d69e032463692a8446>:0
at UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () [0x00121] in <47839348810e43629ed4e6a410217b7e>:0"

Notes:
- This issue happens on both iOS and Android
- This issue does do not reproduces if the "Hide Mobile Input" flag on the InputField is disabled

Tested with:
- iPhone 8 Plus, iOS: 12.0 - Reproduced
- iPhone XR, iOS: 12.0 - Reproduced

Reproduced on Package version 1.4.0 - preview.1b and 2.0.1
Not reproduced on Package version 1.3.0
Regression on Package version 1.4.0 - preview.1b

Reproduced on Unity 2018.4.3f1, 2019.1.7f1, 2019.2.0b6 and 2019.3.0a7

  1. Resolution Note (fix version 1.4.2 & 2.0.2):

    This issue has been resolved and will be fixed in the next release of the TextMesh Pro package which will be version 1.4.2 for Unity 2018.4 and 2.0.2 for Unity 2019.x.

Comments (12)

  1. DevionNL

    May 15, 2020 09:32

    Yep, as Sailendu said - happens with normal InputField UI as well.

    UnityEngine.TouchScreenKeyboard.set_selection (UnityEngine.RangeInt value) (at <00000000000000000000000000000000>:0)
    UnityEngine.UI.InputField.LateUpdate () (at <00000000000000000000000000000000>:0)

  2. Sailendu

    May 04, 2020 12:22

    This is not just a text mesh pro issue, the same crash also happens when using the normal InputField of Unity UI. I am currently on Unity 2019.3.11f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.