Search Issue Tracker

Fixed

Fixed in 6000.0.66f1, 6000.3.5f1, 6000.4.0b5, 6000.5.X, 6000.5.0a5

Votes

0

Found in

6000.4.0a1

6000.5.0a5

Issue ID

UUM-125732

Regression

No

Crash on DomainUnloadAutoFree::Forget when allocating or disposing certain-sized nested UnsafeList collections

Kernel (DOTS)

-

How to reproduce:
1. Open the attached “CrashRepro“ project
2. Enter Play Mode
3. Leave Play Mode

Reproducible with: 1.4.0-pre.4 (6000.0.61f1), 1.4.2 (6000.0.61f1, 6000.2.10f1, 6000.3.0b8, 6000.4.0a3)

Reproducible on: macOS 15.6.1 Sequoia (Intel), Windows 10 (by user)
Not reproducible on: No other environment tested

Note: In the “TstCrash” Script, changing the size variable from “64 * 64 * 16“ to “128 * 128 * 16”, will cause Unity to crash when calling “OnCreate“ instead of “OnDestroy“

First few lines of the stack trace:
#0 0x00000107322018 in DomainUnloadAutoFree::Forget(void)
#1 0x00000107cf644e in UnsafeUtility::Free(void
, NativeCollection::Allocator, ScriptingExceptionPtr)
#2 0x00000107cf52b3 in UnsafeUtility_CUSTOM_FreeTracked(void
, NativeCollection::Allocator)
#3 0x000001ef407220 in Unity.Collections.AllocatorManager, Unity.Collections, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.FreeBlock<Unity.Collections.AllocatorManager+AllocatorHandle, Unity.Collections, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null>(Unity.Collections.AllocatorManager+AllocatorHandle&, Unity.Collections, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null t, Unity.Collections.AllocatorManager+Block&, Unity.Collections, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null block) -> System.Void, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089_d8a28626764aa8c00b5c3f7ed60e2592 from Unity.Collections, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
#4 0x000001ef406772 in TstCrash.__codegen__OnDestroy(System.IntPtr self, System.IntPtr state) -> void_7240d4da432ce60841c1e72afc88f407 from Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

  1. Resolution Note (fix version 6000.5.0a5):

    Fixed in 6000.5.0a5

  2. Resolution Note (fix version 6000.4.0b5):

    - Domain allocator will print errors and not crash if user allocates more than the allocator is able to track, or if the user frees more than the number of allocations it can track per frame.
    - Increased the total allowed number of frees-per-frame to be equal to maximum number of allocations. Freeing this number of tracked allocations will be quite slow, but it will no longer crash.
    - Added documentation including the total number of tracked allocations allowed.

  3. Resolution Note (fix version 6000.3.5f1):

    Fixed in 6000.3.5f1

  4. Resolution Note (fix version 6000.0.66f1):

    Fixed in 6000.0.66f1

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.