Search Issue Tracker

Fixed in 2020.1

Votes

19

Found in

2018.2.0b10

Issue ID

1054493

Regression

No

[Windows] Memory leak on .Net 4.x and x86 builds

Windows

-

To reproduce:

1. Download attached project "MemoryUsage.zip" and open in Unity
2. Open "SampleScene" scene
3. Enter Play mode
4. Observe that Memory usage is within 200 MB
5. Exit Play mode
6. Change Scripting Runtime Version to ".NET 3.5 Equivalent" and Scripting Backend to "Mono"
7. Set Target Platform to "Windows" and Architecture to "x86_64"
8. Build And Run
9. Observe that Memory usage is within 200 MB
10. Set Architecture to "x86"
11. Build And Run
12. Observe that Memory usage is within 200 MB
13. Change Scripting Runtime Version to ".NET 4.x Equivalent"
14. Set Architecture to "x86_64"
15. Build And Run
16. Observe that Memory usage is within 200 MB
17. Set Architecture to "x86"
18. Build And Run

Expected result: You will see that Memory usage is still within 200 MB
Actual result: You will see that Memory usage allocates up to 3GB until it produces "out of memory" exceptions

Notes:
- This issue reproduces only on Windows
- If you set Scripting Backend to "IL2CPP" and Architecture to "x86", the build will crash

Reproduced on Unity 2017.1.4p2, 2017.2.3p2, 2017.3.2f1, 2017.4.6f1, 2018.1.7f1, 2018.2.0b11 and 2018.3.0a3

Comments (8)

  1. C0eb4f1ada8292ce2b5a23b1e33bd9b3?d=mm

    SR_Developer

    Aug 29, 2020 16:05

    Is this going to be back fixed to 2018 or 2019 LTS?

  2. 3c3909e9bdef69e48c1a844cd3373073?d=mm

    stefan-studiocenturion

    Jun 06, 2020 22:32

    We've hit this bug too in 2018.4 LTS (our x86 build runs out of memory whereas x64 builds stay at 500MB consistently) - any chance of implementing this fix in past LTS versions?

  3. 1bba3a1ed8011cef58aaf3f73dc574c1?d=mm

    HighSkillz

    Feb 07, 2020 15:42

    Will we have to wait until 2020.1 (release, we don't want to use alfa or beta builds) to get this fixed? Why not backport this to 2019 releases? This is a very serious issue...

  4. 6e72d1996055f6d34af123a2097371eb?d=mm

    mdeverdelhan

    Sep 27, 2019 09:16

    We also have this bug, and it's blocking us on hololens (V1) on version 2018.4.8f1. As we are stick with X86 builds on this plateform, is there any plan to have a patch for this bug on 2018 LTS versions ?

  5. 5d847efdb7e1b6aa754f30287da32085?d=mm

    MartinGrman

    Sep 09, 2019 13:13

    Also reproducible in Unity 2018.4.8 in UWP il2cpp x86 builds (x64 is fine).
    See https://bitbucket.org/reflekt/unity_il2cpp_memory_bug/src/master/

  6. 48d0dbf9719b50eb4073db15552dfc19?d=mm

    unormal

    Jul 09, 2019 06:12

    Please, this is such a critical issue, it's been a year. I'm begging you.

  7. 3850a47041b00bbcaadbac5c320a1665?d=mm

    DylanKliment

    Sep 18, 2018 14:26

    My apologies, but were you using the Entities/ECS package as well? I removed just ECS package and the memory leak went away.

  8. 3850a47041b00bbcaadbac5c320a1665?d=mm

    DylanKliment

    Sep 18, 2018 14:13

    This is also reproducible in 2018.2.8f1 and .6f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.