Search Issue Tracker
Won't Fix
Won't Fix in 2023.1.X
Votes
0
Found in
2020.3.43f1
2021.3.16f1
2022.2.1f1
2023.1.0a24
Issue ID
UUM-22822
Regression
No
Memory leak when uninstalling or installing packages
Steps to reproduce:
1. Open the "PackagesMemoryIssues" project
2. Open Package Manager
3. Observe the Activity Monitor or Task Manager or Profiler
4. Install any package (e.g. 2D PSD Importer)
5. Observe the Activity Monitor or Task Manager or Profiler
Expected result: The memory usage is the same as before the installation
Actual result: Memory usage climbs higher every time the package is installed or uninstalled
Reproducible with: 2020.3.43f1, 2021.3.16f1, 2022.2.1f1, 2023.1.0a24
Reproduced on: macOS Monterey 12.2 (Intel), Windows 10
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
- “Screen position out of view frustum...” errors are thrown when zooming out in the Scene view after creating UI GameObject
- CurveTexture is not being released when unloading AssetBundle containing a Scene with ColorCurves post-processing component in Global Volume
- Crash on ExtractActiveCasterInfo when navigating the scene view in a project with specific lighting data
- Build Profile name increments when numeric suffix is removed from duplicate Profile name
- "Unrecognized block header in profiler data file, stopping deserialization" error is shown and no more profiler data is recorded when the Player is connected and profiler recording is enabled/disabled few times
Resolution Note:
From looking at the video, the problem is that the user doesn't see the package dependencies that are installed at the same time. The packages that are the problems in the video have a dependency on Burst. Burst is a big package to optimize code and take a lot of memory. (In the project settings there is an option to see dependencies, it helps to understand any problems. Also the dependencies are now always visible in Unity 22LTS+ in a Dependencies tab for each packages.)
Also on the end of the video we see a project with a simple scene that takes 3.5G of memory. Unfortunately the Packages folder in the project browser is collapsed and we can't see all the packages installed. My guess is (because I can see URP is used) that there are a lot of packages installed in that project. To fix that issue, the user should uninstall unnecessary packages in the package manager in the 'In project' view. Unity can't load only packages affecting the current scene as it's not possible to evaluate what to load from packages, so we need to load all packages while the project is opened.
Resolution Note (2023.1.X):
From looking at the video, the problem is that the user doesn't see the package dependencies that are installed at the same time. The packages that are the problems in the video have a dependency on Burst. Burst is a big package to optimize code and take a lot of memory. (In the project settings there is an option to see dependencies, it helps to understand any problems. Also the dependencies are now always visible in Unity 22LTS+ in a Dependencies tab for each packages.)
Also on the end of the video we see a project with a simple scene that takes 3.5G of memory. Unfortunately the Packages folder in the project browser is collapsed and we can't see all the packages installed. My guess is (because I can see URP is used) that there are a lot of packages installed in that project. To fix that issue, the user should uninstall unnecessary packages in the package manager in the 'In project' view. Unity can't load only packages affecting the current scene as it's not possible to evaluate what to load from packages, so we need to load all packages while the project is opened.