OrionFive / Hospitality

Orion's "Hospitality" and more
https://www.patreon.com/orionmods
GNU General Public License v3.0
91 stars 52 forks source link

Hospitality: Exception with Vanilla Social Expanded #633

Closed TBleader closed 3 years ago

TBleader commented 3 years ago

Describe the bug The debug console spams a ton of the same exception. Guests no longer have their hospitality meter, and the guest group that is at the colony cannot be sent away with the send away button. This started after loading a save, prior to this point it was fine. I assume something updated and broke it. Seems to be some interaction with Hospitality and Vanilla Social Expanded.

Earlier in the save I'd notice other exceptions relating to Vanilla Social Expanded and Hospitality, relating to relations. I didn't save the logs but if those show up again I'll report them.

To Reproduce Since it started after loading my save, I have no clue what triggered it. So I uploaded my save in the hopes it would help. Callie's Collective Commune.rws.tar.gz

  1. Load the save (unfortunately I do have a lot of mods :p)
  2. bask in the glory of hitting 999 exceptions very quickly?

Console log https://gist.github.com/5ae6d9b12b5afa9a288b569383b9a908

Error stacktrace The error has extra information that is not included in the log. Please select it in the console and copy the whole error message.

Exception while ticking lord with job Hospitality.LordJob_VisitColony: 
System.NullReferenceException: Object reference not set to an instance of an object
  at VanillaSocialInteractionsExpanded.Patch_Execute.Prefix (Verse.AI.Group.Transition __instance, Verse.AI.Group.Lord lord) [0x0005a] in <083bd9695010467698b929e69e22beae>:0 
  at (wrapper dynamic-method) Verse.AI.Group.Transition.Verse.AI.Group.Transition.Execute_Patch2(Verse.AI.Group.Transition,Verse.AI.Group.Lord)
  at Verse.AI.Group.Transition.CheckSignal (Verse.AI.Group.Lord lord, Verse.AI.Group.TriggerSignal signal) [0x000dd] in <e607f12d228b4ae997319523a88e9fd1>:0 
  at Verse.AI.Group.Lord.CheckTransitionOnSignal (Verse.AI.Group.TriggerSignal signal) [0x00050] in <e607f12d228b4ae997319523a88e9fd1>:0 
  at Verse.AI.Group.Lord.LordTick () [0x000bb] in <e607f12d228b4ae997319523a88e9fd1>:0 
  at Verse.AI.Group.LordManager.LordManagerTick () [0x00011] in <e607f12d228b4ae997319523a88e9fd1>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.Group.LordManager:LordManagerTick ()
Verse.Map:MapPostTick ()
(wrapper dynamic-method) Verse.TickManager:Verse.TickManager.DoSingleTick_Patch3 (Verse.TickManager)
Verse.TickManager:TickManagerUpdate ()
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()
OrionFive commented 3 years ago

The problem with saving the game after you've had exceptions is that you potentially "bake" invalid values into the savegame, making the issue permanent or creating new ones.

I can't tell you with 100% certainty that this happened here, but it sure sounds like it. This means even the actual bug was fixed, your game would still be broken. Or, if somehow it is fixed that your game will recover, the issue that caused the problem remains.

From the stacktrace this looks like something the Vanilla Interactions Expanded guys have to fix.

OrionFive commented 3 years ago

From your log I gather that there's a lot of stuff missing. Did you by any chance remove a mod midgame? Then that may be the cause of the issue. But yeah, it's pretty much all Vanilla Expanded stuff, and one or more factions. So you can better check this with them.

TBleader commented 3 years ago

Hm interesting. I wonder if something silently broke before saving and it just captured it like you said. The first time encountering this exception was after loading. No earlier saves to try and revert to so I guess that save is just toast. I didn't remove any mods midgame, but I did add a few. Thanks for taking a look at it! Wasn't sure between Hospitality and Vanilla Expanded which might actually have been causing it.

OrionFive commented 3 years ago

Don't you use auto saves? But yeah, I wish RimWorld would just block saving over existing files once an exception has occurred. It's incredible how often I hear that people have no other save to go back to.

The error you're getting likely won't happen without Hospitality, since whatever happened before you saved effectively broke at least one present group. People are usually looking for a culprit for their issue(s) but most of the time it doesn't work like that. Sometimes you need even 3 or 4 mods to unfavorably interact for a specific issue to emerge. Which is why it's such a bad idea to play with lots of mods that change code.