Bug - Fixed Stuck in loop when logging in mid-combat in Trendy

Salculd

New member
Pretty much just what the title says. I'm using 10094 and had to refresh a session while in the middle of combat since I had to go do something. Both trying to refresh the previous session or closing kolmafia entirely and logging in anew would cause it to give the "Redirected to a fight page" error nonstop as it tried to check what was still trendy. I was unable to stop it or advance in any way (save logging in normally via the browser and finishing the combat first, of course).
 

Theraze

Active member
Hmm... I was sure there was already an open bug on this, but I can't find it. This happens both with combat and non-combat adventures... it spams the redirecting message forever, or until you leave mafia and log in vanilla to finish the fight.
 

slyz

Developer
The "encountering a fight/choice adventure when logging in" has been fixed, but apparently typeii.php is another location you can't visit until you are out of the fight.
 

Veracity

Developer
Staff member
Revision 10211 will not loop infinitely checking for trendiness while logging in to a fight.
 

Theraze

Active member
I'm still getting infinite redirecting to fights when I leave my computer alone for too long during combat in a trendy run with revision 10218.
 

Veracity

Developer
Staff member
I don't know what you mean by "leave my computer alone for too long during combat." I assume it means your session times out. And then, when you come back to your computer and do ... something ... KoLmafia wants to time in your session and that is causing a loop?

If you would elaborate on the ... something ... and maybe include a debug log, it would help. As is, all I can glean from your report is that you "leave your computer alone during combat", and I don't understand what KoLmafia is doing while you "leave your computer alone." When _I_ "leave my computer alone", KoLmafia is idle.

In other words, give me a way to reproduce your issue. Until then, I am clueless. Thanks.
 
Last edited:

Theraze

Active member
Sure... Basically, this happens when I start a turn burning script, it gets partway through combat, DestroyAllMonsters decides that it can't safely finish, and aborts for me to finish combat. I've gotten distracted in the meantime since there's a whole wide internet to talk to, and my session times out. When I finally remember that my script should be about done and switch back, I see that combat has aborted. I launch a relay browser window, and... logins commence.

I'll try to get you some debug logs next time I notice though. It'll probably happen tonight, unless I forget again before then.

Edit: Yep, Theraze is currently halfway through a fight with tBW and it's gone to manual fighting. I'll leave it for the night, post the log in the morning of the lock-up. Here's the gCLI, since it won't be there in the morning when the spam happens.
Monster: The Big Wisniewski, ATT: 230, DEF: 207, HP: 2,000, Value: 5,086.96
You will die in 16 rounds.
Your attack will kill the monster in 52 rounds.
Round 1: Theraze executes a macro!
Round 1: Theraze uses the spectre scepter!
Round 2: the big wisniewski drops 3 attack power.
Round 2: the big wisniewski drops 3 defense.
Round 2: Emilio pulls out a can of beer, takes one sip, and pours the rest on your opponent's feet, dealing92damage.
You lose 1 hit point
You lose 35 hit points
Round 2: Theraze executes a macro!
Round 2: Theraze uses the spectre scepter!
Round 3: the big wisniewski takes 9 damage.
You lose 1 hit point
You lose 35 hit points
Round 3: Theraze executes a macro!
Round 3: Theraze uses the spectre scepter!
Round 4: the big wisniewski takes 10 damage.
You lose 1 hit point
You lose 37 hit points
DestroyAllMonsters starts now! (0mp option attack -- killrounds: 45, dierounds: 15)
Round 4: Theraze executes a macro!
Round 4: Theraze casts ENTANGLING NOODLES!
You lose 1 hit point
DestroyAllMonsters starts now! (0mp option attack -- killrounds: 45, dierounds: 12)
DestroyAllMonsters is unable to figure out a useful combat strategy
Round 5: Theraze executes a macro!
KoLmafia thinks it is round 6 but KoL thinks it is round 5
You're on your own, partner.
Click here to continue in the relay browser.
 
Last edited:

Theraze

Active member
As requested, here's a debug logfile showing it still trying to reinitialize trendy when it logs in. Killed the process at about 400kb of logfile.
 

Attachments

  • DEBUG_20120112.txt
    409.4 KB · Views: 52

slyz

Developer
I guess you should have waited a little longer, I don't see anything strange in that debug log: Mafia tries to retrieve game.php, realizes it needs to log in, logs in, starts synchronizing moon data and stops midway.
 

Theraze

Active member
At the point where I stopped, gCLI had redirected to a fight page about 90 times. I've let it redirect several thousand times before when I wasn't paying attention... how many failed redirects would you like in the log next time? :)

Edit: Just checked. In the attached log, there were 447 attempts to update the trendy request... 1 original and 446 "Redirected to a fight page" attempts, from 14:30:39 GMT until 14:31:11 GMT. That's 32 seconds with an average of about 14 login attempts per second. That's a lot of wasted server hits.
 
Last edited:

Theraze

Active member
Wandered back into the sadness of a trendy run since I just escaped, but...
KoLmafia thinks it is round 3 but KoL thinks it is round 1
You're on your own, partner.
Click here to continue in the relay browser.


Validating login server (www.kingdomofloathing.com)...
865 players online.
Sending login request...
Synchronizing moon data...
Requests complete.
And then the relay browser combat came up. Excellent! Thanks!
 
Top