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
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
Add comment