Ludeon Forums

RimWorld => General Discussion => Topic started by: Encrtia on August 05, 2021, 08:11:09 AM

Title: How to find a bugged mod?
Post by: Encrtia on August 05, 2021, 08:11:09 AM
Hi,

Really simply, I get errors every now & again, to which if I can figure out the mod, I'll remove it. But sometimes I just have no idea how to find it. For instance, right now I've encountered a horrible bug where I can't call in any troopers to help me against a siege. I get the below dump, but no idea how to debug. Could any give me some assistance with this? Any tips what I should be looking out for going forward? Or maybe somewhere else I should be looking that I'm not?

Message logging is now once again on.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Message (string)
Verse.Log:ResetMessageCount ()
Verse.Log:Clear ()
Verse.EditWindow_Log:DoWindowContents (UnityEngine.Rect)
Verse.Window:InnerWindowOnGUI (int)
UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)

Root level exception in OnGUI(): System.MissingMethodException: bool RimWorld.DropCellFinder.TryFindDropSpotNear(Verse.IntVec3,Verse.Map,Verse.IntVec3&,bool,bool,bool,System.Nullable`1<Verse.IntVec2>)
  at (wrapper dynamic-method) RimWorld.PawnsArrivalModeWorker_EdgeDrop.RimWorld.PawnsArrivalModeWorker_EdgeDrop.TryResolveRaidSpawnCenter_Patch1(RimWorld.PawnsArrivalModeWorker_EdgeDrop,RimWorld.IncidentParms)
  at (wrapper dynamic-method) RimWorld.IncidentWorker_Raid.RimWorld.IncidentWorker_Raid.TryExecuteWorker_Patch1(RimWorld.IncidentWorker_Raid,RimWorld.IncidentParms)
  at (wrapper dynamic-method) RimWorld.IncidentWorker.RimWorld.IncidentWorker.TryExecute_Patch3(RimWorld.IncidentWorker,RimWorld.IncidentParms)
  at RimWorld.RoyalTitlePermitWorker_CallAid.CallAid (Verse.Pawn caller, Verse.Map map, Verse.IntVec3 spawnPos, RimWorld.Faction faction, System.Boolean free, System.Single biocodeChance) [0x000a5] in <1b9c4c73530448bcbb33283e1d4d7d05>:0
  at RimWorld.RoyalTitlePermitWorker_CallAid.OrderForceTarget (Verse.LocalTargetInfo target) [0x00014] in <1b9c4c73530448bcbb33283e1d4d7d05>:0
  at (wrapper dynamic-method) RimWorld.Targeter.RimWorld.Targeter.OrderPawnForceTarget_Patch1(RimWorld.Targeter,RimWorld.ITargetingSource)
  at RimWorld.Targeter.OrderVerbForceTarget () [0x0000d] in <1b9c4c73530448bcbb33283e1d4d7d05>:0
  at (wrapper dynamic-method) RimWorld.Targeter.RimWorld.Targeter.ProcessInputEvents_Patch2(RimWorld.Targeter)
  at RimWorld.MapInterface.HandleMapClicks () [0x0001a] in <1b9c4c73530448bcbb33283e1d4d7d05>:0
  at (wrapper dynamic-method) RimWorld.UIRoot_Play.RimWorld.UIRoot_Play.UIRootOnGUI_Patch2(RimWorld.UIRoot_Play)
  at (wrapper dynamic-method) Verse.Root.Verse.Root.OnGUI_Patch1(Verse.Root)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string)
(wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch1 (Verse.Root)
Title: Re: How to find a bugged mod?
Post by: Bozobub on August 06, 2021, 01:14:02 AM
You can make some guesses (mods that affect drop locations is one) BUT a fast way is to:
Please note that this can fail, for extreme conflicts and/or bugs among several mods.  In THAT case, you'll simply have to go down your mod list, enabling a small number (say, 3-5) at a time, starting a new game each time, until you find the problem(s).  It's relatively foolproof but astonishingly tedious with a big mod list; the above method works rather quickly, give it a whirl before you do it the hard way.  Nine times out of ten, it'll pay off ^^' .

Note:  If you want to check for conflicts with a specific mod/group of mods, simply keep that set of mods active the entire time.  If the errors persist with all other mods disabled, this means that set has an internal conflict and/or bug(s).  You can isolate it using the same procedure.

Fluffy's Mod Manager on Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=1507748539

GitHub: https://github.com/fluffy-mods/ModManager/releases
Title: Re: How to find a bugged mod?
Post by: RawCode on August 06, 2021, 03:03:57 AM
System.MissingMethodException
==
mod for other version of game

RimWorld.PawnsArrivalModeWorker_EdgeDrop.RimWorld.PawnsArrivalModeWorker_EdgeDrop.TryResolveRaidSpawnCenter_Patch1
+
Patch1
==
code injection code

means that mod provide code injection that designed for other version of rimworld

sadly, you failed to provide complete log, so your only option to disable half of mods as long as needed to solve issue on your own.

Title: Re: How to find a bugged mod?
Post by: Encrtia on August 06, 2021, 04:58:08 AM
Thanks guys, I appreciate the responses. Every patch, I normally do the iterative process of disabling half the mods to step-by-step figure out the new weak link, which I will have to do it seems. I was just checking if more experienced users have quicker ways than such given the game start-up times.

@RawCode, in regards to your comment of "you failed to provide a complete log", how do I obtain such? I'm presuming if I review that, I'll have a better chance at isolating the issue without the aforementioned brute force technique? Thanks for the example code snippets too! Really appreciate clarity to them.
Title: Re: How to find a bugged mod?
Post by: RawCode on August 06, 2021, 05:24:57 AM
Windows: %userprofile%\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\Player.log
Mac: Users/<YourUserName>/Library/Logs/Unity/RimWorld by Ludeon Studios/Player.log
Linux: /home/<YourUserName>/.config/unity3d/Ludeon Studios/RimWorld/Player.log
Title: Re: How to find a bugged mod?
Post by: Canute on August 06, 2021, 08:48:23 AM
When you use hugslib mod too, at the log window you should see a button "Share logs" that upload modlist + logfile and you can post.
At the log window you see a button "Files" that allow you to open the log file, ...
The internet allow you to search for information like "Rimworld logfile location"
And maybe the 2. link from my signature help you abit to adjust your modlist.


Title: Re: How to find a bugged mod?
Post by: Bozobub on August 06, 2021, 07:55:13 PM
If/when you identify the problem mod(s), remember that *changing the load order* can often resolve otherwise intractable issues.
Title: Re: How to find a bugged mod?
Post by: RawCode on August 07, 2021, 04:25:02 AM
do you really think that shuffling mods around will change signature of vanilla internal method?

current version of Rimworld have internal sorting based on rules defined in About.xml for every mod, if mod have declaration "load after X", it does not matter what you do, that specific mod will load after X, ever if you put it very first in mod order.

Title: Re: How to find a bugged mod?
Post by: Canute on August 07, 2021, 04:43:35 AM
RawCode, but some people ignore that or don't open Mods window and see there is anything red.
And i don't think steam follow the rules, when you first subscribe a mod and after that you subscribe the required mod.
Since i don't use steam i can't verify my theory why i saw soo many required mods below mods at so many modlist i looked at.