jptrrs / SpeakUp

A conversation mod for RimWorld
4 stars 23 forks source link

Error on damage on/with modded body parts #20

Closed BlackFranky closed 3 years ago

BlackFranky commented 3 years ago

I get the following errors when a pawn gets damaged to or does damage with a body part from a mod (Archotech Expanded). I don't know which it is, but as it's only arms i think it is the later. The error deletes the body parts (as mentioned in the second error) and the personal history of the pawn gets deleted. I put SpeakUp (and Interaction Bubbles) at last position on my modlist and on tried again with them directly after HugsLib. The error persisted.

Exception in JobDriver tick for pawn Franky driver=JobDriver_AttackMelee (toilIndex=2) driver.job=(AttackMelee (Job_808048) A=Thing_Human367433)
System.NullReferenceException: Object reference not set to an instance of an object
  at SpeakUp.ExtraGrammarUtility+<ExtraRulesForPawn>d__7.MoveNext () [0x000b3] in <096fa554ada04b2c86b6de592215ed59>:0 
  at SpeakUp.ExtraGrammarUtility+<ExtraRules>d__6.MoveNext () [0x001a6] in <096fa554ada04b2c86b6de592215ed59>:0 
  at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x000db] in <567df3e0919241ba98db88bec4c6696f>:0 
  at System.Collections.Generic.List`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] collection) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0 
  at SpeakUp.GrammarResolver_Resolve.Prefix (System.Object __instance, System.String rootKeyword, Verse.Grammar.GrammarRequest request) [0x0003b] in <096fa554ada04b2c86b6de592215ed59>:0 
  at (wrapper dynamic-method) Verse.Grammar.GrammarResolver.Verse.Grammar.GrammarResolver.Resolve_Patch1(string,Verse.Grammar.GrammarRequest,string,bool,string,System.Collections.Generic.List`1<string>,System.Collections.Generic.List`1<string>,bool)
  at (wrapper dynamic-method) Verse.LogEntry.Verse.LogEntry.ToGameStringFromPOV_Worker_Patch1(Verse.LogEntry,Verse.Thing,bool)
  at Verse.LogEntry.ToGameStringFromPOV (Verse.Thing pov, System.Boolean forceLog) [0x0005b] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.DamageWorker+DamageResult.AssociateWithLog (Verse.LogEntry_DamageResult log) [0x000a2] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at RimWorld.Verb_MeleeAttack.TryCastShot () [0x001de] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.Verb.TryCastNextBurstShot () [0x00012] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.Verb.WarmupComplete () [0x00013] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at (wrapper dynamic-method) Verse.Verb.Verse.Verb.TryStartCastOn_Patch3(Verse.Verb,Verse.LocalTargetInfo,Verse.LocalTargetInfo,bool,bool)
  at Verse.Verb.TryStartCastOn (Verse.LocalTargetInfo castTarg, System.Boolean surpriseAttack, System.Boolean canHitNonTargetPawns) [0x00007] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at RimWorld.Pawn_MeleeVerbs.TryMeleeAttack (Verse.Thing target, Verse.Verb verbToUse, System.Boolean surpriseAttack) [0x0008e] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.AI.JobDriver_AttackMelee.<MakeNewToils>b__3_1 () [0x0003c] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.AI.Toils_Combat+<>c__DisplayClass5_0.<FollowAndMeleeAttack>b__0 () [0x000cf] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at (wrapper dynamic-method) Verse.AI.JobDriver.Verse.AI.JobDriver.DriverTick_Patch0(Verse.AI.JobDriver)
Verse.Log:Verse.Log.Error_Patch2(String, Boolean)
Verse.AI.JobUtility:TryStartErrorRecoverJob(Pawn, String, Exception, JobDriver)
Verse.AI.JobDriver:Verse.AI.JobDriver.DriverTick_Patch0(JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Verse.Pawn.Tick_Patch1(Pawn)
Verse.TickList:Tick()
Verse.TickManager:Verse.TickManager.DoSingleTick_Patch1(TickManager)
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()
Exception in JobDriver tick for pawn Franky driver=JobDriver_AttackMelee (toilIndex=2) driver.job=(AttackMelee (Job_808048) A=Thing_Human367433)
System.NullReferenceException: Object reference not set to an instance of an object
  at SpeakUp.ExtraGrammarUtility+<ExtraRulesForPawn>d__7.MoveNext () [0x000b3] in <096fa554ada04b2c86b6de592215ed59>:0 
  at SpeakUp.ExtraGrammarUtility+<ExtraRules>d__6.MoveNext () [0x001a6] in <096fa554ada04b2c86b6de592215ed59>:0 
  at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x000db] in <567df3e0919241ba98db88bec4c6696f>:0 
  at System.Collections.Generic.List`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] collection) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0 
  at SpeakUp.GrammarResolver_Resolve.Prefix (System.Object __instance, System.String rootKeyword, Verse.Grammar.GrammarRequest request) [0x0003b] in <096fa554ada04b2c86b6de592215ed59>:0 
  at (wrapper dynamic-method) Verse.Grammar.GrammarResolver.Verse.Grammar.GrammarResolver.Resolve_Patch1(string,Verse.Grammar.GrammarRequest,string,bool,string,System.Collections.Generic.List`1<string>,System.Collections.Generic.List`1<string>,bool)
  at (wrapper dynamic-method) Verse.LogEntry.Verse.LogEntry.ToGameStringFromPOV_Worker_Patch1(Verse.LogEntry,Verse.Thing,bool)
  at Verse.LogEntry.ToGameStringFromPOV (Verse.Thing pov, System.Boolean forceLog) [0x0005b] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.DamageWorker+DamageResult.AssociateWithLog (Verse.LogEntry_DamageResult log) [0x000a2] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at RimWorld.Verb_MeleeAttack.TryCastShot () [0x001de] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.Verb.TryCastNextBurstShot () [0x00012] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.Verb.WarmupComplete () [0x00013] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at (wrapper dynamic-method) Verse.Verb.Verse.Verb.TryStartCastOn_Patch3(Verse.Verb,Verse.LocalTargetInfo,Verse.LocalTargetInfo,bool,bool)
  at Verse.Verb.TryStartCastOn (Verse.LocalTargetInfo castTarg, System.Boolean surpriseAttack, System.Boolean canHitNonTargetPawns) [0x00007] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at RimWorld.Pawn_MeleeVerbs.TryMeleeAttack (Verse.Thing target, Verse.Verb verbToUse, System.Boolean surpriseAttack) [0x0008e] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.AI.JobDriver_AttackMelee.<MakeNewToils>b__3_1 () [0x0003c] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.AI.Toils_Combat+<>c__DisplayClass5_0.<FollowAndMeleeAttack>b__0 () [0x000cf] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at (wrapper dynamic-method) Verse.AI.JobDriver.Verse.AI.JobDriver.DriverTick_Patch0(Verse.AI.JobDriver)
