Bug Outfits and foldable items lead to broken state

katyarn

Member
When saving and equipping outfits containing foldable items, kolmafia can sometimes end up in a state of miscounting owned items, stating that you own zero of items that you do have or multiples of items that you do not. This leads to bad behavior when running automation involving changing equipment regularly such as ascension or farming. Garbage Collector can regularly reproduce this issue if you own a stinky cheese equipment. Unfortunately I don't have a reproduceable base case.

Some examples of resultant issues:
Code:
> js availableAmount(toItem("lucky gold ring"))

Returned: 0

Code:
js availableAmount(toItem("Fourth of May Cosplay Saber"))

Returned: 2
when I own 1 of each.
 

Crowther

Active member
Unfortunately I don't have a reproduceable base case.
That's the rub. For a while I had similar issues around outfit changes in between (pre or post?) adventure scripts. I could never force it and running the same code on different days would have different results. Someone finally found that bug and I haven't seen it since, but it took over a year. Good luck, katyarn. Also, thanks to whomever fixed that bug.
 
There is a similar issue with foldables and the maximizer, where the maximizer will un-equip foldable items, emptying the slot, and not re-filling the slot, that may be related to this one.
 

heeheehee

Developer
Staff member
There is a similar issue with foldables and the maximizer, where the maximizer will un-equip foldable items, emptying the slot, and not re-filling the slot, that may be related to this one.
if you want to nerdsnipe me, post a patch that reproduces the issue in MaximizerTest.java
 
Top