Bug - Fixed Ascending into Zombie (HCZ for sure) hangs

Donavin69

Member
When ascending into HCZ (I've tried it a few times, this last time I started debug logging before I ascended so I have the entire 'process') mafia gets stuck on Dawn of Doh. I have to close mafia, open vanilla KOL, and finish through the choices to get into the run. I've put the log in this shared folder

It looks like the looping starts at about line 1082 in the log, but I don't know what to look for. I will be ascending HCZ one more time before Crimbo, (probably Friday) if you want me to check something else.

Don
 

Veracity

Developer
Staff member
When you clicked on the ascend button, it called afterlife.php.
That redirected to choice.php
Before we submitted it, we submitted a request to get the item description of the bone abacus. What the heck?
When that finished, we submitted the redirect to choice.php
That came back and we logged the encounter to Dawn of the D'oh
That is a choice adventure. We pass the page to the browser.

That choice adventure had a call to charpane.php in it, the browser requested that.
Before we got the response, KlickSaverPlus requested api.php
We got the response to api.php
We got the response to charpane.php

And then, KoLmafia proceeded to start refreshing the session, even though you had not told the choice adventure to proceed.

Somehow, it got confused and lost track of the fact that you were in the middle of a choice adventure. Could it be because of the bogus request to desc_item after we got the redirect to choice.php and before we submitted it? Or was it due to the unexpected call to api.php from KlickSaverPlus? Since we submit api.php ourself after a choice adventure (if you are automating), I am surprised it got confused. But I will investigate.

The thing that especially surprises me is two requests to look at the item description of the bone abacus: one when you ascended into Valhalla, and another when you returned to the Kingdom.

Code:
class net.sourceforge.kolmafia.request.RelayRequest
Requesting: http://www.kingdomofloathing.com/afterlife.php?action=ascend&confirmascend=1&whichsign=1&gender=2&whichclass=12&whichpath=10&asctype=3
Retrieved: http://www.kingdomofloathing.com/afterlife.php?action=ascend&confirmascend=1&whichsign=1&gender=2&whichclass=12&whichpath=10&asctype=3
Redirect to: Location = [choice.php?forceoption=0]

class net.sourceforge.kolmafia.request.GenericRequest
Requesting: http://www.kingdomofloathing.com/desc_item.php?whichitem=675213302
Retrieved: http://www.kingdomofloathing.com/desc_item.php?whichitem=675213302

class net.sourceforge.kolmafia.request.RelayRequest
Requesting: http://www.kingdomofloathing.com/choice.php?forceoption=0
Retrieved: http://www.kingdomofloathing.com/choice.php?forceoption=0
Encounter: Dawn of the D'oh

class net.sourceforge.kolmafia.request.RelayRequest
Requesting: http://www.kingdomofloathing.com/charpane.php
class net.sourceforge.kolmafia.request.RelayRequest
Requesting: http://www.kingdomofloathing.com/api.php?what=status&for=KlickSaverPlus

Retrieved: http://www.kingdomofloathing.com/charpane.php
Retrieved: http://www.kingdomofloathing.com/api.php?what=status&for=KlickSaverPlus

class net.sourceforge.kolmafia.request.GuildRequest
Requesting: http://www.kingdomofloathing.com/guild.php
 

Donavin69

Member
....
we submitted a request to get the item description of the bone abacus
.....
Before we got the response, KlickSaverPlus requested api.php
.....

When I ascend on Friday, I'll turn off GM, and I'll make sure I don't have an abacus. If it doesn't hang, it would point to 'one' of those things, I'll put the new debug log in the same folder.

If you have any other ideas for me to do, let me know.
 

Veracity

Developer
Staff member
Actually, in addition to the bone abacus thing, I do not understand the GuildRequest. A GuildRequest means it came from within KoLmafia itself (or a script), not from the browser. It was, literally, to "guild.php". No additional parameters. That comes from KoLCharacter.getGuildStoreOpen(). That is called from ASH's guild_store_available() function.

I'm curious: what scripts do you have configured to run at various times? login, post ascension, what have you...
 

Donavin69

Member
I have a post-adventure script, that runs after adv, and on login. I also have a kingliberated script, a pre-ascension script and a post-ascension script. Looking at the debug log, it ran the pre-ascension, but never got to the post-ascension. I put them in the dropbox folder as well if you think they might be doing something weird.
 

Veracity

Developer
Staff member
The loop is this:

choice.php -> Dawn of the D'Oh
guild.php -> redirect to choice.php

The latter is a KoLmafia request to check if the guild store is open. Obviously, it can't do that while you are stuck in a choice adventure. Looking at the code, the only place in KoLmafia itself that might want to check if the guild store is open is the Daily Deeds panel checking to see how many stills you have available.

I am unable to see why, exactly, that would fire after you ascend, but I can do a few things to make sure it doesn't do that:

- If we watch you ascend into Valhalla, mark the Guild store as known to be unavailable
- And if you log in and are in Valhalla, do the same thing.

Any other time, it should be safe to go to the Guild to look. I think.
 

Donavin69

Member
Revision 13326. Tell me how it goes on Friday.
I can confirm that with GM turned off, in Rev 13355, that ascending into HCZ went without a hitch. This can be marked as resolved. (now I just need to test it with GM turned on, but then it wouldn't be a Mafia problem)

Thank you!
 
Top