RimWorld

RimWorld

Smart Medicine - Continued
More red errors (mod conflicts)
Exception ticking Rrobrí (at (127, 0, 177)): System.ArgumentException: SplitOff with count <= 0 Parameter name: count [Ref 196B3FD6] at Verse.Thing.SplitOff (System.Int32 count) [0x00004] in <24d25868955f4df08b02c73b55f389fe>:0 at Verse.ThingWithComps.SplitOff (System.Int32 count) [0x00000] in <24d25868955f4df08b02c73b55f389fe>:0 at Verse.ThingOwner.TryDrop (Verse.Thing thing, Verse.IntVec3 dropLoc, Verse.Map map, Verse.ThingPlaceMode mode, System.Int32 count, Verse.Thing& resultingThing, System.Action2[T1,T2] placedAction, System.Predicate1[T] nearPlaceValidator) [0x000b4] in <24d25868955f4df08b02c73b55f389fe>:0 at Verse.ThingOwner.TryDrop (Verse.Thing thing, Verse.ThingPlaceMode mode, System.Int32 count, Verse.Thing& lastResultingThing, System.Action2[T1,T2] placedAction, System.Predicate1[T] nearPlaceValidator) [0x0004b] in <24d25868955f4df08b02c73b55f389fe>:0 at SmartMedicine.TendPatient_Notify_Starting_Patch.DropIt (Verse.Thing medicineToUse, System.Int32 needCount, Verse.Pawn healer, Verse.AI.Job job) [0x0002b] in <230987a481594ea5bb690eabcec1ea4c>:0 at SmartMedicine.TendPatient_Notify_Starting_Patch.Prefix (RimWorld.JobDriver_TendPatient __instance) [0x00087] in <230987a481594ea5bb690eabcec1ea4c>:0 at RimWorld.JobDriver_TendPatient.Notify_Starting () [0x00000] in <24d25868955f4df08b02c73b55f389fe>:0 - PREFIX uuugggg.rimworld.SmartMedicine.main: Void SmartMedicine.TendPatient_Notify_Starting_Patch:Prefix(JobDriver_TendPatient __instance) at Verse.AI.Pawn_JobTracker.StartJob (Verse.AI.Job newJob, Verse.AI.JobCondition lastJobEndCondition, Verse.AI.ThinkNode jobGiver, System.Boolean resumeCurJobAfterwards, System.Boolean cancelBusyStances, Verse.ThinkTreeDef thinkTree, System.Nullable1[T] tag, System.Boolean fromQueue, System.Boolean canReturnCurJobToPool, System.Nullable1[T] keepCarryingThingOverride, System.Boolean continueSleeping, System.Boolean addToJobsThisTick, System.Boolean preToilReservationsCanFail) [0x00624] in <24d25868955f4df08b02c73b55f389fe>:0 - PREFIX Snues.AutoArm: Void AutoArm.Pawn_JobTracker_StartJob_Combined_Patch:Prefix(Job newJob, Pawn ___pawn) - POSTFIX Snues.AutoArm: Void AutoArm.Pawn_JobTracker_StartJob_Combined_Patch:Postfix(Job newJob, Pawn ___pawn) at TKS_PriorityTreatment.Pawn_Patches.TickRare_Prefix (Verse.Pawn& __instance) [0x000b8] in F:\SteamLibrary\steamapps\common\RimWorld\Mods\PriorityTreatmentRessurected\Source\PriorityTreatmentRessurected.cs:729 at Verse.Pawn.TickRare () [0x0000d] in <24d25868955f4df08b02c73b55f389fe>:0 - PREFIX TKS_PriorityTreatment: Boolean TKS_PriorityTreatment.Pawn_Patches:TickRare_Prefix(Pawn& __instance) at Verse.Pawn.Tick () [0x00042] in <24d25868955f4df08b02c73b55f389fe>:0 - POSTFIX Mlie.YayosCombat3: Void yayoCombat.HarmonyPatches.Pawn_Tick:Postfix(Pawn __instance) at Verse.Thing.DoTick () [0x0007b] in <24d25868955f4df08b02c73b55f389fe>:0 at Verse.TickList.Tick () [0x00139] in <24d25868955f4df08b02c73b55f389fe>:0 UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Error (string) Verse.TickList:Tick () Verse.TickManager:DoSingleTick () Verse.TickManager:TickManagerUpdate () (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Game.UpdatePlay_Patch2 (Verse.Game) Verse.Root_Play:Update ()

Logs: https://gist.github.com/HugsLibRecordKeeper/c7855f9a5734be97e09710a830fffce7
< >
Showing 1-4 of 4 comments
Rovstam 31 Aug @ 4:35pm 
ChatGPT:

https://chatgpt.com/share/68b4dc2c-51e0-8004-a355-d2b706455e74

what mods conflict
ChatGPT Plus
Pensó durante 5s

Short answer: the mods shown in your stack trace are the ones most likely involved — SmartMedicine, PriorityTreatment (TKS_PriorityTreatment / PriorityTreatmentRessurected), AutoArm (Snues.AutoArm), and Yayo's Combat (Mlie.YayosCombat3). SmartMedicine looks like the immediate offender (it calls TryDrop / SplitOff), and the other three are very likely interacting with job/tick timing in ways that expose the bug.

Evidence from your trace

SmartMedicine.TendPatient_Notify_Starting_Patch.DropIt — immediate caller that ends up invoking SplitOff(0). (Mod id: uuugggg.rimworld.SmartMedicine.main)

TKS_PriorityTreatment.Pawn_Patches.TickRare_Prefix — patches Pawn.Tick and appears earlier in the call chain (PriorityTreatmentRessurected).

AutoArm.Pawn_JobTracker_StartJob_Combined_Patch — patches Pawn_JobTracker.StartJob (prefix and postfix) and can change job/reserve behavior.

yayoCombat.HarmonyPatches.Pawn_Tick:Postfix — Yayo's combat patches Pawn.Tick timing.

Core game methods (Verse / RimWorld) are where the SplitOff exception originates, but they're not the mod conflict source.

Why these likely conflict

SmartMedicine does the actual drop/split of medicine. If it ever computes needCount as 0 and calls TryDrop/SplitOff, you get the exception.

PriorityTreatment modifies how and when pawns get tended / job priorities; it can cause extra/duplicate tend jobs or change the timing of when a medicine is reserved or consumed.

AutoArm patches job-start logic; it can affect job reservations/ordering and thus lead to two pieces of code trying to take the same medicine in close succession.

Yayo’s Combat modifies Pawn.Tick timing which can slightly shift the ordering and expose race conditions between the above patches.

So the typical pattern: SmartMedicine tries to drop X medicine, another mod or previous action already removed the stack (or needCount computed incorrectly), resulting in a count == 0 call.
Rovstam 31 Aug @ 4:37pm 
Note to say: These errors happened right afterwards i used some command from Colony groups.

"Capture all downed enemies"
Rovstam 31 Aug @ 4:39pm 
Ugh — that “Orange started 10 jobs in one tick” spam is exactly the symptom of a job-start loop / race: some patched code (here, PriorityTreatment repeatedly shows up in the trace) is triggering StartJob many times in the same game tick for the same pawn. That quickly leads to other errors (split-offs, trying to feed/tend the same target repeatedly, etc.). Below I’ll explain what’s happening, why the mods in your stack trace are suspects, give a short test checklist, and provide two practical fixes you can apply right now (one quick/temporary, one small “safety” Harmony patch you can install to stop a pawn from starting an insane number of jobs in a single tick).

What’s happening (plain)

RimWorld detects when a pawn starts an excessive number of jobs in a single tick and logs the orange error. It’s a defensive message indicating something is looping or repeatedly forcing job starts.

Your stack shows TKS_PriorityTreatment.Pawn_JobTracker_Patches:TryFindAndStartJob_prefix repeatedly being invoked — so PriorityTreatment is actively participating in the job-finding/starting flow and is the most likely immediate cause (either itself is doing something wrong or exposing another mod’s race condition).

Other mods that showed up in your earlier trace (SmartMedicine, AutoArm, Yayo’s Combat) patch job/tick behavior too. Combined, they can create timing/race conditions where multiple patches trigger job starts or duplicate job attempts for the same pawn in one tick.

Most likely conflicting mods (based on your traces)

PriorityTreatment (TKS_PriorityTreatment / PriorityTreatmentRessurected) — repeatedly in the call stack, so very suspicious.

SmartMedicine — previously caused SplitOff(0) in your trace (interacts with tending/medicine).

AutoArm (Snues.AutoArm) — patches job start logic.

Yayo’s Combat (Mlie.YayosCombat3) — patches Pawn.Tick timing which can change ordering/timing.

Core methods in Verse and RimWorld are where errors surface but they’re not the root cause.
< >
Showing 1-4 of 4 comments
Per page: 1530 50