[1.0][MODLIST] Fluffy's Mods - New mini-mod: Power Cleaner [BETA]

Started by Fluffy (l2032), September 14, 2015, 06:16:45 AM

Previous topic - Next topic

Fluffy (l2032)

I've spent a bit of time doing an initial red text cleanup on Colony Manager (read; fix obvious changes in API until the mod compiles and loads in-game without errors). I won't be able to do much more work on it tonight, but I figured some of you might want to try your luck on an A17 version, and maybe find and help fix me some bugs in the process.

I can give absolutely no guarantees on this version!
to make things work, and keeping in mind the earlier discussion, I've disabled the production and import/export tab, as they have the biggest problems (bills have changed in A17, import/export has basically been broken since A16)

You can get the mod by grabbing the current master branch from github;
https://github.com/FluffierThanThou/ColonyManager/archive/master.zip

Or use this link;
https://www.dropbox.com/s/ny6zke10axiu0qo/Colony%20Manager%20v0.17.0.0.zip?dl=0

khearn

Medical tab is looking great on a17. But I get an error while loading an existing save if I add Colony Manager. It says to see the error log for more info, but I'm not sure where the error log is. This is on a Linux system with Steam.

My mods directory is ~/.steam/steam/steamapps/common/RimWorld/Mods/ if that helps to figure out where I'm likely to find an error log file.

Love

Quote from: khearn on May 20, 2017, 07:24:43 PM
Medical tab is looking great on a17. But I get an error while loading an existing save if I add Colony Manager. It says to see the error log for more info, but I'm not sure where the error log is. This is on a Linux system with Steam.

My mods directory is ~/.steam/steam/steamapps/common/RimWorld/Mods/ if that helps to figure out where I'm likely to find an error log file.

~/.steam/steam/steamapps/common/RimWorld/RimWorldWin_Data/output_log.txt

khearn

I don't have a RimWorldWin_Data/ directory, but there is a RimWorldLinux_Data/, but unfortunately, it doesn't contain an output_log.txt, or anything similar.

I have found /tmp/rimworld_log, which looks like it might be the right log. But it's rather large. Just starting the game, trying to load a save and getting the error, and exiting creates a log that's 17MB in size. Dunno if I should attach something that big.

Love

Quote from: khearn on May 20, 2017, 07:52:01 PM
I don't have a RimWorldWin_Data/ directory, but there is a RimWorldLinux_Data/, but unfortunately, it doesn't contain an output_log.txt, or anything similar.

I have found /tmp/rimworld_log, which looks like it might be the right log. But it's rather large. Just starting the game, trying to load a save and getting the error, and exiting creates a log that's 17MB in size. Dunno if I should attach something that big.

Do a word search in there for 'error'

Fluffy (l2032)

or zip (gzip, rar, whatever) it, the logs are highly repetitive, so usually zip down to pretty small size.

also, note that it just may not work on existing games.

khearn

Well, it compresses down a bunch, but the smallest I could get was using bzip2, and that only got it down to 670KB and the limit is 600KB. zip, gzip, and rar all came out bigger.

Here's what looks like the most relevant parts of the /tmp/rimworld_log file:
Quote
Loading game from file Red Hammers with mods Core, AreaUnlocker-0.17.0.0, FollowMe-0.17.0.2, StackMerger-0.17.0.0, MedicalTab-0.17.0.1, and ColonyManager-master
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Verse.Log:Message(String) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:29)
Verse.SavedGameLoader:LoadGameFromSaveFile(String) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Map\MapIniter\SavedGameLoader.cs:17)
Verse.Root_Play:<Start>m__852() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root_Play.cs:29)
Verse.LongEventHandler:RunEventFromAnotherThread(Action) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:439)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__84F() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:353)

(Filename: C Line: 0)

