Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  [FIXED] Dispose of atomic safety handle error when game start
#12
I recently ran into this exception when upgrading my project to Unity 2022.3. In case it matters (for reproducing the exception), in my project the ObiRope objects are within a second scene which is loaded after launch.

Before I found this thread I addressed it by adding the following condition checks within the #if ENABLE_UNITY_COLLECTIONS_CHECKS. Both were necessary.

Code:
if (!AtomicSafetyHandle.IsDefaultValue(m_SafetyHandle) && AtomicSafetyHandle.IsHandleValid(m_SafetyHandle))
{
    // dispose of atomic safety handle:
    AtomicSafetyHandle.CheckDeallocateAndThrow(m_SafetyHandle);
    AtomicSafetyHandle.Release(m_SafetyHandle);
}
Reply


Messages In This Thread
RE: [FIXED] Dispose of atomic safety handle error when game start - by imtzo - 06-05-2024, 08:28 PM