Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Crash on adding and removing during runtime
#2
(19-01-2018, 01:55 AM)Guedez Wrote: I have a skinned overcoat which it's bottom half use Obi to simulate cloth.
If I equip and unequip it enough times, unity editor crashes.

Works fine in edit mode, I can equip/unequip at will and it never crashes, but it crashes before the 5th equip in play mode

Sometimes it happens right after equiping/unequiping (webm)
Sometimes after equipping, the overcoat will not follow the model and crash soon afterwards (crash log)

webm (I am clicking a object finder window to equip/unequip the jacket): https://webmshare.com/LPWNr (the video stops when unity crashes)
crash log: https://pastebin.com/3QGUvSSb

Hi,

There's lots of null reference exceptions in your log, all point to Obi.ObiClothProxy.Source_OnRemovedFromSolver.

This method is called when you set cloth.Solver to something different to what it previously had. It removes the cloth from its old solver before adding it to the new one.

Thing is, under no circumstance can the solver be null when calling this method. So the only possibility left is that you're destroying the ObiClothProxy's source (the ObiCloth component) before destroying the proxy itself, orphaning the proxy without notifying it first that the cloth has left the solver. This is however quite unexpected, I can't quite figure out any situation in which this could happen.

Can you please post the code used to equip/unequip, and a pic/explanation of the hierarchy structure of your characters?
Reply


Messages In This Thread
RE: Crash on adding and removing during runtime - by josemendez - 19-01-2018, 10:46 AM