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
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
-
ChubbyBobby
Dec 08, 2023 14:49
Issue occurring in 2021.3.27f1
-
nekokiller2021
Sep 16, 2021 06:20
still happened on unity 2019.4.23f1
-
TANGSTENcq
Aug 01, 2021 21:55
This issue is still plaguing UWP on the HoloLens 2 with Unity version 2019.4.28f1, MRTK 2.7 2. The MRTK keyboard is disappearing while typing in an TMP Inputfield. The issue appears when UnityEngine.TouchScreenKeyboard.set_selection is called. Here is the error message: ArgumentOutOfRangeException: Selection is out of range.
Parameter name: selectionUnityEngine.TouchScreenKeyboard.set_selection (UnityEngine.RangeInt value) (at <00000000000000000000000000000000>:0)
TMPro.TMP_InputField.ActivateInputFieldInternal () (at <00000000000000000000000000000000>:0)
TMPro.TMP_InputField.LateUpdate () (at <00000000000000000000000000000000>:0)The moment that exception is thrown the keyboard closes on HoloLens 2. This issue has been seemingly around for a long time. This issue should be reopened.
-
tyler_unity846
Jan 27, 2021 19:16
Same issue in Unity 2019.4.17f1.
*Note: This issue DOES still occur even if the "Hide Mobile Input" flag on the InputField(TMP or Unity) is disabled contrary to the information in the issue ticket aboveLog snippet:
ArgumentOutOfRangeException: Selection is out of range.
Parameter name: selection
at UnityEngine.TouchScreenKeyboard.set_selection (UnityEngine.RangeInt value) [0x00000] in <00000000000000000000000000000000>:0
at TMPro.TMP_InputField.ActivateInputFieldInternal () [0x00000] in <00000000000000000000000000000000>:0
at TMPro.TMP_InputField.LateUpdate () [0x00000] in <00000000000000000000000000000000>:0 -
sp-LeventeLajtai
Dec 18, 2020 12:04
This bug was fixed in TMP 2.1.0, but had other bugs, and has returned for at least Android devices with TMP 2.1.3.
-
Nico8292
Nov 24, 2020 10:27
Still happening with normal Inputfield on 2019.4.3f1
-
SyedUmair
Oct 21, 2020 11:07
occurs for normal UGUI InputField as well. Reported by Unity Diagnostics and crash reports.
Using Unity 2019.4.12Devices: Multiple android devices
STACK TRACE:
UnityEngine.TouchScreenKeyboard.set_selection (UnityEngine.RangeInt value) (at <00000000000000000000000000000000>:0)
UnityEngine.UI.InputField.LateUpdate () (at <00000000000000000000000000000000>:0) -
cg_augmentaio
Aug 20, 2020 11:07
still not fixed. Using Unity 2019.3 and TMP 2.1.0 with UWP for Hololens
-
AdamVlcek
Jul 10, 2020 13:12
Is there any related bug report for Unity.UI? Any progress in any release notes? This issue seems very unresolved to me. Using Unity 2019.x and TMP 2.1.0 prev 14.
In fact, the whole text input in Unity is so broken, that it's nearly unusable! Such a basic thing should receive much more attention!
-
RendergonPolygons
May 19, 2020 02:24
this isn't fixed, this bug still present for builds on UWP Unity 2019.3.13
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Dragon Crashers] Build fails in U6
- [Dragon Crashers] 4 Shader error messages on import
- [Dragon Crashers] Readme text is white on light grey
- Cursor stays in front of the first character when entering text in the TextMeshPro field
- Searching in Hierarchy causes unwanted component calls
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.