I’m not sure if this is a duplicate on Github so I post it here.
Happens by chance when:
Develop a rather large colony. (You can achieve this by check Infinite Compound, bind then unbind)
Find a group of bacteria with Pilus
Try to engulf them
Some cells in your colony will die, and by chance some cells will be removed from your colony and form their own (I don’t know why), and chances are when forming, one happens to die.
I’ve seen code that any cell leaving the colony (either due to death or otherwise) will first detach all cells connected to them, so the cells that would be in the “detached” chain should have been kicked out of the colony. I’ve tested this multiple times with 3 cell colony where I intentionally killed the middle cell with a floating toxin and that worked as expected.
Well, to reproduce this bug, you need a rather large colony. (Maybe 10+ cells) A cell in the middle is killed, so the colony splits into two (Edit: Maybe not? I don’t really know the reason for the following crash)
Append:
I’m having this disposed RigidBody in my colony. I don’t know where it is disposed, but the truth is that the game keeps crashing.
Okay so it looks like hostileEngulfer variable refers to a disposed microbe. I think we may be able to fix this by either making it so that the current microbe detects that the hostileEngulfer is gone (maybe with a physics callback or a just flatout object disposed check here, which I wouldn’t prefer) or the alternative is that the hostileEngulfer microbe when it is destroyed notifies any microbe it is engulfing that it is going to be destroyed.