Hello !
I'm trying to create a priority queue as a native container.
The queue is used in a job, it's allocated in the job constructor with TempJob memory (but it can be resized from within the job), used inside of the job and then disposed outside of the job when I'm done reading the output.
When it is deallocated, UnsafeUtility.Free throws an error :
UnityEngine.StackTraceUtility:ExtractStackTrace ()```. It even crashed the editor once 😦
After trying a few things, it seems the error only happens when I use the queue from a job (everything works fine if I use it from a classic MonoBehaviour script) and only if the queue needed to resize itself. And even when the error occurs, the priority queue works as expected.
I have no idea what is happening 🥲 Would anyone know what could be the cause of this issue ?