Non stop ticking error when generating new pawn before game starts

Started by Harry_Dicks, January 13, 2018, 12:45:10 PM

Previous topic - Next topic

Harry_Dicks

I was just rolling the dice to see what random pawns I could get and then the first red error pops, followed by a second one that has the "ticks" number constantly going up at a high rate, and I cannot continue further on the embark screen (where you choose your pawns) unless I press back, which takes me to the world screen to pick a landing site. However, when after I choose a landing site and go back to the embark screen, the second ticking error appears again and the game screen looks like it froze while loading, but I can still press back to get to the world screen. I think it has something to do with a corrupt backstory or how maybe a pawn is displayed? Any help I could get, would be greatly appreciated, thanks!

Exception filling window for RimWorld.Page_ConfigureStartingPawns: System.NullReferenceException: Object reference not set to an instance of an object
at Verse.HediffMaker.MakeHediff (Verse.HediffDef,Verse.Pawn,Verse.BodyPartRecord) <0x0003b>
at RimWorld.PawnAddictionHediffsGenerator.GenerateAddictionsAndTolerancesFor (Verse.Pawn) <0x00287>
at (wrapper dynamic-method) Verse.PawnGenerator.GenerateInitialHediffs_Patch1 (Verse.Pawn,Verse.PawnGenerationRequest) <0x0003d>
at Verse.PawnGenerator.TryGenerateNewNakedPawn (Verse.PawnGenerationRequest&,string&,bool) <0x004f9>
at (wrapper dynamic-method) Verse.PawnGenerator.GenerateNewNakedPawn_Patch1 (Verse.PawnGenerationRequest&) <0x001a4>
at Verse.PawnGenerator.GeneratePawnInternal (Verse.PawnGenerationRequest) <0x0054f>
at (wrapper dynamic-method) Verse.PawnGenerator.GeneratePawn_Patch1 (Verse.PawnGenerationRequest) <0x00048>
at (wrapper dynamic-method) Verse.StartingPawnUtility.NewGeneratedStartingPawn_Patch1 () <0x001e1>
at Verse.StartingPawnUtility.RegenerateStartingPawnInPlace (int) <0x000eb>
at Verse.StartingPawnUtility.RandomizeInPlace (Verse.Pawn) <0x00028>
at RimWorld.Page_ConfigureStartingPawns.RandomizeCurPawn () <0x00060>
at (wrapper dynamic-method) RimWorld.CharacterCardUtility.DrawCharacterCard_Patch1 (UnityEngine.Rect,Verse.Pawn,System.Action,UnityEngine.Rect) <0x00e65>
at (wrapper dynamic-method) RimWorld.Page_ConfigureStartingPawns.DrawPortraitArea_Patch1 (object,UnityEngine.Rect) <0x0045c>
at (wrapper dynamic-method) RimWorld.Page_ConfigureStartingPawns.DoWindowContents_Patch1 (object,UnityEngine.Rect) <0x0049b>
at Verse.Window/<WindowOnGUI>c__AnonStorey0.<>m__0 (int) <0x00735>

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


Exception filling window for RimWorld.Page_ConfigureStartingPawns: System.ArgumentNullException: Argument cannot be null.
Parameter name: key
at System.Collections.Generic.Dictionary`2<Verse.Pawn, RimWorld.PortraitsCache/CachedPortrait>.TryGetValue (Verse.Pawn,RimWorld.PortraitsCache/CachedPortrait&) <0x001ab>
at RimWorld.PortraitsCache.Get (Verse.Pawn,UnityEngine.Vector2,UnityEngine.Vector3,single) <0x00085>
at RimWorld.Page_ConfigureStartingPawns.DrawPawnList (UnityEngine.Rect) <0x00795>
at (wrapper dynamic-method) RimWorld.Page_ConfigureStartingPawns.DoWindowContents_Patch1 (object,UnityEngine.Rect) <0x00248>
at Verse.Window/<WindowOnGUI>c__AnonStorey0.<>m__0 (int) <0x00735>

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

jamaicancastle

It looks like it's running into either an invalid hediff - probably an addiction or tolerance - or an invalid body part. (MakeHediff, which is throwing the error, takes a pawn, a hediffDef, and a body part... and it checks if the pawn is null, so it must be one of the other two.) If you're running anything like alien races or drug-adding mods, I'd try disabling them to see if you can narrow down which one is causing it.

Harry_Dicks

Quote from: jamaicancastle on January 13, 2018, 01:31:04 PM
It looks like it's running into either an invalid hediff - probably an addiction or tolerance - or an invalid body part. (MakeHediff, which is throwing the error, takes a pawn, a hediffDef, and a body part... and it checks if the pawn is null, so it must be one of the other two.) If you're running anything like alien races or drug-adding mods, I'd try disabling them to see if you can narrow down which one is causing it.

I thought it could have been something with the drugs as well, after seeing the the about addiction. What sucks is I'm running about 300 mobs, and AlienRaceFramework. Ugh, where to even begin?! Also, restarts take about 10 minutes, and I can only get the error to sometimes pop up randomly after hitting the dice enough times. I wish I could narrow it down more.

jamaicancastle

It sounds like it's only popping up when it tries to spawn in a particular troublesome pawn (either an alien race or a hediff). If you use Prepare Carefully, can you get the error to show up by adding different pawn types or health conditions? (If you don't, I can see not wanting to add it to such a huge modlist though. :o )

Harry_Dicks

I do have it, and I'll try to narrow it down more, but right now it's going towards the bottom of my list. Just loading the game takes 10 minutes, and then if I press the Prepare Carefully button, that's another 5+ minutes ::)

I just hope I don't have any issues if the game were to try and spawn a pawn with this bugged condition, if it would crash game. I'll find and fix it I'm sure, but I won't start planning any full games until I do.