18-08-2021, 08:09 PM
(This post was last modified: 18-08-2021, 08:51 PM by timconkling.)
After upgrading to Unity 2020.3.16f1 (from 2020.3.15), many of my ObiCloth objects have recently started throwing this error when entering Play Mode:
Sometimes this is seemingly harmless, and sometimes it results in, for example, my main character's gown being frozen in place:
If I manually disable and re-enable the cloth's `ObiLateFixedUpdater` component at runtime, the cloth simulates properly.
I'm not sure what triggered this - I just updated to Obi 6.2 (from 6.1), and also updated to Burst 1.5.6 (from 1.5.5), but rolling back both of those changes doesn't solve the issue. EDIT: Aha - this was triggered by a Unity update. In Unity 2020.3.15f2, I don't get this error. In Unity 2020.3.16f1 - the most recent LTE release as of today - I do.
(I'm using the Burst backend for Obi.)
Any thoughts on what might be going wrong?
Code:
ObjectDisposedException: Cannot access a disposed object.
Object name: 'The NativeArray has been disposed, it is not allowed to access it'.
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckExistsAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle& handle) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Jobs/AtomicSafetyHandle.bindings.cs:186)
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.ValidateNonDefaultHandle (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle& handle) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Jobs/AtomicSafetyHandle.bindings.cs:175)
Unity.Collections.NativeArray`1[T].get_Length () (at /Users/bokken/buildslave/unity/build/Runtime/Export/NativeArray/NativeArray.cs:117)
Obi.BurstColliderCollisionConstraints.GetConstraintCount () (at Assets/ThirdParty/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderCollisionConstraints.cs:27)
Obi.BurstSolverImpl.GetConstraintCount (Oni+ConstraintType type) (at Assets/ThirdParty/Obi/Scripts/Common/Backends/Burst/Solver/BurstSolverImpl.cs:405)
Obi.ObiSolver.EndStep (System.Single substepTime) (at Assets/ThirdParty/Obi/Scripts/Common/Solver/ObiSolver.cs:1577)
Obi.ObiUpdater.EndStep (System.Single substepDeltaTime) (at Assets/ThirdParty/Obi/Scripts/Common/Updaters/ObiUpdater.cs:92)
Obi.ObiLateFixedUpdater.LateFixedUpdate () (at Assets/ThirdParty/Obi/Scripts/Common/Updaters/ObiLateFixedUpdater.cs:67)
Obi.ObiLateFixedUpdater+<RunLateFixedUpdate>d__6.MoveNext () (at Assets/ThirdParty/Obi/Scripts/Common/Updaters/ObiLateFixedUpdater.cs:51)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
Sometimes this is seemingly harmless, and sometimes it results in, for example, my main character's gown being frozen in place:
If I manually disable and re-enable the cloth's `ObiLateFixedUpdater` component at runtime, the cloth simulates properly.
I'm not sure what triggered this - I just updated to Obi 6.2 (from 6.1), and also updated to Burst 1.5.6 (from 1.5.5), but rolling back both of those changes doesn't solve the issue. EDIT: Aha - this was triggered by a Unity update. In Unity 2020.3.15f2, I don't get this error. In Unity 2020.3.16f1 - the most recent LTE release as of today - I do.
(I'm using the Burst backend for Obi.)
Any thoughts on what might be going wrong?