How to reproduce:
1. Open the attached “IN-124013” project
2. Open the “h” scene
3. Enter Play mode
4. In the Hierarchy, close the Sub Scene
5. Observe the crash
Reproducible with: 6000.0.0b11, 6000.0.63f1, 6000.2.15f1, 6000.3.0f1, 6000.4.0b1, 6000.5.0a3
Could not test with: 2023.3.0b10 (could not solve errors from downgrading)
Reproduced on: Windows 11
Not reproduced on: No other environment tested
Notes:
- If it doesn’t crash after step 3, close and re-open the Sub Scene multiple times or exit then re-enter Play mode
- Also reproducible on a fresh project
First few lines of the stack trace:
0x00007FF9E1EDDD10 (Unity) DualThreadAllocator<DynamicHeapAllocator>::Contains
0x00007FF9E1ED7977 (Unity) MemoryManager::TryDeallocateWithLabel
0x00007FF9E1ED9393 (Unity) free_alloc_internal
0x00007FF9E18DB9C2 (Unity) UnsafeUtility::Free
0x00007FF9E177DB37 (Unity) UnsafeUtility_CUSTOM_FreeTracked