Unhandled exception error while engulfing and getting hurt in multicellular stage

I’m playing current verson 0.6.4.1 Had already 6 cells as a structure, was in the procces of growing the second one, tried to engulf something while getting pierced by another cell when the game crashed, I don’t think i had low enough health to die but it may be related, followed instructions to report the error here
Log

Crash report

1 Like

Thanks for the report. I had not seen this before.

Here’s the crash from the log:

ERROR: System.IndexOutOfRangeException: Index was outside the bounds of the array.
ERROR: 
ERROR:   at Components.MicrobeColonyHelpers.GetMicrobeFromSubShape (Components.MicrobeColony& colony, Components.MicrobePhysicsExtraData& physicsExtraData, System.UInt32 subShape, DefaultEcs.Entity& microbe) [0x0001f] in <301006abc0b74455808ece2c77496c9b>:0 
ERROR: 
ERROR:   at Systems.PilusDamageSystem.Update (System.Single delta, DefaultEcs.Entity& entity) [0x000b8] in <301006abc0b74455808ece2c77496c9b>:0 
ERROR: 
ERROR:   at DefaultEcs.System.AEntitySetSystem`1[T].Update (T state, System.ReadOnlySpan`1[T] entities) [0x0000f] in <71cea9262b2d4f47b57b59fbd6ae9b26>:0 
ERROR: 
ERROR:   at DefaultEcs.System.AEntitySetSystem`1[T].Update (T state) [0x000c3] in <71cea9262b2d4f47b57b59fbd6ae9b26>:0 
ERROR: 
ERROR:   at MicrobeWorldSimulation.OnProcessFixedLogic (System.Single delta) [0x00150] in <301006abc0b74455808ece2c77496c9b>:0 
ERROR: 
ERROR:   at WorldSimulation.ProcessLogic (System.Single delta) [0x00092] in <301006abc0b74455808ece2c77496c9b>:0 
ERROR: 
ERROR:   at WorldSimulation.ProcessAll (System.Single delta) [0x00000] in <301006abc0b74455808ece2c77496c9b>:0 
ERROR: 
ERROR:   at MicrobeStage._Process (System.Single delta) [0x00083] in <301006abc0b74455808ece2c77496c9b>:0 

Looking at the code I saw that I was already trying to prevent crashing due to collision index data being out of sync (it takes one extra frame for it to be updated after a colony changes shape). But I noticed that I had accidentally written index > length when I should have written index >= length. Here’s the PR that should fix the problem:

1 Like