Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using Burst backend causes Runtime Crash
#1
Hi,

I am trying to used Burst backend but getting this exceptions. any ideas ?

ArgumentException: source and destination length must be the same
Unity.Collections.NativeArray`1[T].CheckCopyLengths (System.Int32 srcLength, System.Int32 dstLength) (at <cfc1ad890650411e946cff2e6f276711>:0)
Unity.Collections.NativeArray`1[T].Copy (T[] src, Unity.Collections.NativeArray`1[T] dst) (at <cfc1ad890650411e946cff2e6f276711>:0)
Unity.Collections.NativeArray`1[T].CopyFrom (T[] array) (at <cfc1ad890650411e946cff2e6f276711>:0)
Unity.Collections.NativeList`1[T].CopyFrom (T[] array) (at Library/PackageCache/com.unity.collections@0.1.1-preview/Unity.Collections/NativeList.cs:479)
Obi.BurstSolverImpl.SetSimplices (System.Int32[] simplices, Obi.SimplexCounts counts) (at Assets/ObiCloth/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BurstSolverImpl.cs:301)
Obi.ObiSolver.PushSimplices () (at Assets/ObiCloth/Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1379)
Obi.ObiSolver.PushActiveParticles () (at Assets/ObiCloth/Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1303)
Obi.ObiSolver.BeginStep (System.Single stepTime) (at Assets/ObiCloth/Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1512)
Obi.ObiUpdater.BeginStep (System.Single stepDeltaTime) (at Assets/ObiCloth/Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:49)
Obi.ObiFixedUpdater.FixedUpdate () (at Assets/ObiCloth/Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:44)
Reply
#2
(30-09-2021, 09:57 AM)smohser Wrote: Hi,

I am trying to used Burst backend but getting this exceptions. any ideas ?

ArgumentException: source and destination length must be the same
Unity.Collections.NativeArray`1[T].CheckCopyLengths (System.Int32 srcLength, System.Int32 dstLength) (at <cfc1ad890650411e946cff2e6f276711>:0)
Unity.Collections.NativeArray`1[T].Copy (T[] src, Unity.Collections.NativeArray`1[T] dst) (at <cfc1ad890650411e946cff2e6f276711>:0)
Unity.Collections.NativeArray`1[T].CopyFrom (T[] array) (at <cfc1ad890650411e946cff2e6f276711>:0)
Unity.Collections.NativeList`1[T].CopyFrom (T[] array) (at Library/PackageCache/com.unity.collections@0.1.1-preview/Unity.Collections/NativeList.cs:479)
Obi.BurstSolverImpl.SetSimplices (System.Int32[] simplices, Obi.SimplexCounts counts) (at Assets/ObiCloth/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BurstSolverImpl.cs:301)
Obi.ObiSolver.PushSimplices () (at Assets/ObiCloth/Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1379)
Obi.ObiSolver.PushActiveParticles () (at Assets/ObiCloth/Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1303)
Obi.ObiSolver.BeginStep (System.Single stepTime) (at Assets/ObiCloth/Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1512)
Obi.ObiUpdater.BeginStep (System.Single stepDeltaTime) (at Assets/ObiCloth/Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:49)
Obi.ObiFixedUpdater.FixedUpdate () (at Assets/ObiCloth/Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:44)

Hi there,

I'm unable to reproduce this issue,

- What Unity/Obi versions are you using?
- Which versions of the Burst dependencies are you using?
- What are the contents of the scene that causes this?
Reply
#3
(30-09-2021, 10:20 AM)josemendez Wrote: Hi there,

I'm unable to reproduce this issue,

- What Unity/Obi versions are you using?
- Which versions of the Burst dependencies are you using?
- What are the contents of the scene that causes this?
Hi,

- Unity 2020.3.14f1, obi 6.2

- "com.unity.burst": "1.4.11"
   "com.unity.collections": "0.1.1-preview"

-any of the sample scenes from obi softbody
Reply
#4
(30-09-2021, 11:04 AM)smohser Wrote: Hi,

- Unity 2020.3.14f1, obi 6.2

- "com.unity.burst": "1.4.11"
   "com.unity.collections": "0.1.1-preview"

-any of the sample scenes from obi softbody

Tried with that exact same versions, but all sample scenes work correctly for me. Tried running with/without the jobs debugger enabled and Burst's safety checks, made no difference. Would you please send a repro project to support(at)virtualmethodstudio.com? That's probably the fastest way to reproducing and fixing this.
Reply
#5
(30-09-2021, 11:42 AM)josemendez Wrote: Tried with that exact same versions, but all sample scenes work correctly for me. Tried running with/without the jobs debugger enabled and Burst's safety checks, made no difference. Would you please send a repro project to support(at)virtualmethodstudio.com? That's probably the fastest way to reproducing and fixing this.
before i do that, i forgot to tell you something important Sonrisa. I am using obi softbody with obi cloth in the same project. so I am using the same common scripts. Is this OK ?
Reply
#6
(30-09-2021, 11:51 AM)smohser Wrote: before i do that, i forgot to tell you something important Sonrisa. I am using obi softbody with obi cloth in the same project. so I am using the same common scripts. Is this OK ?

As long as you're using the exact same version for both, is ok. Don't mix different versions (Softbody 6.2 and Cloth 6.1, for instance) as that will mix and match scripts that might work differently, leading to issues. From the FAQ:

Quote:How do I install several Obi assets (eg. ObiCloth and ObiRope) together in the same project?

First make sure both assets are the same version (for instance, you can't install 5.1 and 6.2 together in the same project). Then, simply import both packages into the project.
Reply