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
- Duplicate External Textures start appearing when a Texture created with "CreateExternalTexture" is modified causing Memory Usage spikes on VisionOS
- Silent crash when using a "Blend Shape" in a "Skinned Mesh Renderer" to move vertices to Vector3.positiveInfinity, and "Occlusion Culling" is baked
- Some Prefab Source and Override content bounds are misaligned
- The Package Manager's "install packages by..." panels break when Domain Reload is triggered, and the panel is open
- Crash with multiple stack traces when leaving a docked VFX Graph open
Add comment