Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Errors with version 5.6
#1
Have been struggling getting Obi Rope to work. Here's the steps I've taken:

Unity version: 2020.1.0b14.4034
OS version: macOS 10.15.6

  1. Created a new project from unity hub
  2. Imported Obi Rope 5.6 using package manager
  3. Created a rope blueprint
  4. Created a rope 
  5. Dragged rope blueprint onto the rope
  6. 3 errors in console:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <fb001e01371b4adca20013e0ac763896>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <fb001e01371b4adca20013e0ac763896>:0)
Obi.ObiRope.RebuildElementsFromConstraintsInternal () (at Assets/Obi/Scripts/RopeAndRod/Actors/ObiRope.cs:322)
Obi.ObiRopeBase.RebuildElementsFromConstraints () (at Assets/Obi/Scripts/RopeAndRod/Actors/ObiRopeBase.cs:67)
Obi.ObiRope.LoadBlueprint (Obi.ObiSolver solver) (at Assets/Obi/Scripts/RopeAndRod/Actors/ObiRope.cs:165)
Obi.ObiSolver.AddActor (Obi.ObiActor actor) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1089)
Obi.ObiActor.AddToSolver () (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:312)
Obi.ObiRopeEditor.OnInspectorGUI () (at Assets/Obi/Editor/RopeAndRod/ObiRopeEditor.cs:127)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:535)
UnityEngine.GUIUtilityLenguarocessEvent(Int32, IntPtr, Boolean&) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <fb001e01371b4adca20013e0ac763896>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <fb001e01371b4adca20013e0ac763896>:0)
Obi.ObiRope.RebuildElementsFromConstraintsInternal () (at Assets/Obi/Scripts/RopeAndRod/Actors/ObiRope.cs:322)
Obi.ObiRopeBase.RebuildElementsFromConstraints () (at Assets/Obi/Scripts/RopeAndRod/Actors/ObiRopeBase.cs:67)
Obi.ObiPathSmoother.GenerateSmoothChunks (Obi.ObiRopeBase actor, System.UInt32 smoothingLevels) (at Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs:150)
Obi.ObiPathSmoother.Actor_OnInterpolate (Obi.ObiActor actor) (at Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs:61)
Obi.ObiActor.Interpolate () (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:1129)
Obi.ObiSolver.Interpolate (System.Single stepTime, System.Single unsimulatedTime) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1502)
Obi.ObiUpdater.Interpolate (System.Single stepDeltaTime, System.Single accumulatedTime) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:115)
Obi.ObiFixedUpdater.Update () (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:79)

IndexOutOfRangeException: Index was outside the bounds of the array.
Obi.ObiRope.RebuildElementsFromConstraintsInternal () (at Assets/Obi/Scripts/RopeAndRod/Actors/ObiRope.cs:304)
Obi.ObiRopeBase.RebuildElementsFromConstraints () (at Assets/Obi/Scripts/RopeAndRod/Actors/ObiRopeBase.cs:67)
Obi.ObiPathSmoother.GenerateSmoothChunks (Obi.ObiRopeBase actor, System.UInt32 smoothingLevels) (at Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs:150)
Obi.ObiPathSmoother.Actor_OnInterpolate (Obi.ObiActor actor) (at Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs:61)
Obi.ObiActor.Interpolate () (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:1129)
Obi.ObiSolver.Interpolate (System.Single stepTime, System.Single unsimulatedTime) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1502)
Obi.ObiUpdater.Interpolate (System.Single stepDeltaTime, System.Single accumulatedTime) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:115)
Obi.ObiFixedUpdater.Update () (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:79)

I took a took at the source quickly, but couldn't see the problem
Reply
#2
Hi there,

This is a bug in Obi. Thanks for reporting this! It should not stop the rope path editor or simulation from working though.

The fix is simple: open up ObiRope.cs, and change line 291 (in RebuildElementsFromConstraintsInternal method) to be:

if (dc == null || dc.GetBatchCount() < 2)

That should do it. Let me know how it goes!
Reply
#3
(22-09-2020, 07:33 AM)josemendez Wrote: Hi there,

This is a bug in Obi. Thanks for reporting this! It should not stop the rope path editor or simulation from working though.

The fix is simple: open up ObiRope.cs, and change line 291 (in RebuildElementsFromConstraintsInternal method) to be:

if (dc == null || dc.GetBatchCount() < 2)

That should do it. Let me know how it goes!
 
Fixed, many thanks.
Reply