--
Exception ticking hediff (Alzheimers 脳 ticksSinceCreation=93821) for pawn Thornton. Removing hediff... Exception: System.NullReferenceException: Object reference not set to an instance of an object
at Verse.Hediff.Tick () [0x00000] in <filename unknown>:0
at Verse.Pawn_HealthTracker.HealthTick () [0x00000] in <filename unknown>:0
Verse.Log:Error(String, Boolean)
Verse.Pawn_HealthTracker:HealthTick()
Verse.Pawn:Tick()
RimWorld.Planet.WorldPawns:WorldPawnsTick()
RimWorld.Planet.World:WorldTick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()
--
Sometime appear. '脳' is 'brain'.
k2ymg,
could you please read the sticky please.
The error msg. alone isn't very helpful, the complete log file, when it happen, and maybe a safegame when it happen might more useful.
https://www.dropbox.com/s/ohsejq6epbgw719/a.zip?dl=0
Today I faced this again and have kept the both files but it's not reproduce. seems random. same things are WorldPawn and Alzheimer.
Thanks,
now it is a job for Kenneth ! :-)
I couldn't reproduce this error, I spawned Rea in as colonist taken from the world pawns and she has the Alzheimer's hediff, I did wait some time for the issue to appear without success.
This error might be caused by the mods you're using, but their names don't suggest they change something that could cause this (however, it's possible).
Did anyone else have this problem? Probably even in a vanilla game?
I suppose this will occur when HeartArteryBlockage gave HeartAttack, HeartAttack caused death, and occurred forgetMemoryThoughtMtbDays of Alzheimers in single frame. I just read the code, I didn't reproduce anything. This is simply my suppose.
Pawn_HealthTracker.HealthTick
Dead? <- dead check here. out side of Hediffs loop.
for(...){
Hediff.Tick -> HeartArteryBlockage
HediffGiver_Random.OnIntervalPassed
HediffGiver.TryApply
HediffGiverUtility.TryApply
HealthTracker.AddHediff -> add HeartAttack
CheckForStateChange
ShouldBeDead -> quickly dead?
Pawn.Kill
Pawn_HealthTracker.SetDead <- here mark to death..
PawnComponentUtility.RemoveComponentsOnKilled <- Pawn.needs to null
...
// next loop, Alzheimer
process forgetMemoryThoughtMtbDays <- reference Pawn.needs here
...
}
You are correct, I fixed it.
Thanks for reporting and investigating! ;)