Bug - Fixed Possible Consumables Database Error prevents Mafia from starting

Boesbert

Member
This is what I get with the most current and all older jar files I still have on hand:

Exception in thread "main" java.lang.ExceptionInInitializerError
at net.sourceforge.kolmafia.persistence.ItemDatabase.addPseudoItems(ItemDatabase.java:590)
at net.sourceforge.kolmafia.persistence.ItemDatabase.reset(ItemDatabase.java:278)
at net.sourceforge.kolmafia.persistence.ItemDatabase.<clinit>(ItemDatabase.java:262)
at net.sourceforge.kolmafia.persistence.FlaggedItems.initializeLists(FlaggedItems.java:274)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:303)
Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.Map.get(Object)" is null
at net.sourceforge.kolmafia.persistence.ConsumablesDatabase.calculateAdventureRange(ConsumablesDatabase.java:425)
at net.sourceforge.kolmafia.persistence.ConsumablesDatabase.calculateAdventureRange(ConsumablesDatabase.java:416)
at net.sourceforge.kolmafia.persistence.ConsumablesDatabase.saveConsumptionValues(ConsumablesDatabase.java:355)
at net.sourceforge.kolmafia.persistence.ConsumablesDatabase.readConsumptionData(ConsumablesDatabase.java:210)
at net.sourceforge.kolmafia.persistence.ConsumablesDatabase.reset(ConsumablesDatabase.java:146)
at net.sourceforge.kolmafia.persistence.ConsumablesDatabase.<clinit>(ConsumablesDatabase.java:156)
... 5 more

Sorry for the rushed report.

edit: this is onopenjdk version "17.0.4" 2022-07-19
 
Last edited:
Aha - that explains a lot. My restart and futile Googling was all in vain!

Same error here on MacOS 12.6. I tried yesterday's jar from about 5 am, and it fails as well.
 

Veracity

Developer
Staff member
We had special code to calculate consumable data for things that were improved by the holiday that didn't trouble to do the calculation for things that were NOT improved by the holiday.

Oops. Fix will be merged Real Soon Now.
 
Top