Search Issue Tracker
Fixed
Fixed in 2023.1.0b8, 2023.2.0a6
Votes
0
Found in
2023.1.0b5
2023.2.0a3
Issue ID
UUM-27567
Regression
Yes
Input results in a "NullReferenceException" when passing "null" to "GUILayout.TextField"
Reproduction steps:
1. Open the “TextFieldNull“ project
2. Open the “TestWindow” window (Tools > TestWindow)
3. Select the text field, input any character, and observe the Console
Expected result: the character is inputted to the text field, and there is no “NullReferenceException” in the Console
Actual result: the character is not inputted to the text field, and there is a “NullReferenceException: Object reference not set to an instance of an object UnityEngine.TextEditingUtilities.ReplaceSelection (System.String replace) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/TextEditingUtilities.cs:459)“ error in the Console
Reproduced in: 2023.1.0a20, 2023.1.0b5, 2023.2.0a3
Not reproduced in: 2020.3.45f1, 2021.3.19f1, 2022.2.7f1, 2023.1.0a19
Reproduced using: macOS 13.0.1 (Intel), Windows 10 (by the reporter)
Note: not reproduced with “EditorGUILayout.TextField”
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] Crash on Android when AndroidJavaProxy is calling from multiple threads
- [Android] Crash on Android 14 when a developmement build is created with API Level 34
- TextMeshPro throws an ArgumentOutOfRangeException when glyph's id is greater than the sprite array
- "Char" values are overwritten when selecting multiple GameObejcts
- Particle System External Forces Multiplier cannot be set to a negative value
Add comment