Search Issue Tracker

Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.

Postponed

Votes

0

Found in

2018.4

2019.4

2019.4.1f1

2020.1

2020.2

2021.1

Issue ID

1258637

Regression

No

Out of memory crash when repeatedly entering/exiting Play Mode while increasing a Mesh's Submesh Count

Mesh

-

How to reproduce:
1. Open attached project "Case_1258637" and load Scene "SampleScene"
2. Start repeatedly entering and exiting Play Mode

Reproducible with: 2018.4.28f1, 2019.4.12f1, 2020.1.9f1, 2020.2.0b7, 2021.1.0a1

First lines of the stack trace:
0x00007ff65209bde4 (Unity) DualThreadAllocator<DynamicHeapAllocator>::Allocate
0x00007ff652095f05 (Unity) MemoryManager::Allocate
0x00007ff652095ddc (Unity) MemoryManager::Allocate
0x00007ff652095ddc (Unity) MemoryManager::Allocate
0x00007ff65209ad1c (Unity) malloc_internal

Notes:
1. As more memory is used, entering/exiting starts taking more time, until the Editor/the entire machine starts freezing up and eventually crashes
2. Submesh Count is preserved after exiting Play Mode, however, it resets to the initial value upon restarting the Editor
3. Freezing becomes very noticeable after ~20-25 times of entering and exiting Play Mode
4. Often freezes the entire machine, not just the Editor

  1. Resolution Note:

    The editor is running out of memory because triangles are added to the sharedMesh and will therefore persist after Play Mode is exited.

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.