RimWorld

RimWorld

Mod Medicine Patch
UI crashing when health tab on a recruited pawn is opened.
When the health tab is opened, UI breaks until it's closed. This causes rimhud to deactivate, but the bug persists. Strangely, this only seems to affect recruited pawns, other pawns (both received through quest & starting pawn) are fine and I can access their health tabs without issue.

EDIT: Not a rimhud issue. Ran the game without rimhud, bug is still there.

Only noticed the bug today. This is what I got in the logs:

Exception filling tab RimWorld.ITab_Pawn_Health: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
[Ref 6EB9DE2E]
at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <eae584ce26bc40229c1b1aa476bfa589>:0
at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
at ArtificialBeings.MedicalCareUtility_Patch+MedicalCareUtility_MedicalCareSelectButton_Patch.Listener (UnityEngine.Rect rect, Verse.Pawn pawn) [0x000e4] in <7dc8ca276e0a4300afa5841922e7f17e>:0
at RimWorld.MedicalCareUtility.MedicalCareSelectButton (UnityEngine.Rect rect, Verse.Pawn pawn) [0x00019] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
- PREFIX ArtificialBeings: Boolean ArtificialBeings.MedicalCareUtility_Patch+MedicalCareUtility_MedicalCareSelectButton_Patch:Listener(Rect rect, Pawn pawn)
- PREFIX ModMedicinePatch: Boolean ModMedicinePatch.MedicalCareSelectButton:_Prefix(Rect rect, Pawn pawn)
at RimWorld.HealthCardUtility.DrawOverviewTab (UnityEngine.Rect rect, Verse.Pawn pawn, System.Single curY) [0x003f6] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
- TRANSPILER rimworld.erdelf.alien_race.main: IEnumerable`1 AlienRace.HarmonyPatches:BodyReferenceTranspiler(IEnumerable`1 instructions)
- TRANSPILER ArtificialBeings: IEnumerable`1 ArtificialBeings.HealthCardUtility_Patch+DrawOverviewTab_Patch:Transpiler(IEnumerable`1 insts, ILGenerator generator)
at RimWorld.HealthCardUtility.DrawHealthSummary (UnityEngine.Rect rect, Verse.Pawn pawn, System.Boolean allowOperations, Verse.Thing thingForMedBills) [0x0015a] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
at RimWorld.HealthCardUtility.DrawPawnHealthCard (UnityEngine.Rect outRect, Verse.Pawn pawn, System.Boolean allowOperations, System.Boolean showBloodLoss, Verse.Thing thingForMedBills) [0x000d9] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
- POSTFIX Dubwise.DubsMintMenus: Void DubsMintMenus.Patch_HealthCardUtility:Postfix(Rect outRect, Pawn pawn, Thing thingForMedBills)
at RimWorld.ITab_Pawn_Health.FillTab () [0x0003d] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
at Verse.InspectTabBase+<>c__DisplayClass19_0.<DoTabGUI>b__0 () [0x00039] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
Verse.Log:ErrorOnce (string,int)
Verse.InspectTabBase/<>c__DisplayClass19_0:<DoTabGUI>b__0 ()
Verse.ImmediateWindow:DoWindowContents (UnityEngine.Rect)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Window.InnerWindowOnGUI_Patch0 (Verse.Window,int)
UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)
Last edited by licencjat puha; 16 Aug, 2024 @ 6:49am
< >
Showing 1-6 of 6 comments
KiTA 22 Aug, 2024 @ 3:23am 
Getting the same thing (or something very similar) here. First mod in a Naked Brutality run. In addition the list of medicines is blank and I'm getting the guiclips error spam too. I'm wondering if any of the Tweaks or Patches mods I'm using is causing it somehow.


