bbradson / Performance-Fish

Performance Mod for RimWorld
Mozilla Public License 2.0
423 stars 34 forks source link

Incompatibility with fluffy's Medical Tab #25

Closed fullyautomatedlux closed 5 months ago

fullyautomatedlux commented 5 months ago

It seems that there's an issue with using the "show procedures that increase/decrease x" function of fluffy's Medical Tab mod, in that the pop-up menu doesn't appear and this error occurs as shown in the log:

Initializing new game with mods:
  - Garethp.ModlistConfigurator
  - zetrith.prepatcher
  - brrainz.harmony
  - me.samboycoding.betterloading.dev
  - bs.fishery
  - Ludeon.RimWorld
  - bs.betterlog
  - bs.performance
  - Ludeon.RimWorld.Royalty
  - Ludeon.RimWorld.Ideology
  - Ludeon.RimWorld.Biotech
  - UnlimitedHugs.HugsLib
  - Fluffy.MedicalTab
  - Krkr.RocketMan
Unloading 0 Unused Serialized files (Serialized files now loaded: 3)

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 28933.
Total: 338.546700 ms (FindLiveObjects: 1.046300 ms CreateObjectMapping: 0.513200 ms MarkObjects: 336.946000 ms  DeleteObjects: 0.040900 ms)

Exception filling window for Fluffy.MainTabWindow_Medical: System.NullReferenceException: Object reference not set to an instance of an object
  at System.Linq.Enumerable+<OfTypeIterator>d__32`1[TResult].<>m__Finally1 () [0x00007] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at System.Linq.Enumerable+<OfTypeIterator>d__32`1[TResult].System.IDisposable.Dispose () [0x00013] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at System.Linq.Enumerable+<OfTypeIterator>d__32`1[TResult].MoveNext () [0x00085] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00039] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at Fluffy.CapacityUtility.AffectsCapacityOnIngestion (Verse.ThingDef def, Verse.PawnCapacityDef capacity, System.Single current, System.Boolean negative) [0x00057] in <cfba35c05604436fb917b2eb307603b0>:0 
  at Fluffy.CapacityUtility.AdministersDrugThatAffects (Verse.RecipeDef r, Verse.PawnCapacityDef capacity, System.Single current, System.Boolean negative) [0x00025] in <cfba35c05604436fb917b2eb307603b0>:0 
  at Fluffy.PawnColumnWorker_Capacity+<>c__DisplayClass7_0.<DoInteractions>b__0 (Verse.RecipeDef r) [0x0003a] in <cfba35c05604436fb917b2eb307603b0>:0 
  at System.Linq.Enumerable+WhereListIterator`1[TSource].MoveNext () [0x00037] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at Fluffy.PawnColumnWorker_Capacity.DoInteractions (UnityEngine.Rect rect, Verse.Pawn pawn, System.Single level) [0x0009b] in <cfba35c05604436fb917b2eb307603b0>:0 
  at Fluffy.PawnColumnWorker_Capacity.DoCell (UnityEngine.Rect rect, Verse.Pawn pawn, RimWorld.PawnTable table) [0x0009e] in <cfba35c05604436fb917b2eb307603b0>:0 
  at RimWorld.PawnTable.PawnTableOnGUI (UnityEngine.Vector2 position) [0x0028d] in <cd7169108ea74757aa50c5b33d275c15>:0 
  at RimWorld.MainTabWindow_PawnTable.DoWindowContents (UnityEngine.Rect rect) [0x00020] in <cd7169108ea74757aa50c5b33d275c15>:0 
  at Fluffy.MainTabWindow_Medical.DoWindowContents (UnityEngine.Rect rect) [0x00052] in <cfba35c05604436fb917b2eb307603b0>:0 
  at Verse.Window.InnerWindowOnGUI (System.Int32 x) [0x001d3] in <cd7169108ea74757aa50c5b33d275c15>:0  
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Mouse position stack is not empty. There were more calls to BeginScrollView than EndScrollView. Fixing. 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Here's the full error log (apologies - there's likely quite a few unrelated errors for other mods in there. I'm not sure why since my full modlist for this test consisted of Auto Mod Config, Prepatcher, Harmony, BetterLoading, fishery, Better Log, Official DLCs, Hugslib, and Rocketman.)

Player.log

Here's a screenshot of my modlist: image

Please let me know if there's anything else I should add - I'm not a very technical person and don't have experience with debugging or anything - and thanks!

fullyautomatedlux commented 5 months ago

Tested it with just Performance Fish and its prereqs + Medical Tab and the error still occurs, so I'm fairly certain it's an incompatibility between the two.

fullyautomatedlux commented 5 months ago

Found the culprit! Turns out it's this setting here specifically that's causing the incompatibility for whatever reason: image

bbradson commented 5 months ago

Should be fixed now. The patch didn't get any changes between the erroneous build and earlier versions, but knowing the exact culprit made it easy to see the issues it gained. The compiler tried optimizing in a way that didn't work. Thanks for reporting