Search Issue Tracker
In Progress
Fixed in 7.0.7, 10.0.0-pre.2
Fix In Review for 9.0.2
Votes
0
Found in [Package]
7.0.6
9.0.1
10.0.0-pre.1
Issue ID
DANB-296
Regression
No
Error “A Native Collection has not been disposed, resulting in a memory leak” occurs in Play Mode when a GameObject has the "Sprite Shape Controller" component and is a child of an inactive parent
Steps to reproduce:
1. Open the user’s project
2. Open the “SampleScene” Scene
3. Make any change in the Scene (e.g., make a GameObject active and inactive)
4. Save the Scene
5. Enter Play mode
6. Observe the Console
Expected result: No errors
Actual result: Error “A Native Collection has not been disposed, resulting in a memory leak” occurs
Reproducible with: 2021.2.7f1, 2021.3.11f1
Not reproducible with: 2022.1.0b1, 2022.1.18f1, 2022.2.0b10, 2023.1.0a13
Could not test with: 2020.3.40f1, 2021.2.6f1, 2022.1.0a1, 2022.1.0a18 (Package errors)
Reproduced on: macOS Monterey 12.5.1 (Intel)
Notes:
- The memory leak is happening because of the two last GameObjects in the Hierarchy (GameObject active, parent object inactive, and GameObject inactive, parent object inactive)
- The error does not occur in the Player
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 terrain appears darker when "Per-pixel Normal" is enabled
- [Linux] Editor assertion causes Test Runner to fail when executing it in Batch Mode
- Color selection by the mouse cursor is still enabled when the "Esc" button is pressed
- Game view becomes black and the Scene window becomes grey, “ArgumentOutOfRangeException” errors and “Render Pipeline error” warnings appear after changing the name or deleting URP/HDRP global settings file
- Transform Component is not accessible inside the Player when RuntimeInitializeOnLoadMethod is used
Resolution Note (fix version 10.0.0-pre.2):
Fix for this issue is available on 2D SpriteShape package 10.0.0-pre.2 and above