Steps to reproduce:
- Open a large URP project in Unity 6000.7.0a5 (Mono editor) and keep the session running for several hours with heavy runtime UI Toolkit text usage and repeated script compilations
- Keep working until the Console starts repeating the warning that Allocator.Domain has reached its limit of 262144 tracked allocations and further allocations will not be freed automatically at domain unload or use the attached scripts to simulate this
- Trigger one more script compilation / domain reload
Actual results: The Editor hard-crashes during the domain reload one time (unsaved work lost). Native stack (crash.dmp attached):
MemoryProfiler::GetAllocationRoot
MemoryProfiler::UnregisterAllocation
MemoryManager::RegisterDeallocation / TryDeallocateWithLabel / free_alloc_internal
DomainUnloadAutoFree::AfterDomainUnload
Scripting::Core::UnloadDomain <- MonoManager::CreateAndSetChildDomain <- MonoManager::BeginReloadAssembly
<- CodeReloadManager::BeginCodeReload <- Internal_ADB_Only_ReloadAllUsedAssemblies <- DomainReloadIfAllowed
Expected results: Exceeding the tracked-allocation cap degrades gracefully. The engine already detects and logs the over-limit state,
so the domain unload should free (or safely skip) the untracked overflow without crashing in
MemoryProfiler::GetAllocationRoot on the next reload.
Reproducible with versions: 6000.7.0a5
Can’t test with versions: 6000.0.82f1, 6000.3.23f1, 6000.5.10f1, 6000.6.0b10 (One time crash)
Tested on (OS): Windows 11