Bug - Fixed NPE related to available_choice_options()

AlbinoRhino

Active member
r26421
Script execution aborted (java.lang.NullPointerException: Cannot invoke "net.sourceforge.kolmafia.session.ChoiceAdventures$Option.getDecision(int)" because "opt" is null): (choose.ash, line 667)

line 667 is... thesech = available_choice_options(true);

This line of code has worked fine up until recently. I am occasionally getting the NPE above...but it only seems to appear for certain choice adventures. I noticed it yesterday with the choice #606, Lost in the Great Overlook Lodge, at Twin Peak. With that choice it appeared to abort with the "manual choice" message..ie the setting is zero.

I just saw this again with choice # 780 & 786 (the ancient spirit fights in the hidden apartment & hidden office building). However, despite printing the message above, these continued on to fight the spirit as usual.

I am sure I noticed this message with at least one other choice yesterday...but I can't remember which one now.

edit: ch # 788, Life is Like a Cherry of Bowls, also seems to do this (bowling alley)

edit 2: as usual, forgot to attach the log
 

Attachments

  • DEBUG_20220531.txt
    59.6 KB · Views: 1
Last edited:
Top