SaveableFromNode exception: System.MissingMethodException: No constructor found for FollowMe.FollowMe::.ctor()
  at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00134] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:319
  at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:268
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:263
  at Verse.ScribeExtractor.SaveableFromNode[GameComponent] (System.Xml.XmlNode subNode, System.Object[] ctorArgs) [0x00136] in C:\Dev\RimWorld\Assets\Scripts\Verse\SaveLoad\Scribe\Loader\ScribeExtractor.cs:103
Subnode:
<li Class="FollowMe.FollowMe" />
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
Verse.Log:Error(String) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:46)
Verse.ScribeExtractor:SaveableFromNode(XmlNode, Object[]) (at C:\Dev\RimWorld\Assets\Scripts\Verse\SaveLoad\Scribe\Loader\ScribeExtractor.cs:141)
Verse.Scribe_Collections:Look(List`1&, Boolean, String, LookMode, Object[]) (at C:\Dev\RimWorld\Assets\Scripts\Verse\SaveLoad\Scribe\Scribe_Collections.cs:121)
Verse.Scribe_Collections:Look(List`1&, String, LookMode, Object[]) (at C:\Dev\RimWorld\Assets\Scripts\Verse\SaveLoad\Scribe\Scribe_Collections.cs:13)
Verse.Game:ExposeSmallComponents() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Game\Game.cs:245)
Verse.Game:LoadGame() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Game\Game.cs:394)
Verse.SavedGameLoader:LoadGameFromSaveFile(String) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Map\MapIniter\SavedGameLoader.cs:35)
Verse.Root_Play:<Start>m__852() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root_Play.cs:29)
Verse.LongEventHandler:RunEventFromAnotherThread(Action) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:439)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__84F() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:353)

(Filename: C Line: 0)

SaveableFromNode exception: 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 Verse.Map.get_TileInfo () [0x00000] in C:\Dev\RimWorld\Assets\Scripts\Verse\Map\Map.cs:153
  at Verse.Map.get_Biome () [0x00000] in C:\Dev\RimWorld\Assets\Scripts\Verse\Map\Map.cs:154
  at FluffyManager.ManagerJob_Hunting..ctor (FluffyManager.Manager manager) [0x00000] in <filename unknown>:0
  at FluffyManager.ManagerTab_Hunting..ctor (FluffyManager.Manager manager) [0x00000] in <filename unknown>:0
  at FluffyManager.Manager..ctor (Verse.Map map) [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00119] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:513
  --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0012c] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:519
  at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:528
  at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x001b8] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:338
  at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:268
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:263
  at Verse.Map.FillComponents () [0x00056] in C:\Dev\RimWorld\Assets\Scripts\Verse\Map\Map.cs:350
  at Verse.Map.ConstructComponents () [0x00382] in C:\Dev\RimWorld\Assets\Scripts\Verse\Map\Map.cs:254
  at Verse.Map.ExposeData () [0x00178] in C:\Dev\RimWorld\Assets\Scripts\Verse\Map\Map.cs:316
  at Verse.ScribeExtractor.SaveableFromNode[Map] (System.Xml.XmlNode subNode, System.Object[] ctorArgs) [0x001d4] in C:\Dev\RimWorld\Assets\Scripts\Verse\SaveLoad\Scribe\Loader\ScribeExtractor.cs:122
Subnode:

And from there it starts a big dump of data, looks like lots of map grids making up about 75% of the 17MB file, then a few hundred errors like:
Quote
Could not resolve reference to object with loadID Thing_Human620 of type Verse.Pawn. Was it compressed away, destroyed, had no ID number, or not saved/loaded right? curParent=RimWorld.TaleData_Pawn curPathRelToParent=
With a stack trace after each. Those take up most of the remainder of the file, but they're probably just fallout from the earlier problems, which probably messed up the data structures, resulting in tons of messed up references.

I've had FollowMe installed for a while with no errors when loading, but to be honest, I'm not sure I've actually tried to use it, so I may have been getting the "No constructor found for FollowMe.FollowMe::.ctor()" error all along without it causing any noticable problems.