Verse.Log:Verse.Log.Error_Patch2(String, Boolean)
Verse.AI.JobUtility:TryStartErrorRecoverJob(Pawn, String, Exception, JobDriver)
Verse.AI.JobDriver:Verse.AI.JobDriver.DriverTick_Patch0(JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Verse.Pawn.Tick_Patch1(Pawn)
Verse.TickList:Tick()
Verse.TickManager:Verse.TickManager.DoSingleTick_Patch1(TickManager)
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()
matthewes1 commented 3 years ago

Hello, I also get these errors even on non modded body parts. The mods I had installed were Speakup and it's requirements and nothing else. It seems relatively replicable by jut having combat, but it didn't happen everycombat.


Exception in JobDriver tick for pawn Sally driver=JobDriver_AttackMelee (toilIndex=2) driver.job=(AttackMelee (Job_2755) A=Thing_Human360)
System.NullReferenceException: Object reference not set to an instance of an object
  at SpeakUp.ExtraGrammarUtility+d__7.MoveNext () [0x000b3] in <096fa554ada04b2c86b6de592215ed59>:0 
  at SpeakUp.ExtraGrammarUtility+d__6.MoveNext () [0x001a6] in <096fa554ada04b2c86b6de592215ed59>:0 
  at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x000db] in <567df3e0919241ba98db88bec4c6696f>:0 
  at System.Collections.Generic.List`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] collection) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0 
  at SpeakUp.GrammarResolver_Resolve.Prefix (System.Object __instance, System.String rootKeyword, Verse.Grammar.GrammarRequest request) [0x0003b] in <096fa554ada04b2c86b6de592215ed59>:0 
  at (wrapper dynamic-method) Verse.Grammar.GrammarResolver.Verse.Grammar.GrammarResolver.Resolve_Patch1(string,Verse.Grammar.GrammarRequest,string,bool,string,System.Collections.Generic.List`1,System.Collections.Generic.List`1,bool)
  at Verse.LogEntry.ToGameStringFromPOV_Worker (Verse.Thing pov, System.Boolean forceLog) [0x0000b] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.LogEntry.ToGameStringFromPOV (Verse.Thing pov, System.Boolean forceLog) [0x0005b] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.DamageWorker+DamageResult.AssociateWithLog (Verse.LogEntry_DamageResult log) [0x000a2] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at RimWorld.Verb_MeleeAttack.TryCastShot () [0x001de] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.Verb.TryCastNextBurstShot () [0x00012] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.Verb.WarmupComplete () [0x00013] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.Verb.TryStartCastOn (Verse.LocalTargetInfo castTarg, Verse.LocalTargetInfo destTarg, System.Boolean surpriseAttack, System.Boolean canHitNonTargetPawns) [0x0010d] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.Verb.TryStartCastOn (Verse.LocalTargetInfo castTarg, System.Boolean surpriseAttack, System.Boolean canHitNonTargetPawns) [0x00007] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at RimWorld.Pawn_MeleeVerbs.TryMeleeAttack (Verse.Thing target, Verse.Verb verbToUse, System.Boolean surpriseAttack) [0x0008e] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.AI.JobDriver_AttackMelee.b__3_1 () [0x0003c] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.AI.Toils_Combat+<>c__DisplayClass5_0.b__0 () [0x000cf] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.AI.JobDriver.DriverTick () [0x001a2] in <7927e938de4c4089b4add4215e58d5b1>:0 
Verse.Log:Error(String, Boolean)
Verse.AI.JobUtility:TryStartErrorRecoverJob(Pawn, String, Exception, JobDriver)
Verse.AI.JobDriver:DriverTick()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:Verse.TickManager.DoSingleTick_Patch1(TickManager)
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

And this error:


Exception ticking Bullet_Revolver6754: System.NullReferenceException: Object reference not set to an instance of an object
  at SpeakUp.ExtraGrammarUtility+d__7.MoveNext () [0x000b3] in <096fa554ada04b2c86b6de592215ed59>:0 
  at SpeakUp.ExtraGrammarUtility+d__6.MoveNext () [0x00122] in <096fa554ada04b2c86b6de592215ed59>:0 
  at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x000db] in <567df3e0919241ba98db88bec4c6696f>:0 
  at System.Collections.Generic.List`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] collection) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0 
  at SpeakUp.GrammarResolver_Resolve.Prefix (System.Object __instance, System.String rootKeyword, Verse.Grammar.GrammarRequest request) [0x0003b] in <096fa554ada04b2c86b6de592215ed59>:0 
  at (wrapper dynamic-method) Verse.Grammar.GrammarResolver.Verse.Grammar.GrammarResolver.Resolve_Patch1(string,Verse.Grammar.GrammarRequest,string,bool,string,System.Collections.Generic.List`1,System.Collections.Generic.List`1,bool)
  at Verse.LogEntry.ToGameStringFromPOV_Worker (Verse.Thing pov, System.Boolean forceLog) [0x0000b] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.LogEntry.ToGameStringFromPOV (Verse.Thing pov, System.Boolean forceLog) [0x0005b] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.DamageWorker+DamageResult.AssociateWithLog (Verse.LogEntry_DamageResult log) [0x000a2] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at RimWorld.Bullet.Impact (Verse.Thing hitThing) [0x000b1] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.Projectile.ImpactSomething () [0x0014f] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.Projectile.Tick () [0x000ed] in <7927e938de4c4089b4add4215e58d5b1>:0 
  at Verse.TickList.Tick () [0x0015c] in <7927e938de4c4089b4add4215e58d5b1>:0 
