Select to view content in your preferred language

Unity 6 Memory leak

443
5
03-25-2025 05:22 AM
Labels (1)
ChristofferLindellBolin
Occasional Contributor

Hi,

After upgrading from Unity 2023.1 to Unity 6 I am having a really bad memory leak from ArcGIS and I can't figure out as to why. It is related to the ArcGIS SDK since when disabling it I have great performance.

I have attached a memory snapshot where I compared the memory usage after running 1 hour just rendering the ArcGIS map and it is quite noticeable that an additional 13+ million new objects for ArcGISRuntimeEnvironmentErrorEventInternal is created during this time and this is the cause of the leak. I have no issues rendering the map at all and I receive no other errors.

ArcGIS-memory-leak.png

 

I do however receive the following warnings:

ChristofferLindellBolin_2-1742905254959.png

 

 

System specs:

ChristofferLindellBolin_1-1742905203639.png

ArcGIS Unity SDK 1.7 (have also tried to downgrade to 1.6 that we use in 2023.1 and the memory leak is still present)

 

0 Kudos
5 Replies
ChristofferLindellBolin
Occasional Contributor

I have now updated to 2.0.0 and the issue still persists. I would appreciate if anyone at Esri could take a look into this since this is an urgent need of ours. 

FabioPizzella
Emerging Contributor

Hi,

I'm having the exact same issue and for this reason the app (both macOS and Windows builds) is crashing after a few hours of use (out of RAM). The value you see in the screenshot goes up really fast, allocating a lot of GB over time.

Using Unity 2022.3.62f1 LTS and ArcGIS 2.0.0. 

0 Kudos
ChristofferLindellBolin
Occasional Contributor

I have been in contact with Esri and have received a hotfix from them. This should be fixed in their next release 2.1 during July/August. However, I don't think I am allowed to share the hotfix with you unfortunately unless ESRI gives approval for me to share it. 

0 Kudos
FabioPizzella
Emerging Contributor

@ChristofferLindellBolin thanks a lot for the update! I'll contact them myself about the hotfix.

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi @FabioPizzella 

Unfortunately, there is no hotfix for the issue reported by @ChristofferLindellBolin - they are currently testing a candidate fix only, under the terms of the Esri Early Adopter Programme. Please contact me at MBranscomb@esri.com and we can arrange to include you in the programme for testing this fix.

 

Thanks

Mike