Search Issue Tracker
Fixed
Fixed in 1.0.0
Votes
2
Found in [Package]
1.0.0
Issue ID
PROFB-160
Regression
Yes
[Memory Profiler] Memory Leak when Memory Profiler is in project
Steps to reproduce:
1. Create a new project
2. Install the Memory Profiler Package
3. Open the Profiler and select Memory as the only Module
4. Enter Play Mode
5. Observe that Mesh memory begins to leak with 0.1 mb increment every second
Expected results: Memory Profiler leaks Mesh memory with 0.1 mb increment if selected as Module in the Profiler
Actual results: Memory Profiler does not leak Mesh memory
Reproducible on: 2022.2.0a9, 2022.3.2f1
Not reproducible on: 2021.3.27f1, 2022.1.24f1, 2023.1.0f1, 2023.2.0a18
Could not test on 2022.2.0a8 and below due to Memory Profiler package outputting errors if added via Package.json and not appearing in the Package Manager
Notes:
-Memory seems to leak only when Memory Module is enabled in the Profiler
Comments (2)
-
MartinTilo
Aug 17, 2023 14:51
The Unity and Memory Profiler package version combination matrix behind this bug is a bit complex, so in order to give some context:
The Memory Profiler package injects an override UI into the Memory Profiler Module in the Profiler Window. The 1.1.x versions of the package (up to version 1.1.0-pre.1) had a managed memory leak. This managed leak was fixed as part of this bug, PROFB-160. Further, the Memory Profiler Module override from the package would refresh the bottom panel of the Profiler Window (whenever it would update to show data for a different frame) in a way that would trigger a mesh leak in UI Toolkit (/ Text). As part of the fix for PROFB-160 we also changed the way that the UI refresh happens. This change reduced the frequency at which the underlying mesh leak is triggered, but the change could not remove the leak entirely.
The full fix requires an additional change, i.e. the fix of the underlying mesh leak, which is tracked separately here: https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-46520
Note: The code related to the mesh leak was changed in 2023.1.0a20. With that change, the leak no longer occurs. How that relates to a fix/backport for UUM-46520 to 2022.3 is yet TBD. -
Jusam
Jul 17, 2023 02:42
不知道这个问题在哪个版本里没有出现呢?2022.3.3?因为需要进行内存分析
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
- The Scrollbar becomes unusable when adding Elements to the List
- "One or more data file missing for baking set NewScene Baking Set. Cannot load shared data." error in Player when a specific project is built
- Choosing new HDR Colour using RGB values breaks colour on Intensity Selectors
- Rendering/Decal Layer Mask options are different inside Prefab Mode and outside Prefab Mode when the project is upgraded to Unity 6
- Incorrect Realtime GI Light Probes baking when more than one Light Probe Group is used and "Baked Global Illumination" is enabled
Resolution Note (fix version 1.0.0):
Fixed in 2022.3.10f1