Bug r16935 debug log when going to inventory in Bad Moon SC run

Magus_Prime

Well-known member
After beating The Bonerdagon I clicked on the the "inventory" link in the top menu and noticed that a debug log had been created and an error message pointed to Ezandora's Guide relay script.

I've reported this in the Guide thread as well. Does anyone have any insight into what might have happened?

View attachment DEBUG_20160515.txt

Code:
You acquire an item: chest of the Bonerdagon
After Battle: You gain 59 Muscleboundness
After Battle: You gain 26 Magicalness
You can now equip a hippy protest button (and possibly other things).
After Battle: You gain 30 Cheek
Unexpected error, debug log printed.
Script execution aborted (java.lang.NullPointerException): (relay_Guide.ash, line 35354)
 
Last edited:

lostcalpolydude

Developer
Staff member
Looks like there was a null entry in activeEffects. That shouldn't happen, and it will probably be roughly impossible to reproduce.
 

Ezandora

Member
For reference, that line is:
Code:
int [effect] my_effects = my_effects();
Called during the periodic XMLHTTPRequest polling guide does of mafia.

My debug logs have this occuring six times since 2014. Maybe a minor race condition?

It is possible, though difficult, to reproduce this bug. Method:
-Run the attached relay script. It will continually loop my_effects() for sixty seconds.
-While it is running, reload your character pane until the NPE occurs. Alternatively, click the refresh button in mafia's interface. Or anything else that would modify KoLConstants.activeEffects.

View attachment relay_EffectsTest.ash
 

heeheehee

Developer
Staff member
Looks like there was a null entry in activeEffects. That shouldn't happen, and it will probably be roughly impossible to reproduce.

There are three places where arbitrary effects are added to activeEffects (at least, based on grepping for activeEffects.add): twice in CharPaneRequest, and once in ResultProcessor. Both instances in CharPaneRequest (both of the form activeEffects.addAll(visibleEffects)) have explicit guards against adding null to visibleEffects.

On the other hand, ResultProcessor only adds to activeEffects in processIntrinsic, which doesn't seem like it's often called (in fact, only if "you acquire an intrinsic" or "you lose an intrinsic" is at the start of the line)? That seems like a reasonable place to begin trying to reproduce this bug.
 
Top