Open Aviuz opened 4 years ago
Have the same issue, only happens when I use the "Connect" option in Android Tiers++ to control a surrogate android - the error being output when the Work tab is open is this:
Exception filling window for PrisonLabor.CompatibilityPatches.MainTabWindow_WorkTabMod_Tweak: System.NullReferenceException: Object reference not set to an instance of an object
at WorkTab.PawnColumnWorker_WorkType.DoCell (UnityEngine.Rect,Verse.Pawn,RimWorld.PawnTable) <0x0008e>
at WorkTab.PawnTable_PawnTableOnGUI.Prefix (RimWorld.PawnTable,UnityEngine.Vector2,RimWorld.PawnTableDef,UnityEngine.Vector2&) <0x0228a>
at (wrapper dynamic-method) RimWorld.PawnTable.PawnTableOnGUI_Patch1 (object,UnityEngine.Vector2) <0x000a1>
at RimWorld.MainTabWindow_PawnTable.DoWindowContents (UnityEngine.Rect) <0x00126>
at WorkTab.MainTabWindow_WorkTab.DoWindowContents (UnityEngine.Rect) <0x00057>
at PrisonLabor.CompatibilityPatches.MainTabWindow_WorkTabMod_Tweak.DoWindowContents (UnityEngine.Rect) <0x00409>
at Verse.Window/<WindowOnGUI>c__AnonStorey0.<>m__0 (int) <0x00882>
Verse.Log:Error(String, Boolean)
Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)
Ok, closer inspection it's more likely a bug in Fluffy's work tab rather than this mod, it's just the fact you're wrapping the base work tab type so it's showing in the stack trace.
Have narrowed down the bug to be due to the pawn not having a workSettings
instance; this is probably due to a bug in Android Tiers++ when it handles connecting to a surrogate or duplicating consciousness.
I'll log a bug with that mod and see if they manage to fix.
Note: I forked and amended the WorkTab mod code to create a new workSettings
instance when the error occurs, I couldn't find an in-game way of fixing the issue.
theres a bug when i use this with fluffys worktab and mods that have specail systems too convert prisoners. sometimes, when i convert a prisoner (either via a VX-0 surrogate neural chip from androids++ or nerve staple from qeustionable ethics enhanced) the work tab gets permanently bugged with the list ending at whatever new colonist i have (see: https://i.imgur.com/pWuHC2J.png) along with debug log error spam (hugslib log: https://gist.github.com/8729bba606ed476fa9a129fb6cefce09) . this time i had it with a QEE nerve staple, but its the exact same log error when doing it with a VX-0 surrogate. i dont know if this is on fluffys worktab's end or yours, but it seems too work if you recruit the pawn before doing the surgery via debug command. i think it might be how prison labor has compatiblity with worktab it breaks stuff that insta-converts a colonist, maybe? and sometimes it does work but idk why it does sometimes and doesnt othertimes