Verse.Log:Error(String, Boolean)
Verse.TickList:Tick()
Verse.TickManager:Verse.TickManager.DoSingleTick_Patch1(TickManager)
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

5katz commented 3 years ago

I have had the same issue, also on unmodded bodyparts and in a modded savegame, i've got both the melee version of the error and the bullet ticking issue, pasted here: Ranged: https://pastebin.com/pFbbDLSB Melee: https://pastebin.com/YUuAp042

It seems to have some problem Properly Ticking damage, and from observation it seems to also trigger when a pawn is on fire.

it is semi-reproducable in the sense that i dont know why or when it triggers, but enough combat simulation in devmode brute-force triggers it at some point.

From this point on is observation and Speculation, so nothing backed up by log or anything: I noticed that upon the melee damage tick issue, pawns do indeed take immense amounts of damage, my guess is its does multiple damage ticks in a single attack, as such obliterating bodyparts or pawns in a few strikes, and it cant do this for wrongly ticked bullets, since the entity dissapears on impact, and as such has no chance to proc twice.

hope my Report and speculation has helped to fix this issue in the future

Edit: I can confirm that this issue stems from SpeakUp, and not some incompatability, since removing SpeakUp fixes it, and other members of the community tested only SpeakUp and still got the errors

jptrrs commented 3 years ago

People, please check these instructions before reporting an issue: https://steamcommunity.com/workshop/filedetails/discussion/2502518544/3113656428090982300/ You haven't provided the necessary information for us to reproduce, much less correct the issue.