I strongly suspect the smoking gun is:
Quote
SaveableFromNode exception: 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 Verse.Map.get_TileInfo () [0x00000] in C:\Dev\RimWorld\Assets\Scripts\Verse\Map\Map.cs:153
  at Verse.Map.get_Biome () [0x00000] in C:\Dev\RimWorld\Assets\Scripts\Verse\Map\Map.cs:154
  at FluffyManager.ManagerJob_Hunting..ctor (FluffyManager.Manager manager) [0x00000] in <filename unknown>:0

If you really want the log, I can SNIP out a few MB of the data dump in the middle without being likely to make it any less useful.

Canute

Do you got hugslib mod installed too ?
Then you can upload an error log over the errorlog window and just post the link.

Fluffy (l2032)

@khearn; thanks! I agree with your assessment of what the likely cause is, I should be able to find/replicate the issue with what you've given me.

Also, there's an update for FollowMe on GitHub that gets rid of that error.

Fluffy (l2032)

Turns out there was actually still an error in FollowMe (or again, RimWorld is a bit of a moving target at this point), I've pushed a new version that should get rid of the error properly.

I've also hopefully fixed the error on loading games with ColonyManager attached, which may or may not resolve issues with adding Colony Manager to existing games as well. In the process, I've also improved handling of finding all animals/plants/trees on the map for the various tabs.

It's now a 'proper' pre-release, so you can get it from GitHub;
https://github.com/FluffierThanThou/ColonyManager/releases

FrozenSnowFox

A clean save on the newest version without Colony Manager and then Colony Manager added immediately after seemed to work fine.

Now I'm not sure how relevant this is but I figured it might be worth posting it.  I keep a save from an earlier version after crash landing which I use for testing.  Until now I hadn't noticed any issues.  Putting Colony Manager on though screwed up the work window and made a bit of a mess, it took a while to even get the log up to see the error.  I even tried loading the game and saving it so it was the newest version before trying to add Colony Manager but got the same result.  Anyway here's the log.

RimWorld 0.17.1543 rev1027
Verse.Log:Message(String) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:30)
RimWorld.VersionControl:LogVersionNumber() (at C:\Dev\RimWorld\Assets\Scripts\RimWorld\Utility\Version\VersionControl.cs:83)
Verse.Root:CheckGlobalInit() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root.cs:76)
Verse.Root:Start() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root.cs:31)
Verse.Root_Entry:Start() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root_Entry.cs:16)

Loading game from file Fox Start 1 with mods Core, Lightweight Building Polymer, and ColonyManager
Verse.Log:Message(String) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:30)
Verse.SavedGameLoader:LoadGameFromSaveFile(String) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Map\MapIniter\SavedGameLoader.cs:17)
Verse.Root_Play:<Start>m__854() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root_Play.cs:29)
Verse.LongEventHandler:RunEventFromAnotherThread(Action) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:439)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__851() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:353)

Loaded file (Map) is from version 0.17.1532 rev1003, we are running version 0.17.1543 rev1027.
Verse.Log:Warning(String) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:36)
Verse.ScribeMetaHeaderUtility:LoadGameDataHeader(ScribeHeaderMode, Boolean) (at C:\Dev\RimWorld\Assets\Scripts\Verse\SaveLoad\Scribe\ScribeMetaHeaderUtility.cs:86)
Verse.SavedGameLoader:LoadGameFromSaveFile(String) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Map\MapIniter\SavedGameLoader.cs:29)
Verse.Root_Play:<Start>m__854() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root_Play.cs:29)
Verse.LongEventHandler:RunEventFromAnotherThread(Action) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:439)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__851() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:353)

