Ludeon Forums

RimWorld => Support => Topic started by: hasturx on January 28, 2022, 04:12:01 AM

Title: Can't draft pawn after praetor title - only Royalty, no other mods <fixed>
Post by: hasturx on January 28, 2022, 04:12:01 AM
I've been enjoying a new "Royalty only" colony, but yesterday when I reached Praetor on my second titled pawn (after reaching Count on another pawn), I can't draft that new Praetor. When I use debug to lower the title down one, I can draft again, and when I use debug to put Praetor (or anything higher) back again, I can't draft, and always see this same error in the debug log:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.Command_AbilitySpeech..ctor (RimWorld.Ability ability) [0x00013] in <cdbd0ed5089a418da09b9a259f9dbd8f>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <eae584ce26bc40229c1b1aa476bfa589>:0
   --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0007a] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x00213] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00095] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at RimWorld.Ability+<GetGizmos>d__70.MoveNext () [0x00031] in <cdbd0ed5089a418da09b9a259f9dbd8f>:0
  at RimWorld.Pawn_AbilityTracker+<GetGizmos>d__11.MoveNext () [0x000b5] in <cdbd0ed5089a418da09b9a259f9dbd8f>:0
  at Verse.Pawn+<GetGizmos>d__234.MoveNext () [0x00358] in <cdbd0ed5089a418da09b9a259f9dbd8f>:0
  at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x000db] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Collections.Generic.List`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] collection) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at RimWorld.InspectGizmoGrid.DrawInspectGizmoGridFor (System.Collections.Generic.IEnumerable`1[T] selectedObjects, Verse.Gizmo& mouseoverGizmo) [0x00045] in <cdbd0ed5089a418da09b9a259f9dbd8f>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.Log:ErrorOnce (string,int)
RimWorld.InspectGizmoGrid:DrawInspectGizmoGridFor (System.Collections.Generic.IEnumerable`1<object>,Verse.Gizmo&)
RimWorld.MainTabWindow_Inspect:DrawInspectGizmos ()
RimWorld.InspectPaneUtility:ExtraOnGUI (RimWorld.IInspectPane)
RimWorld.MainTabWindow_Inspect:ExtraOnGUI ()
Verse.WindowStack:WindowStackOnGUI ()
RimWorld.UIRoot_Play:UIRootOnGUI ()
Verse.Root:OnGUI ()
Title: Re: Can't draft pawn after praetor title - only Royalty, no other mods
Post by: Canute on January 28, 2022, 06:08:05 AM
Hi,
could you try top delete your installation folder and then reinstal/repair it.
At this way you can be sure no old version files are left that could cause trouble.

When the problem still happen after that, could you upload the savegame somewhere else and post the link to download it.
And the complete logfile player.log you can add as file attachment (need to use Reply first).
Be sure the error is at the logfile too.

Title: Re: Can't draft pawn after praetor title - only Royalty, no other mods
Post by: hasturx on January 28, 2022, 06:41:55 AM
Reinstalling did not fix the issue.

Link to save file: https://1drv.ms/u/s!Au1mX2j9i6l4k8g79Bh4GU4hySdTuA?e=rbZbxT

player.log attached
Title: Re: Can't draft pawn after praetor title - only Royalty, no other mods
Post by: Canute on January 28, 2022, 09:25:39 AM
After loading the save, i don't got any issue's.
But i can't fine a Preator, just the Count,Acolyte and a Freeholder.
I let it run a few minutes and don't got any problems/error.
Could you give me a hint how to reproduce the problem maybe.
Title: Re: Can't draft pawn after praetor title - only Royalty, no other mods
Post by: hasturx on January 28, 2022, 10:25:00 AM
Sorry, I must have uploaded the wrong file. This time I tested it, and it is the correct file.

https://1drv.ms/u/s!Au1mX2j9i6l4k8g8Dk8GOD7xkTex_g?e=HxE2On

Matching player.log attached
Title: Re: Can't draft pawn after praetor title - only Royalty, no other mods
Post by: glass zebra on January 28, 2022, 11:25:26 AM
Quote from: Canute on January 28, 2022, 09:25:39 AM
After loading the save, i don't got any issue's.
But i can't fine a Preator, just the Count,Acolyte and a Freeholder.
I let it run a few minutes and don't got any problems/error.
Could you give me a hint how to reproduce the problem maybe.

Set Sam to praetor. I had the issue described after that on the first upladed save.
Title: Re: Can't draft pawn after praetor title - only Royalty, no other mods
Post by: Samapple31 on January 28, 2022, 12:00:24 PM
Ok. seems like something was wrong with the file...
Title: Re: Can't draft pawn after praetor title - only Royalty, no other mods
Post by: hasturx on January 29, 2022, 04:21:37 AM
Quote from: glass zebra on January 28, 2022, 11:25:26 AM
Quote from: Canute on January 28, 2022, 09:25:39 AM
After loading the save, i don't got any issue's.
But i can't fine a Preator, just the Count,Acolyte and a Freeholder.
I let it run a few minutes and don't got any problems/error.
Could you give me a hint how to reproduce the problem maybe.

Canute, could you repo the issue?

Set Sam to praetor. I had the issue described after that on the first upladed save.
Title: Re: Can't draft pawn after praetor title - only Royalty, no other mods
Post by: Canute on January 29, 2022, 06:35:08 AM
QuoteCanute, could you repo the issue?
Yep, but i am just an "assistance" i allready pointed Phaenox to this topic, he is the offical paided bughunter.

But that don't solve your current problem.
Since only Sam got the problem, you should use the dev. tools and remove the title from Sam and give it someone other.
Debug action, search for title, then you can adjust the title's for pawns.
Just keep the savegame, in case the result don't work like you intend.
Title: Re: Can't draft pawn after praetor title - only Royalty, no other mods
Post by: hasturx on January 30, 2022, 09:22:10 AM
I'd rather wait for the bug to be fixed :)
Title: Re: Can't draft pawn after praetor title - only Royalty, no other mods
Post by: hasturx on February 04, 2022, 04:31:16 AM
So, I got tired of waiting, and fixed it myself.

Using a compare plugin for notepad++, I compared the XML in the save file for a pawn that passed the Praetor title without breaking, and saw that the good pawn's <ideo /> attribute was set to "Ideo_9", while the broken pawn's was set to null.

I changed the broken pawn's attribute to "Ideo_9" as well, and now it I can draft it again.

I have thoughts about this...
Title: Re: Can't draft pawn after praetor title - only Royalty, no other mods
Post by: elabuschagne on October 16, 2022, 01:06:26 PM
Thank you so much!  I had this exact problem and it fixed it.  In fact, it forced me to abandon a play through nearly two years ago.  Just happened again in my latest play through.  So frustrating!

Quote from: hasturx on February 04, 2022, 04:31:16 AM
So, I got tired of waiting, and fixed it myself.

Using a compare plugin for notepad++, I compared the XML in the save file for a pawn that passed the Praetor title without breaking, and saw that the good pawn's <ideo /> attribute was set to "Ideo_9", while the broken pawn's was set to null.

I changed the broken pawn's attribute to "Ideo_9" as well, and now it I can draft it again.

I have thoughts about this...