Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Burst Safety Checks
#1
Pregunta 
Hello,
Sonrisa 
Thanks for the latest release!
You've done an awesome job!

Played around with the latest release and stumbled on some errors with Jobs/Burst.

Should Burst Safety Checks be enabled or disabled?
( by default they are enabled )

Asking because if they are enabled - I get array index errors and everything breaks!
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. Turn off burst (Jobs -> Burst -> Enable Compilation) to inspect full exceptions & stacktraces.
Should it be so or I'm missing something?


P.S. ( If Burst Safety Checks are disabled all works fine )

P.S.S ( This is the full stack )

Code:
IndexOutOfRangeException: Index 34 is out of range of '34' Length.
Unity.Collections.NativeArray`1[T].FailOutOfRangeError (System.Int32 index) (at /Users/builduser/buildslave/unity/build/Runtime/Export/NativeArray/NativeArray.cs:255)
Unity.Collections.NativeArray`1[T].CheckElementReadAccess (System.Int32 index) (at /Users/builduser/buildslave/unity/build/Runtime/Export/NativeArray/NativeArray.cs:115)
Unity.Collections.NativeArray`1[T].get_Item (System.Int32 index) (at /Users/builduser/buildslave/unity/build/Runtime/Export/NativeArray/NativeArray.cs:140)
Obi.BurstColliderWorld+IdentifyMovingColliders.Execute (System.Int32 i) (at Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderWorld.cs:135)
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 /Users/builduser/buildslave/unity/build/Runtime/Jobs/Managed/IJobParallelFor.cs:44)
Unity.Jobs.JobHandle:ScheduleBatchedJobsAndComplete(JobHandle&)
Unity.Jobs.JobHandle:Complete() (at /Users/builduser/buildslave/unity/build/Runtime/Jobs/ScriptBindings/JobHandle.bindings.cs:20)
Obi.BurstColliderWorld:UpdateWorld() (at Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderWorld.cs:112)
Obi.ObiColliderWorld:UpdateWorld() (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:376)
Obi.ObiUpdater:BeginStep(Single) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:40)
Obi.ObiFixedUpdater:FixedUpdate() (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:54)
The developer of Area 86 
https://simdevs.com
Reply
#2
Hi there!

Safety checks should be disabled for performance reasons, but nonetheless there should be no errors with them enabled. Will try to reproduce this and get back to you asap.  Sonrisa
Reply
#3
I've been unable to get this to happen in any the sample scenes, or making my own. Can you provide steps to reproduce this?

I have Burst safety checks enabled, synchronous compilation disabled, jobs debugger disabled.
Reply
#4
Hello!

Thanks for looking into this!
Will try to make a test scene with repro steps when will be at home!
The developer of Area 86 
https://simdevs.com
Reply