Search Issue Tracker
By Design
Votes
0
Found in
6000.0.54f1
6000.1.13f1
6000.2.0b11
6000.3.0a3
Issue ID
UUM-112293
Regression
No
Editor freezes and "Recursively dispatching event" errors appear in the Console when setting DropdownField label in ValueChangedCallback
How to reproduce:
1. Open the attached “IN-109095” project
2. Open the “SampleScene” Scene
3. Enter Play mode
4. In the Game view open the dropdown list and select “Any”
5. Observe the Editor and the Console window
Expected result: The Editor does not freeze and the Console contains no errors
Actual result: The Editor freezes for ~30-60 seconds and the Console contains hundreds of “Recursively dispatching event” errors
Reproducible with: 2023.1.0a1, 6000.0.54f1, 6000.1.13f1, 6000.2.0b11, 6000.3.0a3
Reproduced on: Windows 10 (User), Windows 11
Not reproduced on: No other environment tested
Note: Different error appears in older versions
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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note:
When you use RegisterValueChangedCallback, it registers a ChangeEvent<string> on the target object. A common misconception is that this event will only be triggered when the specific element it is registered to changes. However, this is not the case. Any ChangeEvent<string> that propagates through this element will trigger the callback.
In this case, when you modify the label with the DropDown value, the Label element itself dispatches a ChangeEvent<string>, which then triggers your callback. You then change the label again, which triggers another callback, causing the recursion. This behavior can be managed by checking the target property in the event to ensure that the event originates from the element you care about.