Exception filling tab RimWorld.ITab_Pawn_Health: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
[Ref 4EFDDA2B]
at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <eae584ce26bc40229c1b1aa476bfa589>:0
at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
at ModMedicinePatch.ModMedicinePatch.DynamicMedicalCareSelectButton (UnityEngine.Rect rect, Verse.Pawn pawn) [0x0003a] in <9e3f1bd9be7f49de97ccf25675d4d499>:0
at ModMedicinePatch.MedicalCareSelectButton._Prefix (UnityEngine.Rect rect, Verse.Pawn pawn) [0x00000] in <9e3f1bd9be7f49de97ccf25675d4d499>:0
at RimWorld.MedicalCareUtility.MedicalCareSelectButton (UnityEngine.Rect rect, Verse.Pawn pawn) [0x0002c] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
- PREFIX VREAndroidsMod: Boolean VREAndroids.MedicalCareUtility_MedicalCareSelectButton_Patch:Prefix(Pawn pawn)
- PREFIX ModMedicinePatch: Boolean ModMedicinePatch.MedicalCareSelectButton:_Prefix(Rect rect, Pawn pawn)
at RimWorld.HealthCardUtility.DrawOverviewTab (UnityEngine.Rect rect, Verse.Pawn pawn, System.Single curY) [0x0043d] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
- TRANSPILER uuugggg.rimworld.SmartMedicine.main: IEnumerable`1 SmartMedicine.SurgeryUnlimited.SurgergyUnlimitedPawnSettings:Transpiler(IEnumerable`1 instructions)
- PREFIX VREAndroidsMod: Boolean VREAndroids.HealthCardUtility_DrawOverviewTab_Patch:Prefix(Single& __result, Rect rect, Pawn pawn, Single curY)
at RimWorld.HealthCardUtility.DrawHealthSummary (UnityEngine.Rect rect, Verse.Pawn pawn, System.Boolean allowOperations, Verse.Thing thingForMedBills) [0x0019b] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
- PREFIX Adamas.Hospital: Void Hospital.Patches.AllowOperationsPatch+AllowOperationsOnPatients:Prefix(Pawn pawn, Boolean& allowOperations)
at RimWorld.HealthCardUtility.DrawPawnHealthCard (UnityEngine.Rect outRect, Verse.Pawn pawn, System.Boolean allowOperations, System.Boolean showBloodLoss, Verse.Thing thingForMedBills) [0x000f9] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
- TRANSPILER PeteTimesSix.CompactHediffs: IEnumerable`1 PeteTimesSix.CompactHediffs.HarmonyPatches.HealthCardUtility_DrawPawnHealthCard:HealthCardUtility_DrawPawnHealthCard_Transpiler(IEnumerable`1 instructions)
- PREFIX VREAndroidsMod: Void VREAndroids.HealthCardUtility_DrawPawnHealthCard_Patch:Prefix(Pawn pawn)
- POSTFIX Dubwise.DubsMintMenus: Void DubsMintMenus.Patch_HealthCardUtility:Postfix(Rect outRect, Pawn pawn, Thing thingForMedBills)
- POSTFIX VREAndroidsMod: Void VREAndroids.HealthCardUtility_DrawPawnHealthCard_Patch:Postfix()
at RimWorld.ITab_Pawn_Health.FillTab () [0x0003d] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
at Verse.InspectTabBase+<>c__DisplayClass19_0.<DoTabGUI>b__0 () [0x00046] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
- TRANSPILER net.pardeike.rimworld.lib.harmony: IEnumerable`1 VisualExceptions.ExceptionsAndActivatorHandler:Transpiler(IEnumerable`1 instructions, MethodBase original)
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

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



Edit: FIgured it out. NewGame+ had set my default mecidine to something... odd, due to mods being added/removed. No way to fix it as far as I can tell, sadly, since you can't select anything from the dropdown if the dropdown is glitching.
Last edited by KiTA; 22 Aug, 2024 @ 4:11am
bagelhe 1 Nov, 2024 @ 11:36pm 
same problem here
Perchance ? 24 Nov, 2024 @ 4:36pm 
Same here:

