Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Trying to add DistanceConstraint for my TearableCloth but getting IndexOutOfRange
#17
(09-08-2022, 07:23 AM)josemendez Wrote: Hi,

By "disabling Burst" I meant disabling the Burst compiler, not switching to another backend.


This is exactly what disabling Burst accomplishes. The Burst backend and the Burst compiler are two different things. The "Burst" backend is named that way because it makes use of Unity's Burst compiler to compile its code. Disabling the Burst compiler will allow Unity to provide full stack traces for the error, which will make debugging much easier - as the error message itself suggests to do.

To disable Burst, go to Jobs->Burst->Enable compilation and untick "Enable compilation".
See: https://docs.unity3d.com/Packages/com.un...index.html

kind regards,

Thanks for the instructions!

I disabled the compilation and here is the error message:


Code:
IndexOutOfRangeException: Index 0 is out of range of '0' Length.
Unity.Collections.NativeArray`1[T].FailOutOfRangeError (System.Int32 index) (at <2e6610ed29844f85a37924f81509fe5d>:0)
Unity.Collections.NativeArray`1[T].CheckElementReadAccess (System.Int32 index) (at <2e6610ed29844f85a37924f81509fe5d>:0)
Unity.Collections.NativeArray`1[T].get_Item (System.Int32 index) (at <2e6610ed29844f85a37924f81509fe5d>:0)
Obi.BurstDistanceConstraintsBatch+DistanceConstraintsBatchJob.Execute (System.Int32 i) (at Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Distance/BurstDistanceConstraintsBatch.cs:101)
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 <2e6610ed29844f85a37924f81509fe5d>:0)
Unity.Jobs.JobHandle:ScheduleBatchedJobsAndComplete(JobHandle&)
Unity.Jobs.JobHandle:Complete()
Obi.BurstJobHandle:Complete() (at Assets/Obi/Scripts/Common/Backends/Burst/BurstJobHandle.cs:20)
Obi.ObiUpdater:Substep(Single, Single, Int32) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:78)
Obi.ObiFixedUpdater:FixedUpdate() (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:50)
Reply


Messages In This Thread
RE: Trying to add DistanceConstraint for my TearableCloth but getting IndexOutOfRange - by snowtv - 09-08-2022, 08:53 PM