Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  BurstColliderWorld errors
#1
Hello,

I have one persistent ObiSolver and an instantiated prefab which contains several ObiColliders. When I change the prefab during the game (i.e destroy old prefab and instantiate new one in a single frame), sometimes the collisions for new prefab are not working and I got these errors:

Code:
System.IndexOutOfRangeException: Index {0} is out of range of '{1}' Length.
Thrown from job: Obi.BurstColliderWorld.IdentifyMovingColliders
This Exception was thrown from a job compiled with Burst, which has limited exception support.
0x00007ff9abb91911 (a49b95c10436014b4afd435e0a8841b) [unknown:0] Unity.Jobs.IJobParallelForExtensions.ParallelForJobStruct`1<Obi.BurstColliderWorld.IdentifyMovingColliders>.Execute
0x00007ff9abb91c11 (a49b95c10436014b4afd435e0a8841b) 5159CC2DF74168DC
0x00007ff61c430d70 (Unity) ExecuteJob
0x00007ff61c431025 (Unity) ExecuteJobCopyData
0x00007ff61c431c6f (Unity) ForwardJobForEachToManaged
0x00007ff61c42d35c (Unity) JobQueue::Exec
0x00007ff61c42f291 (Unity) JobQueue::Steal
0x00007ff61c42d6f0 (Unity) JobQueue::ExecuteJobFromQueue
0x00007ff61c42dbbb (Unity) JobQueue::ProcessJobs
0x00007ff61c42fbcf (Unity) JobQueue::WorkLoop
0x00007ff61c5eac3e (Unity) Thread::RunThreadWrapper
0x00007ffa18a37034 (KERNEL32) BaseThreadInitThunk
0x00007ffa1a1e2651 (ntdll) RtlUserThreadStart

Code:
System.IndexOutOfRangeException: Index {0} is out of range of '{1}' Length.
Thrown from job: Obi.BurstColliderWorld.GenerateContactsJob
This Exception was thrown from a job compiled with Burst, which has limited exception support.
0x00007ff9abb22903 (fcb5d3efc7c0e64da6c5cee02991e6b) [unknown:0] Unity.Jobs.IJobParallelForExtensions.ParallelForJobStruct`1<Obi.BurstColliderWorld.GenerateContactsJob>.Execute
0x00007ff9abb342f1 (fcb5d3efc7c0e64da6c5cee02991e6b) 5A57CE1A4A783826
0x00007ff61c430d70 (Unity) ExecuteJob
0x00007ff61c431025 (Unity) ExecuteJobCopyData
0x00007ff61c431c6f (Unity) ForwardJobForEachToManaged
0x00007ff61c42d35c (Unity) JobQueue::Exec
0x00007ff61c42d61a (Unity) JobQueue::ExecuteJobFromHighPriorityStack
0x00007ff61c42dba9 (Unity) JobQueue::ProcessJobs
0x00007ff61c42fbcf (Unity) JobQueue::WorkLoop
0x00007ff61c5eac3e (Unity) Thread::RunThreadWrapper
0x00007ffa18a37034 (KERNEL32) BaseThreadInitThunk
0x00007ffa1a1e2651 (ntdll) RtlUserThreadStart

Is there any way to fix it?
Reply
#2
(04-05-2021, 02:13 PM)rosedev Wrote: Hello,

I have one persistent ObiSolver and an instantiated prefab which contains several ObiColliders. When I change the prefab during the game (i.e destroy old prefab and instantiate new one in a single frame), sometimes the collisions for new prefab are not working and I got these errors:

Code:
System.IndexOutOfRangeException: Index {0} is out of range of '{1}' Length.
Thrown from job: Obi.BurstColliderWorld.IdentifyMovingColliders
This Exception was thrown from a job compiled with Burst, which has limited exception support.
0x00007ff9abb91911 (a49b95c10436014b4afd435e0a8841b) [unknown:0] Unity.Jobs.IJobParallelForExtensions.ParallelForJobStruct`1<Obi.BurstColliderWorld.IdentifyMovingColliders>.Execute
0x00007ff9abb91c11 (a49b95c10436014b4afd435e0a8841b) 5159CC2DF74168DC
0x00007ff61c430d70 (Unity) ExecuteJob
0x00007ff61c431025 (Unity) ExecuteJobCopyData
0x00007ff61c431c6f (Unity) ForwardJobForEachToManaged
0x00007ff61c42d35c (Unity) JobQueue::Exec
0x00007ff61c42f291 (Unity) JobQueue::Steal
0x00007ff61c42d6f0 (Unity) JobQueue::ExecuteJobFromQueue
0x00007ff61c42dbbb (Unity) JobQueue::ProcessJobs
0x00007ff61c42fbcf (Unity) JobQueue::WorkLoop
0x00007ff61c5eac3e (Unity) Thread::RunThreadWrapper
0x00007ffa18a37034 (KERNEL32) BaseThreadInitThunk
0x00007ffa1a1e2651 (ntdll) RtlUserThreadStart

Code:
System.IndexOutOfRangeException: Index {0} is out of range of '{1}' Length.
Thrown from job: Obi.BurstColliderWorld.GenerateContactsJob
This Exception was thrown from a job compiled with Burst, which has limited exception support.
0x00007ff9abb22903 (fcb5d3efc7c0e64da6c5cee02991e6b) [unknown:0] Unity.Jobs.IJobParallelForExtensions.ParallelForJobStruct`1<Obi.BurstColliderWorld.GenerateContactsJob>.Execute
0x00007ff9abb342f1 (fcb5d3efc7c0e64da6c5cee02991e6b) 5A57CE1A4A783826
0x00007ff61c430d70 (Unity) ExecuteJob
0x00007ff61c431025 (Unity) ExecuteJobCopyData
0x00007ff61c431c6f (Unity) ForwardJobForEachToManaged
0x00007ff61c42d35c (Unity) JobQueue::Exec
0x00007ff61c42d61a (Unity) JobQueue::ExecuteJobFromHighPriorityStack
0x00007ff61c42dba9 (Unity) JobQueue::ProcessJobs
0x00007ff61c42fbcf (Unity) JobQueue::WorkLoop
0x00007ff61c5eac3e (Unity) Thread::RunThreadWrapper
0x00007ffa18a37034 (KERNEL32) BaseThreadInitThunk
0x00007ffa1a1e2651 (ntdll) RtlUserThreadStart

Is there any way to fix it?

Hi there,

I've performed several tests regarding this use case but I can't reproduce this error. The internal collider arrays are updated right at the start of every simulation step, so it shouldn't matter if you add/destroy prefab colliders at runtime.

Could you send a repro scene/project to support(at)virtualmethodstudio.com so that I can take a look at this?

kind regards,
Reply