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
- Field is still marked as changed when changed back to its default state in UI Builder
- Crash on UnityEngine.UI.RawImage:OnPopulateMesh when playing Raw Image Texture animation with Sprite keyframes
- 32bit floating point RenderTexture blending feature is not available for WebGPU
- "CommandBuffer: temporary render texture not found while executing" warning is shown when Compatibility Mode is enabled and Camera stacking is used
- NotImplementedException is thrown when using System.String.Replace(String, String, Boolean, CultureInfo)
Add comment