Ludeon Forums

RimWorld => Bugs => Topic started by: Bar0th on April 20, 2020, 12:10:15 PM

Title: [1.1.2609] Error switching from a non-Royalty save to one with, during gameplay
Post by: Bar0th on April 20, 2020, 12:10:15 PM

Exception processing alert RimWorld.Alert_MonumentMarkerMissingBlueprints: System.InvalidOperationException: Invalid ThingRequest ThingRequest(group Undefined)
  at Verse.ListerThings.ThingsMatching (Verse.ThingRequest req) [0x00095] in <533b1be141b04631a74a6c357d09359e>:0
  at Verse.ListerThings.ThingsOfDef (Verse.ThingDef def) [0x00007] in <533b1be141b04631a74a6c357d09359e>:0
  at RimWorld.Alert_MonumentMarkerMissingBlueprints.get_Targets () [0x0001c] in <533b1be141b04631a74a6c357d09359e>:0
  at RimWorld.Alert_MonumentMarkerMissingBlueprints.GetReport () [0x0000e] in <533b1be141b04631a74a6c357d09359e>:0
  at RimWorld.Alert.Recalculate () [0x00000] in <533b1be141b04631a74a6c357d09359e>:0
  at RimWorld.AlertsReadout.CheckAddOrRemoveAlert (RimWorld.Alert alert, System.Boolean forceRemove) [0x00000] in <533b1be141b04631a74a6c357d09359e>:0
Verse.Log:Error(String, Boolean)
Verse.Log:ErrorOnce(String, Int32, Boolean)
RimWorld.AlertsReadout:CheckAddOrRemoveAlert(Alert, Boolean)
RimWorld.AlertsReadout:AlertsReadoutUpdate()
RimWorld.UIRoot_Play:UIRootUpdate()
Verse.Root:Update()
Verse.Root_Play:Update()


Steps to reproduce:

Since it only shows up in dev mode, it's not something most players will even notice (would just be some extra lines added to their "Player-prev.log").
Title: Re: [1.1.2609] Error switching from a non-Royalty save to one with, during gameplay
Post by: ison on April 20, 2020, 04:38:56 PM
So if you load a Royalty game a mod mismatch dialog appears? Please confirm, but this means that Royalty is not active in the mod menu? If this is the case, then the game shouldn't work. If Royalty is disabled, and you try to load a Royalty game, then the savefile will be broken after you save again.
Title: Re: [1.1.2609] Error switching from a non-Royalty save to one with, during gameplay
Post by: Bar0th on April 21, 2020, 05:36:51 AM
Quote from: ison on April 20, 2020, 04:38:56 PM
So if you load a Royalty game a mod mismatch dialog appears? Please confirm, but this means that Royalty is not active in the mod menu? If this is the case, then the game shouldn't work. If Royalty is disabled, and you try to load a Royalty game, then the savefile will be broken after you save again.

Play a normal game, with only 'Core' active in the mod menu.  While that game is running, attempt to load a save which was  created with 'Core' and 'Royalty' active.  It will show the Mods Mismatch screen (like it should), so you click 'Load mod list from save'.  Normally, it would then restart RimWorld with the new mod list (so, 'Core' + 'Royalty' in this case).  However, if you have dev mode enabled, it will display an error first (dev mode or not, the error goes into the log file).

Screenshots attached.

'Verse.ScribeMetaHeaderUtility.TryCreateDialogsForVersionMismatchWarnings(Action)' calls 'ModsConfig.SetActiveToList(List<string>)' when you click the button to load the mod list from the save.  'RimWorld.Alert_DisallowedBuildingInsideMonument.GetReport()' checks for 'ModsConfig.RoyaltyActive' (which returns true, since the mod list just changed - although it's not actually loaded yet).  From there, 'RimWorld.Alert_DisallowedBuildingInsideMonument.get_DisallowedBuildings' contains 'ThingDefOf.MonumentMarker', which errors 'Verse.ListerThings.ThingsMatching(ThingRequest)', since the actual Def hasn't loaded yet.
Title: Re: [1.1.2609] Error switching from a non-Royalty save to one with, during gameplay
Post by: ison on April 22, 2020, 07:26:15 AM
I understand now, thanks for the explanation. Looks like a bug. We'll have to look into this.
Title: Re: [1.1.2609] Error switching from a non-Royalty save to one with, during gameplay
Post by: Nowhere on April 23, 2020, 12:06:24 PM
Fixed for the next build, thanks!