ResearchBodies

ResearchBodies

18.4k Downloads

NRE causes the death of the Mission Control building

rasta013 opened this issue ยท 2 comments

commented

Here's the relevant NRE text:

[EXC 23:09:22.851] InvalidOperationException: Collection was modified; enumeration operation may not execute.
System.Collections.Generic.List1+Enumerator[Contracts.Contract].VerifyState () System.Collections.Generic.List1+Enumerator[Contracts.Contract].MoveNext ()
ResearchBodies.ResearchBodies.CheckContracts ()
EventVoid.Fire ()
MissionControlBuilding.OnClicked ()
SpaceCenterBuilding.EnterBuilding ()
SpaceCenterBuilding.OnLeftClick ()
SpaceCenterBuilding+c__Iterator98.MoveNext ()

log files.zip

commented

Yes I thought this might happening looking through the code the other day.
I'm in the process of marking up and revising the code after hand-over.
Two things about this:
It is trying to iterate a list (the offered contracts list) that could change whilst iterating - which is what happened and caused the error above.
It then declines contracts if the Body is yet discovered... that causes a reputation hit depending on your game systems.
Will work on these two fixes together with everything else...

commented

Fixed in V1.7.2. Closing.