UnlimitedHugs / RimworldHugsLib

A lightweight shared library for Rimworld modding.
Other
244 stars 59 forks source link

"Root level exception" error on clicking the "Dev quicktest" button in the main menu #86

Closed Heremeus closed 1 year ago

Heremeus commented 1 year ago

Repro steps:

  1. Start game with only Harmony, Core, Ideology, Biotech and HugsLib enabled (no other mods)
  2. Enable dev mode in the settings
  3. Click the "Dev quicktest" button

Expected result: Game loads a map for quickly testing mods

Actual result: The console opens with an error message. Nothing else happens.

Found in: Rimworld 1.4.3524 with HugsLib 10.0.0

Root level exception in OnGUI(): System.ComponentModel.WarningException: scenario not found: 
  at HugsLib.Quickstart.QuickstartController.PrepareMapGeneration () [0x00033] in <6685087a0fc048d49e61a2c7c1ed1aee>:0 
  at HugsLib.Quickstart.QuickstartController.InitiateMapGeneration () [0x00001] in <6685087a0fc048d49e61a2c7c1ed1aee>:0 
  at Verse.ListableOption.DrawOption (UnityEngine.Vector2 pos, System.Single width) [0x00049] in <18a9c497395840e0ba98f4062b01a2f3>:0 
  at Verse.OptionListingUtility.DrawOptionListing (UnityEngine.Rect rect, System.Collections.Generic.List`1[T] optList) [0x00037] in <18a9c497395840e0ba98f4062b01a2f3>:0 
  at (wrapper dynamic-method) RimWorld.MainMenuDrawer.RimWorld.MainMenuDrawer.DoMainMenuControls_Patch0(UnityEngine.Rect,bool)
  at RimWorld.MainMenuDrawer.MainMenuOnGUI () [0x00242] in <18a9c497395840e0ba98f4062b01a2f3>:0 
  at Verse.UIRoot_Entry.DoMainMenu () [0x0001f] in <18a9c497395840e0ba98f4062b01a2f3>:0 
  at Verse.UIRoot_Entry.UIRootOnGUI () [0x0001c] in <18a9c497395840e0ba98f4062b01a2f3>:0 
  at (wrapper dynamic-method) Verse.Root.Verse.Root.OnGUI_Patch1(Verse.Root)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
(wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch1 (Verse.Root)
UnlimitedHugs commented 1 year ago

Appreciate the report, confirmed it on my end. As a workaround, open the Quickstarter window via the last button in the dev toolbar, and click "Generate now". This will cause some settings to be written and the button in the main menu will now work.

UnlimitedHugs commented 1 year ago

Fixed in 10.0.1.

Heremeus commented 1 year ago

Thanks for the quick fix :)