Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Errors when ending playmode
#7
(28-01-2020, 04:24 PM)josemendez Wrote: Just checked the codebase and no included script removes the ObiRope component of an object at runtime. There's no code in Obi 5.1 (afaik) that could lead to these:

Code:
Can't remove ObiRope (Script) because ObiPathSmoother (Script), ObiParticleRenderer (Script), ObiParticleAttachment (Script), ObiParticleAttachment (Script), ObiRopeCursor (Script) depends on it.
Can't remove ObiPathSmoother (Script) because ObiRopeLineRenderer (Script) depends on it

This will happen if a script tries to remove the ObiRope component of an object without removing all other components that depend on it first. Have you written any custom scripts that do this?
 I have never written any scripts that removes or destroys an Obi Component. The only thing i had (before upgrading to 5.x) was a script to disable a solver - but that's not in use anymore.

(28-01-2020, 04:24 PM)josemendez Wrote: This one:

Code:
NullReferenceException: Object reference not set to an instance of an object
Obi.ObiRope.RebuildConstraintsFromElements () (at Assets/Obi/Scripts/RopeAndRod/Actors/ObiRope.cs:254)
Obi.ObiRopeCursor.ChangeLength (System.Single newLength) (at Assets/Obi/Scripts/RopeAndRod/Actors/ObiRopeCursor.cs:240)

Could only happen if the rope didn't have any distance constraints loaded. Which in turn, can only happen if the rope is not part of a solver. Is the rope part of the hierarchy of a solver?
All ropes and rods are childed under solvers. 
However, I fixed the error (in my update) by checking if the rope and the cursor is enabled;
Code:
if(rope && cursor)
           cursor.ChangeLength(rope.restLength + change);

This tells me that something is disabling the cursor/rope when I stop play mode (before the last update is run), but I can't figure out what it is.
Reply


Messages In This Thread
Errors when ending playmode - by TheMunk - 27-01-2020, 01:35 PM
RE: Errors when ending playmode - by TheMunk - 28-01-2020, 11:10 AM
RE: Errors when ending playmode - by TheMunk - 28-01-2020, 12:14 PM
RE: Errors when ending playmode - by josemendez - 28-01-2020, 12:38 PM
RE: Errors when ending playmode - by TheMunk - 28-01-2020, 12:59 PM
RE: Errors when ending playmode - by josemendez - 28-01-2020, 04:24 PM
RE: Errors when ending playmode - by TheMunk - 28-01-2020, 04:45 PM
RE: Errors when ending playmode - by josemendez - 28-01-2020, 05:00 PM
RE: Errors when ending playmode - by TheMunk - 29-01-2020, 09:56 AM
RE: Errors when ending playmode - by josemendez - 29-01-2020, 10:05 AM
RE: Errors when ending playmode - by TheMunk - 13-02-2020, 10:30 AM
RE: Errors when ending playmode - by josemendez - 13-02-2020, 01:14 PM
RE: Errors when ending playmode - by TheMunk - 13-02-2020, 02:04 PM
RE: Errors when ending playmode - by TheMunk - 13-02-2020, 03:39 PM
RE: Errors when ending playmode - by TheMunk - 13-02-2020, 05:00 PM
RE: Errors when ending playmode - by TheMunk - 19-02-2020, 12:06 PM
RE: Errors when ending playmode - by josemendez - 19-02-2020, 12:15 PM
RE: Errors when ending playmode - by TheMunk - 21-02-2020, 10:26 AM
RE: Errors when ending playmode - by josemendez - 21-02-2020, 11:18 AM
RE: Errors when ending playmode - by TheMunk - 21-02-2020, 12:15 PM
RE: Errors when ending playmode - by josemendez - 21-02-2020, 01:36 PM
RE: Errors when ending playmode - by TheMunk - 21-02-2020, 02:11 PM
RE: Errors when ending playmode - by TheMunk - 25-02-2020, 12:22 PM
RE: Errors when ending playmode - by josemendez - 25-02-2020, 12:35 PM
RE: Errors when ending playmode - by TheMunk - 25-02-2020, 04:09 PM
RE: Errors when ending playmode - by josemendez - 25-02-2020, 04:35 PM
RE: Errors when ending playmode - by TheMunk - 26-02-2020, 09:31 AM
RE: Errors when ending playmode - by TheMunk - 02-03-2020, 10:24 AM
RE: Errors when ending playmode - by TheMunk - 02-03-2020, 04:16 PM
RE: Errors when ending playmode - by josemendez - 09-03-2020, 11:00 AM
RE: Errors when ending playmode - by TheMunk - 09-03-2020, 08:52 AM
RE: Errors when ending playmode - by josemendez - 09-03-2020, 11:01 AM
RE: Errors when ending playmode - by TheMunk - 28-02-2020, 02:37 PM
RE: Errors when ending playmode - by TheMunk - 14-02-2020, 02:44 PM