Exception filling tab RimWorld.ITab_Pawn_Health: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
[Ref 757EDB0]
at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <eae584ce26bc40229c1b1aa476bfa589>:0
at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
at ArtificialBeings.MedicalCareUtility_Patch+MedicalCareUtility_MedicalCareSelectButton_Patch.Listener (UnityEngine.Rect rect, Verse.Pawn pawn) [0x000e4] in <bf1467a20907468b987e39a81201728a>:0
at RimWorld.MedicalCareUtility.MedicalCareSelectButton (UnityEngine.Rect rect, Verse.Pawn pawn) [0x0002c] in <2a40c3593b334f29ac3cb3d32d652351>:0
- PREFIX VREAndroidsMod: Boolean VREAndroids.MedicalCareUtility_MedicalCareSelectButton_Patch:Prefix(Pawn pawn)
- PREFIX ArtificialBeings: Boolean ArtificialBeings.MedicalCareUtility_Patch+MedicalCareUtility_MedicalCareSelectButton_Patch:Listener(Rect rect, Pawn pawn)
- PREFIX ModMedicinePatch: Boolean ModMedicinePatch.MedicalCareSelectButton:_Prefix(Rect rect, Pawn pawn)
at RimWorld.HealthCardUtility.DrawOverviewTab (UnityEngine.Rect rect, Verse.Pawn pawn, System.Single curY) [0x00431] in <2a40c3593b334f29ac3cb3d32d652351>:0
- TRANSPILER rimworld.erdelf.alien_race.main: IEnumerable`1 AlienRace.HarmonyPatches:BodyReferenceTranspiler(IEnumerable`1 instructions)
- TRANSPILER ArtificialBeings: IEnumerable`1 ArtificialBeings.HealthCardUtility_Patch+DrawOverviewTab_Patch:Transpiler(IEnumerable`1 insts, ILGenerator generator)
- PREFIX VREAndroidsMod: Boolean VREAndroids.HealthCardUtility_DrawOverviewTab_Patch:Prefix(Single& __result, Rect rect, Pawn pawn, Single curY)
at RimWorld.HealthCardUtility.DrawHealthSummary (UnityEngine.Rect rect, Verse.Pawn pawn, System.Boolean allowOperations, Verse.Thing thingForMedBills) [0x0015a] in <2a40c3593b334f29ac3cb3d32d652351>:0
at RimWorld.HealthCardUtility.DrawPawnHealthCard (UnityEngine.Rect outRect, Verse.Pawn pawn, System.Boolean allowOperations, System.Boolean showBloodLoss, Verse.Thing thingForMedBills) [0x000f9] in <2a40c3593b334f29ac3cb3d32d652351>:0
- PREFIX VREAndroidsMod: Void VREAndroids.HealthCardUtility_DrawPawnHealthCard_Patch:Prefix(Pawn pawn)
- POSTFIX Dubwise.DubsMintMenus: Void DubsMintMenus.Patch_HealthCardUtility:Postfix(Rect outRect, Pawn pawn, Thing thingForMedBills)
- POSTFIX VREAndroidsMod: Void VREAndroids.HealthCardUtility_DrawPawnHealthCard_Patch:Postfix()
at RimWorld.ITab_Pawn_Health.FillTab () [0x00064] in <2a40c3593b334f29ac3cb3d32d652351>:0
- PREFIX Children: Void Children.ChildrenHarmony+ITab_Pawn_Health_FillTab_Patch:ITab_Pawn_Health_FillTab_Pre(Vector2& ___size)
at Verse.InspectTabBase+<>c__DisplayClass19_0.<DoTabGUI>b__0 () [0x00039] in <2a40c3593b334f29ac3cb3d32d652351>:0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)
Same issue here.

[[RimHUD v1.15.3 Auto-deactivation report]] Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index Trace: [mscorlib] Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index [Ref 1312C6A4] at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) at System.ThrowHelper.ThrowArgumentOutOfRangeException () at ArtificialBeings.MedicalCareUtility_Patch+MedicalCareUtility_MedicalCareSelectButton_Patch.Listener (UnityEngine.Rect rect, Verse.Pawn pawn) at RimWorld.MedicalCareUtility.MedicalCareSelectButton (UnityEngine.Rect rect, Verse.Pawn pawn) - PREFIX ArtificialBeings: Boolean ArtificialBeings.MedicalCareUtility_Patch+MedicalCareUtility_MedicalCareSelectButton_Patch:Listener(Rect rect, Pawn pawn) - PREFIX ModMedicinePatch: Boolean ModMedicinePatch.MedicalCareSelectButton:_Prefix(Rect rect, Pawn pawn) at RimHUD.Interface.Screen.InspectPaneButtons.DrawMedical (Verse.Pawn pawn, UnityEngine.Rect rect) at RimHUD.Interface.Screen.InspectPaneButtons.Draw (UnityEngine.Rect bounds, RimWorld.IInspectPane pane, System.Single& offset) - POSTFIX SmashPhil.SmashTools: Void SmashTools.Compatibility_RimHUD:DrawButtonsOnRimHUD(Rect bounds, IInspectPane pane, Single& offset) at RimHUD.Interface.Screen.InspectPanePlus.DrawPane (UnityEngine.Rect rect, RimWorld.IInspectPane pane)
Twitxx 11 Jun @ 12:52pm 
I had the same issue as above and have fixed it now. It is caused by a conflict between better pawn control and mod medicine patch so to fix it, remove either or change the setting for medicine use in pawn control to default. The issue appears when new colonists join (usually for a quest). It's also why it messes with RimHud. Hope this helps.
RimHUD UI errors, remove New Game Plus
< >
Showing 1-6 of 6 comments
Per page: 1530 50