Bug - Cannot Reproduce r12366 - NPE Surprise by Hidden City

Fluxxdog

Active member
I honestly couldn't tell you what caused this as I wasn't even adventuring in the Hidden City. I checked my prefs just in case they were relevant.
Code:
> prefref city

_pneumaticityPotionUsed (user, now 'false', default 'false')
hiddenCityLayout (user, now 'DAENEEEELEDEEDDEEWETDF000', default '0000000000000000000000000')
lastHiddenCityAscension (user, now '40', default '0')
 

Attachments

Where were you adventuring? I see a couple of instances of this.

In the first, it was calling adventure(), which called your betweenBattleScript, which called "uneffect"
In the second, it was calling adv1(), which called your betweenBattleScript, which called restore_mp()

In both cases, the error occurred when it was trying to log whatever it was trying to do to the session log - and that URL of the last "adventure" was null, which HiddenCityRequest couldn't handle.

I can fix HiddenCityRequest to not NPE in this case, but I am curious about how it happened. I noticed this same thing when I was working on the code to make taking a map shortcut in Dreadsylvania log the zone it was going to. You were clearly in a script. Was it collecting Kreuggerands via map shortcuts, say?


It was doing a "betweenBattleScript" doing a restore_mp()
 
I'm attaching my session log for the day. The error is at line 825. Right before the error, I vamped out.

As for a null location, setting the location to something like that is where I have a script set the location to $location[none] to clear any interference with a maximizer script. For the life of me though, I can't imagine why it would even touch anything to do with the Hidden City. No bounty, I wasn't due for it's semirare... Though now that I check my logs, I did go to the Hidden City for shrinking powder yesterday. It wasn't the last adventure, though. After my powder, I went right back in to Dreadsylvania, which was my original destination this morning.

Any more information I can provide?
 

Attachments

You misunderstand. It has nothing to do with you going to the Hidden City. When KoLmafia wants to figure out how to log a URL which was submitted, it asks each class "is this yours?". HiddenCityRequest requires the current URL - and also the last URL for an adventure location, since KoL redirects you weirdly there. The bug happens when that "last URL" was null.

I submitted code to make it not NPE in that case, but I'm curious about why it code that null. I will look at your session log. Thanks.
 
Back
Top