Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Problem with IJobParallelForDeferExtensions after upgrade to 2021.2.8f1

Discussion in 'Entity Component System' started by trepan, Jan 26, 2022.

  1. trepan

    trepan

    Joined:
    Feb 11, 2011
    Posts:
    113
    My project was running happily under 2021.2.5f1 before I then upgraded to 2021.2.8f1. With the new version there seem to be major issues in a couple of jobs, one my own, the other within Unity Physics. In both cases it seems there are errors related to use of IJobParallelForDeferExtensions.

    Here are the callstacks:

    IndexOutOfRangeException: Index 4032 is out of range of '0' Length.
    Unity.Collections.NativeArray`1[T].FailOutOfRangeError (System.Int32 index) (at <15e405c9beda435fb78db5a973118bc4>:0)
    Unity.Collections.NativeArray`1[T].CheckElementReadAccess (System.Int32 index) (at <15e405c9beda435fb78db5a973118bc4>:0)
    Unity.Collections.NativeArray`1[T].get_Item (System.Int32 index) (at <15e405c9beda435fb78db5a973118bc4>:0)
    BSD.JobSystems.GenerateLightCellListJob.Execute (System.Int32 index) (at Assets/SCRIPTS/BSD/RenderObject/RenderObjectJobs.cs:185)
    Unity.Jobs.IJobParallelForDeferExtensions+JobParallelForDeferProducer`1[T].Execute (T& jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at Library/PackageCache/com.unity.jobs@0.8.0-preview.23/Unity.Jobs/IJobParallelForDefer.cs:62)

    IndexOutOfRangeException: Index 4 is out of range of '0' Length.
    Unity.Collections.NativeArray`1[T].FailOutOfRangeError (System.Int32 index) (at <15e405c9beda435fb78db5a973118bc4>:0)
    Unity.Collections.NativeArray`1[T].CheckElementReadAccess (System.Int32 index) (at <15e405c9beda435fb78db5a973118bc4>:0)
    Unity.Collections.NativeArray`1[T].get_Item (System.Int32 index) (at <15e405c9beda435fb78db5a973118bc4>:0)
    Unity.Physics.Broadphase+StaticVsDynamicFindOverlappingPairsJob.Execute (System.Int32 index) (at Library/PackageCache/com.unity.physics@0.6.0-preview.3/Unity.Physics/Collision/World/Broadphase.cs:1081)
    Unity.Jobs.IJobParallelForDeferExtensions+JobParallelForDeferProducer`1[T].Execute (T& jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at Library/PackageCache/com.unity.jobs@0.8.0-preview.23/Unity.Jobs/IJobParallelForDefer.cs:62)

    Anyone else seen anything like this? Any ideas what could be at fault?

    For now, I reverted to 2021.2.5 and everything is running fine again...
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,626
  3. trepan

    trepan

    Joined:
    Feb 11, 2011
    Posts:
    113
    Yes, that fixes it. Thank you!
     
  4. sheikhg1900

    sheikhg1900

    Joined:
    Sep 13, 2021
    Posts:
    8
    thanks to post this issue.
     
  5. sheikhg1900

    sheikhg1900

    Joined:
    Sep 13, 2021
    Posts:
    8