RimThreaded
RimThreaded copied to clipboard
[SOS2+Bad hygiene] `Explosion could not affect cell (92, 0, 207): System.InvalidOperationException: Collection was modified;`
Describe the bug
Bug regarding dubs bad hygiene SOS2 integration when turrets destroy a ship hull tile.
Steps to reproduce the behavior (VERY IMPORTANT)
-
Run the save file
-
Make sure SOS2 integration in Dub's Bad Hygienes extra options menu is enabled:

-
See that there are errors regarding dubs bad hygiene tiles being destroyed.
-
Scroll down to '....'
-
See error
Error Logs
Explosion could not affect cell (92, 0, 207): System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.HashSet`1+Enumerator[T].MoveNext () [0x00013] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at DubsBadHygiene.PlumbingNet.InitNet () [0x0027c] in <b304e300710b43ab89482da7df6e86f3>:0
at DubsBadHygiene.HygienePipeMapComp.DeregisterPipe (DubsBadHygiene.CompPipe pipe) [0x0001d] in <b304e300710b43ab89482da7df6e86f3>:0
at DubsBadHygiene.CompPipe.PostDeSpawn (Verse.Map map) [0x00006] in <b304e300710b43ab89482da7df6e86f3>:0
at (wrapper dynamic-method) Verse.ThingWithComps.Verse.ThingWithComps.DeSpawn_Patch1(Verse.ThingWithComps,Verse.DestroyMode)
at (wrapper dynamic-method) Verse.Building.Verse.Building.DeSpawn_Patch1(Verse.Building,Verse.DestroyMode)
at Verse.Thing.Destroy (Verse.DestroyMode mode) [0x00069] in <720a4e30fed64864bd8af057c96d4eb5>:0
at Verse.ThingWithComps.Destroy (Verse.DestroyMode mode) [0x00007] in <720a4e30fed64864bd8af057c96d4eb5>:0
at (wrapper dynamic-method) Verse.Building.Verse.Building.Destroy_Patch3(Verse.Building,Verse.DestroyMode)
at Verse.Thing.Kill (System.Nullable`1[T] dinfo, Verse.Hediff exactCulprit) [0x00000] in <720a4e30fed64864bd8af057c96d4eb5>:0
at (wrapper dynamic-method) Verse.DamageWorker.Verse.DamageWorker.Apply_Patch1(Verse.DamageWorker,Verse.DamageInfo,Verse.Thing)
at Verse.DamageWorker_AddInjury.Apply (Verse.DamageInfo dinfo, Verse.Thing thing) [0x0000a] in <720a4e30fed64864bd8af057c96d4eb5>:0
at (wrapper dynamic-method) Verse.Thing.Verse.Thing.TakeDamage_Patch0(Verse.Thing,Verse.DamageInfo)
at Verse.DamageWorker.ExplosionDamageThing (Verse.Explosion explosion, Verse.Thing t, System.Collections.Generic.List`1[T] damagedThings, System.Collections.Generic.List`1[T] ignoredThings, Verse.IntVec3 cell) [0x00127] in <720a4e30fed64864bd8af057c96d4eb5>:0
at (wrapper dynamic-method) Verse.DamageWorker.Verse.DamageWorker.ExplosionAffectCell_Patch0(Verse.DamageWorker,Verse.Explosion,Verse.IntVec3,System.Collections.Generic.List`1<Verse.Thing>,System.Collections.Generic.List`1<Verse.Thing>,bool)
at Verse.Explosion.AffectCell (Verse.IntVec3 c) [0x00053] in <720a4e30fed64864bd8af057c96d4eb5>:0
at Verse.Explosion.Tick () [0x0003d] in <720a4e30fed64864bd8af057c96d4eb5>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string)
Verse.Explosion:Tick ()
RimThreaded.TickList_Patch:NormalThingTick ()
RimThreaded.RimThreaded:ExecuteTicks ()
RimThreaded.RimThreaded:ProcessTicks (RimThreaded.RimThreaded/ThreadInfo)
RimThreaded.RimThreaded:InitializeThread (object)
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart (object)
Player.log
**HugsLib
https://gist.github.com/a0f077767efaa53478070985bcddd637
Save file
Screenshots
Update: Destroying something with a disassembler nanite on it will also net an error.

Update: Railgun batteries destroying front of LeviathanMKII. The bottom is being destroyed by disassembler nanites, which nets errors whenever a pink fire thing destroys a ship hull piece with hygiene pipes within it.
