【修复】A Native Collection has not been disposed, resulting in a memory leak.

No information on error with full stack traces enabled

Hello, I have an error of "A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details. (Filename: Line: 0)" I have enabled full stack traces on everything in the project settings and in the stack trace logging menu. However it still does not show anymore details. I have tried restarting the editor but it did not help. Any help would be great. Thanks for your time!

Edit: This has been fixed for me by going to Menu: Jobs -> Leak Detection -> Full Stack Traces (Expensive). SecondCobra has a picture if you need help. You may need to update jobs to see it, not sure if it was included in an update or always there.

Review  Show   3

4 replies

 ·  Add your reply

  • Sort by: 

3 answers , as of LateNighterDK  · 2021-04-04 20:39

And to obtain the Jobs menu you need to install the experimental Entities package. Since its experimental it's not enough to enable preview packages in the Package manager. You have to install it via the "Add package by name" in the Package manager and know that its called "com.unity.entities".

Took my some hours to piece the scattered clues to this together from various forums and Unitys vague descriptions on DOTS/ECS.

Hope it helps someone out there.



comment  ·  share

1 answer , as of lPVDl  · September 08, 2021 08:40

This can be done by changing property NativeLeakDetection.Mode. For example, via menu item MyProject > Jobs > Leak Detection With Stack Trace:

 See more at Unity API NativeLeakDetectionMode:

comment  ·  share

0 answers , as of SecondCobra  · October 10, 2020 06:23

In case anyone else finds this question, it is turned on using the Menu: Jobs -> Leak Detection -> Full Stack Traces (Expensive).

comment  ·  share

0 answers , as of the_rings_of_saturn  May 26th 01:11

Still in Unity 2021.3.3f1 LTS! After installing "entities", I didn't see the option "Leak detection", so I restarted Unity. After restarting, I don't see either "Jobs" menu now. And I got this new error: Library\PackageCache\[email protected]\Unity.Entities\RetainBlobAssetSystem.cs(6,5): error SGICE002: Seeing this error indicates a bug in the dots compiler. We'd appreciate a bug report (About->Report a Bug...). Thnx! <3 System.IO.IOException: Cannot create 'C:\Users\emili\My project\Library\Bee\artifacts\1900b0aE.dag\Unity.Entities.AdditionalFile.txt' because a file or directory with the same name already exists.

Comment  Show   3  Share  _

Reproduced web page: No information on error with full stack traces enabled - Unity Answers

Guess you like

Origin blog.csdn.net/weixin_42565127/article/details/125990221