Search Issue Tracker
Fixed
Fixed in 1.14.1
Votes
0
Found in [Package]
1.14.0
Issue ID
ISXB-1573
Regression
Yes
InputSystemUIInputModule causes a memory leak when it is disabled and then re-enabled during runtime
Reproduction steps:
1. Open the attached “IN-105276.zip” project
2. Open the “SampleScene”
3. Enter Play mode
4. From the Hierarchy, select the “EventSystem” GameObject
5. In the Inspector, disable the “Input System UI Input Module” Component
6. Open the “InputSystemUIInputModule.cs” script in an IDE (VS or Rider)
7. Set a Breakpoint on line 1768 (“if (referenceState.refCount - 1 == 0 && referenceState.enabledByInputModule)")
8. Attach the IDE to Unity Editor
9. Start debugging
10. In the Editor, enable the same “Input System UI Input Module” Component and disable it
11. Observe the IDE variables once the Breakpoint is hit
Expected result: “refCount” value is 1
Actual result: “refCount” value is 2
Reproducible with: 1.13.0, 1.14.0 (2022.3.63f1, 6000.0.51f1, 6000.1.8f1, 6000.2.0b5)
Not reproducible with: 1.12.0 (2022.3.63f1, 6000.0.51f1, 6000.1.8f1, 6000.2.0b5)
Reproducible on: macOS 15.5 (M1 Max) (user reported), Windows 11
Not reproducible on: No other environment tested
Note:
- This happens because after the module is disabled, all the actions are set to none. When the module is enabled, AssignDefaultActions and EnableAllActions are both called, and refCount is added to 2
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Multiple errors occur when setting the Render Object Event to AfterRenderingPostProcessing while using STP for Upscaling
- UnityYamlMerge.exe doesn't correctly handle merge conflicts in modified properties on a prefab variant
- Inconsistent color scheme in "Details" section of "Select Presets" inspector window
- Crash on __pthread_kill when launching Editor via command-line with "-disableManagedDebugger" argument
- [VFX] Deleting “New Group Node” name doesn’t allow to type or add new name
Add comment