[Solved][1.0] HerdMigration event error, that spam and lag my game

Started by korzon19, June 24, 2019, 01:29:35 PM

Previous topic - Next topic

korzon19

So this is error that keeps spamming my debug console.

System.NullReferenceException: Object reference not set to an instance of an object
at MoreFactionInteraction.World_Incidents.SitePartWorker_MigratoryHerd/<>c__DisplayClass3_0.<TryFindAnimalKind>b__0 (Verse.PawnKindDef) <0x00025>
at System.Linq.Enumerable/<CreateWhereIterator>c__Iterator1D`1<Verse.PawnKindDef>.MoveNext () <0x0016b>
at Verse.GenCollection.TryRandomElementByWeight<Verse.PawnKindDef> (System.Collections.Generic.IEnumerable`1<Verse.PawnKindDef>,System.Func`2<Verse.PawnKindDef, single>,Verse.PawnKindDef&) <0x00a30>
at Verse.GenCollection.RandomElementByWeightWithFallback<Verse.PawnKindDef> (System.Collections.Generic.IEnumerable`1<Verse.PawnKindDef>,System.Func`2<Verse.PawnKindDef, single>,Verse.PawnKindDef) <0x00063>
at MoreFactionInteraction.World_Incidents.SitePartWorker_MigratoryHerd.TryFindAnimalKind (int,Verse.PawnKindDef&) <0x0014e>
at MoreFactionInteraction.World_Incidents.SitePartWorker_MigratoryHerd.GenerateDefaultParams (RimWorld.Planet.Site,single) <0x0006d>
at RimWorld.Planet.SiteMaker.MakeSite (RimWorld.SiteCoreDef,System.Collections.Generic.IEnumerable`1<RimWorld.SitePartDef>,int,RimWorld.Faction,bool,System.Nullable`1<single>) <0x00454>
at RimWorld.Planet.SiteMaker.MakeSite (RimWorld.SiteCoreDef,RimWorld.SitePartDef,int,RimWorld.Faction,bool,System.Nullable`1<single>) <0x0006f>
at MoreFactionInteraction.World_Incidents.IncidentWorker_HuntersLodge.TryExecuteWorker (RimWorld.IncidentParms) <0x0014b>
at (wrapper dynamic-method) RimWorld.IncidentWorker.TryExecute_Patch1 (object,RimWorld.IncidentParms) <0x0005c>
at RimWorld.Storyteller.TryFire (RimWorld.FiringIncident) <0x0008e>
at RimWorld.IncidentQueue.IncidentQueueTick () <0x000c4>
at RimWorld.Storyteller.StorytellerTick () <0x0002f>
at Verse.TickManager.DoSingleTick () <0x00610>

Verse.Log:Error(String, Boolean)
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update_Patch1(Object)

I believe because of that, when i try to do incident (map) with dev mode, i'll get 2 next errors:

1.
Exception filling window for Verse.Dialog_DebugActionsMenu: System.NullReferenceException: Object reference not set to an instance of an object
at RimWorld.IncidentWorker_FarmAnimalsWanderIn/<TryFindRandomPawnKind>c__AnonStorey0.<>m__0 (Verse.PawnKindDef) <0x00027>
at System.Linq.Enumerable/<CreateWhereIterator>c__Iterator1D`1<Verse.PawnKindDef>.MoveNext () <0x0016b>
at Verse.GenCollection.TryRandomElementByWeight<Verse.PawnKindDef> (System.Collections.Generic.IEnumerable`1<Verse.PawnKindDef>,System.Func`2<Verse.PawnKindDef, single>,Verse.PawnKindDef&) <0x00a30>
at RimWorld.IncidentWorker_FarmAnimalsWanderIn.TryFindRandomPawnKind (Verse.Map,Verse.PawnKindDef&) <0x00123>
at RimWorld.IncidentWorker_FarmAnimalsWanderIn.CanFireNowSub (RimWorld.IncidentParms) <0x000a9>
at RimWorld.IncidentWorker.CanFireNow (RimWorld.IncidentParms,bool) <0x004a2>
at Verse.Dialog_DebugActionsMenu/<DoIncidentDebugAction>c__AnonStorey53.<>m__0 () <0x00240>
at Verse.Dialog_DebugOptionLister.DebugAction (string,System.Action) <0x0014b>
at Verse.Dialog_DebugActionsMenu.DoIncidentDebugAction (RimWorld.IIncidentTarget) <0x000e1>
at (wrapper dynamic-method) Verse.Dialog_DebugActionsMenu.DoListingItems_MapActions_Patch2 (object) <0x0008c>
at Verse.Dialog_DebugActionsMenu.DoListingItems () <0x000f8>
at Verse.Dialog_OptionLister.DoWindowContents (UnityEngine.Rect) <0x004e3>
at Verse.Window/<WindowOnGUI>c__AnonStorey0.<>m__0 (int) <0x00882>

Verse.Log:Error(String, Boolean)
Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)

2.
Mouse position stack is not empty. There were more calls to BeginScrollView than EndScrollView. Fixing.
Verse.Log:Error(String, Boolean)
Verse.Widgets:EnsureMousePositionStackEmpty()
Verse.Root:Update_Patch1(Object)
Verse.Root_Play:Update_Patch1(Object)

Save link: https://drive.google.com/drive/folders/1nxKDpbMot4QbjhwvqrUL6SppE5h0Pzxk?usp=sharing
If you need, i can upload "modswitch" mod order for easier debug, as i am using it.
-EDIT-
I might know what causes this issue - i tried to turn off mod named Zombiefied (by Zombiefied) https://steamcommunity.com/sharedfiles/filedetails/?id=1541353047 and error stopped appearing. I already posted there such issue. I hope it will get fixed sometime in the future.

[attachment deleted due to age]

Canute

Hi,
looks like the mod MoreFactionInteraction got problems with some animals.
You should report that error at the Mod topic, so Mehni (the mod author) can take a look.
https://ludeon.com/forums/index.php?topic=35832.0
or at the workshop discussion.
Please include the hugslib logfile (the green button "Share logs") to that report.

korzon19

I did report it on Steam yesterday, but I'll report it here on Ludeon as well. Thank you for response.

Mehni

Hi. Thank you for the log and savefile. The error you've encountered happens in a bit of code where MFI looks at the RaceProperties for an animal, to see if they can do a HerdMigration and their wildness. That's the basic selector for the event in question.

Your log has a lot of errors like

QuoteHash collision between ZombieCorythosaurus and  SculptureSmall: both have short hash 56905

so when MFI tries to access the RaceProperties of the ZombieCorythosaurus, it gets the RaceProperties from the SculptureSmall. Since sculptures aren't animals, you get an error.

That zombie mod has about 80 of these hash collisions. I don't know why. What I do know is that your artist is going to be *very* surprised when they suddenly get a zombie dinosaur instead of a small sculpture.

korzon19

Hmmmm so zombies from this mod are treated like sculptures? So that's why they are not in the wildlife tab, nor they have a proper bio. I'll give that info to creator, i hope it will be fixed soon. thank you for help.
Thread can be closed, as cause of this error was zombified mod (i'm certain now when I uninstalled it, and checked saved game again).