Search Issue Tracker
Fixed
Fixed in 6000.0.61f1, 6000.2.9f1, 6000.3.0b7, 6000.4.0a3
Votes
0
Found in
6000.0.59f1
6000.2.7f1
6000.3.0b4
6000.4.0a1
Issue ID
UUM-121130
Regression
Yes
NullReferenceException is thrown when specific UI Toolkit focus changes are made
How to reproduce:
1. Open the ‘Bug.zip' project
2. Open the ‘Scene’ scene
3. Enter Play Mode
4. In the Game View select the 'Example1A’ button
5. Observe the result
Expected result: No errors are thrown in the console
Actual result: Errors are thrown in the console
Reproducible with: 2023.2.0a6, 6000.0.59f1, 6000.2.7f1, 6000.3.0b4, 6000.4.0a1
Not reproducible with: 2023.2.0a5
Reproducible on: macOS 26.0 (M1 Max)
Not reproducible on: No other environments tested
Notes: The issue is that SwitchFocus doesn't check whether the last focused element is still in a panel. In a specific case where there's pending focus changes, and you attempt to focus something while the previous element is being removed, and events are being processed, then the line of code `using (new EventDispatcherGate(oldFocusedVe.panel.dispatcher))` will attempt to access a null panel.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Switching a Type QueryBlock to prefabs fails
- Search Index Manager allows deleting Empty Index List when clicking on “-“ button, throwing “ArgumentOutOfRangeException” error in the Console window
- "System.ArgumentOutOfRangeException" error is thrown when baking Adaptive Probe Volumes
- "vector<bool> too long" error is thrown when using UnityYAMLMerge
- Redundant scrollbar appears in the Localization - Metadata settings section
Add comment