Exception filling window for RimWorld.MainTabWindow_Work: System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[System.Int32].get_Item (Int32 index) [0x00024] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:635
  at Verse.DefMap`2[Verse.WorkTypeDef,System.Int32].get_Item (Verse.WorkTypeDef def) [0x00000] in C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\DataTypes\DefMap.cs:20
  at RimWorld.Pawn_WorkSettings.GetPriority (Verse.WorkTypeDef w) [0x00006] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\AI\Pawn_WorkSettings.cs:138
  at RimWorld.WidgetsWork.DrawWorkBoxFor (Single x, Single y, Verse.Pawn p, Verse.WorkTypeDef wType, Boolean incapableBecauseOfCapacities) [0x001d8] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\WidgetsWork.cs:108
  at RimWorld.PawnColumnWorker_WorkPriority.DoCell (Rect rect, Verse.Pawn pawn, RimWorld.PawnTable table) [0x00097] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\PawnTable\PawnColumnWorkers\Misc\PawnColumnWorker_WorkPriority.cs:32
  at RimWorld.PawnTable.PawnTableOnGUI (Vector2 position) [0x0025f] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\PawnTable\PawnTable.cs:182
  at RimWorld.MainTabWindow_PawnTable.DoWindowContents (Rect rect) [0x00007] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\MainButtons\MainTabWindows\MainTabWindow_PawnTable.cs:46
  at RimWorld.MainTabWindow_Work.DoWindowContents (Rect rect) [0x00000] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\MainButtons\MainTabWindows\MainTabWindow_Work.cs:30
  at Verse.Window+<WindowOnGUI>c__AnonStorey2C5.<>m__1B2 (Int32 x) [0x001ff] in C:\Dev\RimWorld\Assets\Scripts\Verse\UI\Windows\Window.cs:192
Verse.Log:Error(String) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:48)
Verse.<WindowOnGUI>c__AnonStorey2C5:<>m__1B2(Int32) (at C:\Dev\RimWorld\Assets\Scripts\Verse\UI\Windows\Window.cs:196)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, GUISkin, Int32, Single, Single, GUIStyle) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUI.cs:1896)

Fluffy (l2032)

alright, so it definitely does not work with an ongoing save game. Thanks!

khearn

I finally had a chance to try out the new FollowMe (1.17.0.2) and Colony Manager (1.17.0.1). My existing save loads without any errors in the log. But when I open the Work tab, I see only one colonist (should be 7), and I repeatedly get this in the log as long as I have the tab open:
Quote
Exception filling window for RimWorld.MainTabWindow_Work: System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[System.Int32].get_Item (Int32 index) [0x00000] in <filename unknown>:0
  at Verse.DefMap`2[Verse.WorkTypeDef,System.Int32].get_Item (Verse.WorkTypeDef def) [0x00000] in <filename unknown>:0
  at RimWorld.Pawn_WorkSettings.GetPriority (Verse.WorkTypeDef w) [0x00000] in <filename unknown>:0
  at RimWorld.WidgetsWork.DrawWorkBoxFor (Single x, Single y, Verse.Pawn p, Verse.WorkTypeDef wType, Boolean incapableBecauseOfCapacities) [0x00000] in <filename unknown>:0
  at RimWorld.PawnColumnWorker_WorkPriority.DoCell (Rect rect, Verse.Pawn pawn, RimWorld.PawnTable table) [0x00000] in <filename unknown>:0
  at RimWorld.PawnTable.PawnTableOnGUI (Vector2 position) [0x00000] in <filename unknown>:0
  at RimWorld.MainTabWindow_PawnTable.DoWindowContents (Rect rect) [0x00000] in <filename unknown>:0
  at RimWorld.MainTabWindow_Work.DoWindowContents (Rect rect) [0x00000] in <filename unknown>:0
  at Verse.Window+<WindowOnGUI>c__AnonStorey2C5.<>m__1B2 (Int32 x) [0x00000] in <filename unknown>:0

(Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced)

(Filename:  Line: 422)


I hope that helps. Let me know if there's more info I can provide.


Fluffy (l2032)

You can't add ColonyManager in an existing game, sorry.

khearn

Ok, I wasn't sure if you were trying to make that work. I can survive without it until I start a new game. I think.

Thanks again for all the effort you've put into this!