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 (5)

  1. 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 ?

  2. 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/

  3. 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.

  4. 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.

  5. 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.