26-11-2020, 03:09 AM
I recently tried to upgrade one of my projects from Obi 5.6.0 to 5.6.1 (I'm using Fluid and Rope) and I now get many instances of this error when starting Play mode (with either Burst or Oni):
I tried one of the Sample programs (FaucetAndBucket) while in my project and got some different results. With the Burst solver, I get this:
If I try to run that sample with the Oni solver, Unity just crashes immediately.
However, I'm not able to recreate these issues in a fresh project - the sample scene works fine with either Burst or Oni. I've tried reinstalling the Obi package in my problem project (and deleting/rebuilding the Library in case something was cached) but get the same results.
Do you have any idea what would be causing these errors, if there might be some setting or misconfiguration that would cause this to start happening now when it was fine in 5.6.0? Thanks.
Code:
IndexOutOfRangeException: Index was outside the bounds of the array.
Obi.BIH.Build (Obi.IBounded[]& elements, System.Int32 maxDepth, System.Single maxOverlap) (at Assets/Obi/Scripts/Common/DataStructures/BVH/BIH.cs:63)
Obi.ObiTriangleMeshContainer.GetOrCreateTriangleMesh (UnityEngine.Mesh source) (at Assets/Obi/Scripts/Common/Collisions/ObiTriangleMeshContainer.cs:92)
Obi.ObiColliderWorld.GetOrCreateTriangleMesh (UnityEngine.Mesh mesh) (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:229)
Obi.ObiMeshShapeTracker.UpdateIfNeeded () (at Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiMeshShapeTracker.cs:38)
Obi.ObiColliderBase.UpdateIfNeeded () (at Assets/Obi/Scripts/Common/Collisions/ObiColliderBase.cs:189)
Obi.ObiColliderWorld.UpdateWorld () (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:362)
Obi.ObiUpdater.BeginStep (System.Single stepDeltaTime) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:40)
Obi.ObiFixedUpdater.FixedUpdate () (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:54)
I tried one of the Sample programs (FaucetAndBucket) while in my project and got some different results. With the Burst solver, I get this:
Code:
IndexOutOfRangeException: Index 0 is out of range of '0' Length.
Unity.Collections.NativeArray`1[T].FailOutOfRangeError (System.Int32 index) (at <526469d5a48c43eebd9af19f8745afa1>:0)
Unity.Collections.NativeArray`1[T].CheckElementReadAccess (System.Int32 index) (at <526469d5a48c43eebd9af19f8745afa1>:0)
Unity.Collections.NativeArray`1[T].get_Item (System.Int32 index) (at <526469d5a48c43eebd9af19f8745afa1>:0)
Obi.BurstDistanceField.DFTraverse (Unity.Mathematics.float4 particlePosition, System.Int32 nodeIndex, Obi.DistanceFieldHeader& header, Unity.Collections.NativeArray`1[Obi.BurstDFNode]& dfNodes) (at Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstDistanceField.cs:50)
Obi.BurstDistanceField.Contacts (System.Int32 particleIndex, System.Int32 colliderIndex, Unity.Mathematics.float4 position, Unity.Mathematics.quaternion orientation, Unity.Mathematics.float4 radii, Unity.Collections.NativeArray`1[Obi.BurstDFNode]& dfNodes, Obi.DistanceFieldHeader header, Obi.BurstAffineTransform colliderToSolver, Obi.BurstColliderShape shape, Unity.Collections.NativeQueue`1+ParallelWriter[T] contacts) (at Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstDistanceField.cs:33)
Obi.BurstColliderWorld+GenerateContactsJob.GenerateContacts (Obi.ColliderShape+ShapeType colliderType, System.Int32 particleIndex, System.Int32 colliderIndex, Unity.Mathematics.float4 particlePosition, Unity.Mathematics.quaternion particleOrientation, Unity.Mathematics.float4 particleVelocity, Unity.Mathematics.float4 particleRadii, Obi.BurstAffineTransform colliderToSolver, Obi.BurstColliderShape shape, Unity.Collections.NativeQueue`1+ParallelWriter[T] contacts, System.Single dt) (at Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderWorld.cs:408)
Obi.BurstColliderWorld+GenerateContactsJob.Execute (System.Int32 i) (at Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderWorld.cs:328)
Unity.Jobs.IJobParallelForExtensions+ParallelForJobStruct`1[T].Execute (T& jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at <526469d5a48c43eebd9af19f8745afa1>:0)
If I try to run that sample with the Oni solver, Unity just crashes immediately.
However, I'm not able to recreate these issues in a fresh project - the sample scene works fine with either Burst or Oni. I've tried reinstalling the Obi package in my problem project (and deleting/rebuilding the Library in case something was cached) but get the same results.
Do you have any idea what would be causing these errors, if there might be some setting or misconfiguration that would cause this to start happening now when it was fine in 5.6.0? Thanks.