You are currently in a fight.

Sometimes, when I use the relay browser to fight, mafia doesn't recognize the fight ended, or immediatly starts a new (non- existent) encounter, it looks like this:

Code:
(previous fight agained a triffid, I win...)
You gain 8 Beefiness
You gain 4 Wizardliness
You gain 3 Cheek
Encounter: triffid
(and now it says I lost initiative- but I didn't initiate a new fight, and the relay browser confirms this- I can do whatever I want in relay)

In this instance, it was a putty'd monster, but I think it can happen on normal monsters too.

Anyways- the question is, how can I convince mafia the fight ended? Most actions through the GUI are disabled and tell me I'm in a fight. Refreshing status doesn't help. Changing equipment or casting skills in the relay doesn't help, putting stuff in the closet...
Starting a new fight is buggy (the monster stats show up as whatever I was previously fighting- ie. a plant phylum with very little HP) and the whole thing corrects itself only on the next fight- so whenever this happens I have to waste two adventures just to get mafia to respond again.

Is there quicker way to fix this? (or can the issue itself be fixed?) I wan't running a CCS in this case, and BBB is off, so I'm thinking it's either mafia, my relay scripts or my browser.

Thanks!
 

Bale

Minion
I've never seen this happen to me (despite using the relay browser frequently), but using the relay browser to look at the main screen (the map) should do the job of letting it know the fight is over.

It might not be relevant, but what version of KoLmafia are you using and what is your OS?
 
And it happened again.

r12566, running vista.

Code:
After Battle: "You may rest assured that even with the considerable shrinking effect at play, here, I am still rather impressively endowed for a scarecrow," Grog says, winking and grinning.
You gain 168 Meat
You gain 33 Strengthliness
You gain 15 Mysteriousness
You gain 10 Sarcasm
and right after- I lose initiative in a non-existant fight. (and I can't do anything because it thinks i'm in a fight)
It was a faxed fight that aborted, asking me to complete (The ccs was supposed to fire a putty, but i didn't have one). I won the fight, and it thought a new one started for no reason.

Maybe it's because the fight aborted right on the first round? When I open the relay to finish the fight it- it appears as if the fight just started (the monster intro text, who got the jump etc) so maybe when I open the relay it thinks it's actually a brand new fight?

I didn't bug out my next fight though, so I only need to start & finish one fight manually before everything goes back to normal. (visiting main map didn't work)
 
Necro-bumping myself, because this is becoming more common lately- mafia just doesn't register that the fight ended, and locks me out of doing most stuff because it thinks I'm still in combat.

What sort of debugging can I do to help find the root of this issue? Currently using r13192.
 

Veracity

Developer
Staff member
Go to the CLI:

debug on

Start an automated adventure with a CCS that will abort
Finish the fight in the Relay Browser

debug off

And attach the DEBUG_20131118.txt file that was created.
 
Thanks.
I couldn't reproduce the issue because it won't budge with debug on, not really sure why. Adventuring work fine with debugging off. I'm attaching the debug log incase it'll help (I stopped mafia pretty quickly- when I let it sit for a while it created a gigantic log file I can't upload)
 

Attachments

  • DEBUG_20131119.txt
    1.8 MB · Views: 46

Veracity

Developer
Staff member
I couldn't reproduce the issue because it won't budge with debug on, not really sure why.
What does "it won't budge" mean?

Adventuring work fine with debugging off.
This makes no sense.

I'm attaching the debug log incase it'll help (I stopped mafia pretty quickly- when I let it sit for a while it created a gigantic log file I can't upload)
99% - literally: 27574/27682 lines - of the file was the ASH trace of your between battle script. Then:

Requesting: http://www.kingdomofloathing.com/adventure.php?snarfblat=327
Retrieved: http://www.kingdomofloathing.com/adventure.php?snarfblat=327
Redirect:
Requesting: http://www.kingdomofloathing.com/fight.php?ireallymeanit=1384879338
Retrieved: http://www.kingdomofloathing.com/fight.php?ireallymeanit=1384879338

[40] Shop Class
Encounter: out-of-control bandsaw
Strategy: C:\Boaz\Mafia\3\ccs\Hardcore.ccs [default]
Round 0: forkrunkyandjadra wins initiative!

KoLmafia declares world peace.
<a href=main.php target=mainpane class=error>Click here to continue in the relay browser.</a><br>

And that is it. I assume you hit ESC to abort. Or, perhaps your CCS did it.
Can I see Hardcore.ccs, please? Thanks.
 
Won't budge= it simply won't adventure with debug on.. Only goes as far saying I won initiative, and then stops- no error messege, no red left pane, nada. debug off- everything is dandy again.
AFTER I hit escape and debug off, it says "Unknown variable 'results' (adventure.ash, line 2)" (adventure.ash is from batbrain/man I think?
And yes- I did hit escape, the debug file just keeps growing bigger and bigger if I let it go on, printing more of the same AFAICT.


CCS it's just "special action" and then consult WHAM, nothing fancy.




it sort of happened again when I had debug off, though-
Code:
Request 1 of 2 (Highlands: A-Boo Peak) in progress...

[321] A-Boo Peak
Encounter: Space Tourist Explorer Ghost
Strategy: C:\Boaz\Mafia\3\ccs\Hardcore.ccs [default]
Round 0: forkrunkyandjadra wins initiative!
WHAM: Running SmartStasis
5/5 monsters drop goals here.
WHAM: Starting evaluation and performing of attack
KoLmafia thinks it is round 2 but KoL thinks it is round 1
WHAM: We are going to 1-shot with Cannelloni Cannon.
Round 2: forkrunkyandjadra executes a macro!
Round 2: forkrunkyandjadra casts CANNELLONI CANNON!
KoLmafia thinks it is round 3 but KoL thinks it is round 2
Round 3: space tourist explorer ghost takes 102 damage.
Round 3: Trort lowers itself down over your temples and shoots a beam of energy through your brain. Whee!
Round 3: You gain 13 Muscularity Points.
Round 3: forkrunkyandjadra wins the fight!
After Battle: Trort surveys the scene from atop the throne, and gains 1 Experience.
You gain 4 hit points
You gain 4 Muscularity Points
After Battle: "Tell me, ForKrunkyandJadra, have you the proper ballroom dance training to dance the tango? No, I thought not. Very well, I shall demonstrate." He dances ferociously, clapping and stomping.
You acquire an item: Space Tours Tripple
You gain 10 Muscleboundness
You gain 8 Wizardliness
You gain 9 Sarcasm
Encounter: Space Tourist Explorer Ghost
Strategy: C:\Boaz\Mafia\3\ccs\Hardcore.ccs [default]
Round 0: forkrunkyandjadra loses initiative!
Unexpected error, debug log printed.

WHAM: Running SmartStasis
5/5 monsters drop goals here.
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with Cannelloni Cannon.
Round 1: forkrunkyandjadra executes a macro!
Round 1: forkrunkyandjadra casts CANNELLONI CANNON!
Round 2: space tourist explorer ghost takes 158 damage.
Round 2: Trort lowers itself down over your temples and shoots a beam of energy through your brain. Whee!
Round 2: You gain 11 Muscularity Points.
Round 2: forkrunkyandjadra wins the fight!
After Battle: Trort surveys the scene from atop the throne, and gains 1 Experience.
You gain 3 hit points
You gain 5 Muscularity Points
After Battle: "Tell me, ForKrunkyandJadra, have you the proper ballroom dance training to dance the tango? No, I thought not. Very well, I shall demonstrate." He dances ferociously, clapping and stomping.
You acquire an item: Claybender glasses
You gain 19 Fortitude
You gain 2 Magicalness
You gain 7 Smarm
Encounter: Claybender Sorcerer Ghost
Strategy: C:\Boaz\Mafia\3\ccs\Hardcore.ccs [default]
Round 0: forkrunkyandjadra wins initiative!
Unexpected error, debug log printed.

No Adventures. How Sad.

I didn't pay attention, but strangly, it DID allow me to cast ode and overdrink, but when I tried to get my hatter buff for tommorrow, it said I'm in a fight again (that's when I noticed). This is the related (I think?) debug.

Is this any help at all?

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       KoLmafia v16.1 r13211, Windows Vista, Java 1.7.0_25
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread of KoL's
 Gameplay-Discussion forum. If you would like the KoLmafia dev team
 to look at it, please write a bug report at kolmafia.us. Include
 specific information about what you were doing when you made this
 and include this log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Tue Nov 19 22:32:12 IST 2013
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at net.sourceforge.kolmafia.request.FightRequest.nextRound(FightRequest.java:766)
	at net.sourceforge.kolmafia.request.FightRequest.updateCurrentAction(FightRequest.java:844)
	at net.sourceforge.kolmafia.request.FightRequest.nextRound(FightRequest.java:800)
	at net.sourceforge.kolmafia.request.FightRequest.runOnce(FightRequest.java:1465)
	at net.sourceforge.kolmafia.request.FightRequest.run(FightRequest.java:1491)
	at net.sourceforge.kolmafia.request.GenericRequest.handleServerRedirect(GenericRequest.java:2081)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1853)
	at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1515)
	at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1409)
	at net.sourceforge.kolmafia.request.AdventureRequest.run(AdventureRequest.java:241)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:222)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:185)
	at net.sourceforge.kolmafia.KoLAdventure.run(KoLAdventure.java:1138)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:222)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:196)
	at net.sourceforge.kolmafia.KoLmafia.executeAdventureOnce(KoLmafia.java:1326)
	at net.sourceforge.kolmafia.KoLmafia.executeRequestOnce(KoLmafia.java:1346)
	at net.sourceforge.kolmafia.KoLmafia.executeRequest(KoLmafia.java:1213)
	at net.sourceforge.kolmafia.KoLmafia.makeRequest(KoLmafia.java:1067)
	at net.sourceforge.kolmafia.textui.command.AdventureCommand.run(AdventureCommand.java:108)
	at net.sourceforge.kolmafia.KoLmafiaCLI.doExecuteCommand(KoLmafiaCLI.java:595)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:548)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:539)
	at net.sourceforge.kolmafia.textui.RuntimeLibrary.adventure(RuntimeLibrary.java:2446)
	at sun.reflect.GeneratedMethodAccessor263.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.kolmafia.textui.parsetree.LibraryFunction.execute(LibraryFunction.java:106)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.Conditional.execute(Conditional.java:80)
	at net.sourceforge.kolmafia.textui.parsetree.If.execute(If.java:68)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:465)
	at net.sourceforge.kolmafia.textui.parsetree.Else.execute(Else.java:65)
	at net.sourceforge.kolmafia.textui.parsetree.If.execute(If.java:82)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:465)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:152)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionReturn.execute(FunctionReturn.java:100)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:465)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:152)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:465)
	at net.sourceforge.kolmafia.textui.parsetree.Loop.execute(Loop.java:59)
	at net.sourceforge.kolmafia.textui.parsetree.WhileLoop.execute(WhileLoop.java:100)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:465)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:152)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:465)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:152)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:465)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:152)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:465)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:152)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:465)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:152)
	at net.sourceforge.kolmafia.textui.Interpreter.executeScope(Interpreter.java:375)
	at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:299)
	at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:292)
	at net.sourceforge.kolmafia.textui.command.CallScriptCommand.call(CallScriptCommand.java:251)
	at net.sourceforge.kolmafia.KoLmafiaCLI.doExecuteCommand(KoLmafiaCLI.java:605)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:548)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:449)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:317)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:190)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:164)

Thanks Veracity!
 

fronobulax

Developer
Staff member
Won't budge= it simply won't adventure with debug on.. Only goes as far saying I won initiative, and then stops- no error messege, no red left pane, nada.

For the benefit of people who want to submit good bug reports, in a case like this, an important thing to report is how long did you sit and observe it not budging? Given the size of the debug file it is quite possible that it could have taken, for example, 30 minutes to finish one adventure.
 
Uhh.. Not that long, and it turned up 4gigs.. waiting a several seconds landed a couple of megs, and the file attached was just a second or two. If any good will come out of waiting 30 minutes I don't mind trying..
 

Veracity

Developer
Staff member
Won't budge= it simply won't adventure with debug on.. Only goes as far saying I won initiative, and then stops- no error messege, no red left pane, nada. debug off- everything is dandy again.
Uh huh. And there is no evidence in the DEBUG log that it was doing anything whatsoever. No script.

AFTER I hit escape and debug off, it says "Unknown variable 'results' (adventure.ash, line 2)" (adventure.ash is from batbrain/man I think?
So, you were running the batman relay script? That is the script that was 99% of the debug log?

And yes- I did hit escape, the debug file just keeps growing bigger and bigger if I let it go on, printing more of the same AFAICT.
How did you mange to hit escape after it got exactly one repetition in?

CCS it's just "special action" and then consult WHAM, nothing fancy.
I see no indication that WHAM executed.

Unexpected error, debug log printed.
That stack trace is interesting. Too bad we didn't have a debug log to see why FightRequest.nextAction was null after running the consult script.
 

Veracity

Developer
Staff member
Uhh.. Not that long, and it turned up 4gigs.. waiting a several seconds landed a couple of megs, and the file attached was just a second or two. If any good will come out of waiting 30 minutes I don't mind trying..
I would say that you hit abort before the consult script had a chance to run.
And I would say all the other logging is WHAM running and doing nothing, followed by batbrain relay resubmitting the fight, and so on.

OK, I have changed logging to make things a lot more manageable. Get revision 13214.

- when you turn on debugging, it will omit all the ASH tracing, unless you enable that as well
- it will log the names of scripts that it executes, when they start and when they finish
- it will not throw an NPE when FightRequest.nextAction is null after a consult script.

So, try this:

- debug on
- adventure in the relay browser.
--> if the consult script screws up, it SHOULD abort
- debug off

And lets see the debug log. We can proceed from there.
 

fronobulax

Developer
Staff member
Uhh.. Not that long, and it turned up 4gigs.. waiting a several seconds landed a couple of megs, and the file attached was just a second or two. If any good will come out of waiting 30 minutes I don't mind trying..

I don't think you have to try that long. I was just trying to note that in terms of diagnostics and problem solving, there is a difference between something that never stops and something that is so slow that users run out of patience or time before it stops. If veracity is on it then just do as she asks. That said, didn't she ask for a copy of hardcore.ccs?
 
How did you mange to hit escape after it got exactly one repetition in?
Ninja reflexes? I didn't even notice is was just one... Coincidence.

So, you were running the batman relay script? That is the script that was 99% of the debug log?
I don't know if that's the one in the debug log, I'm running a lot of scripts, but I do believe adventure.ash is from batman relay..
Now that I think about it, I removed that script, so it's not supposed to be there. I removed it- two days later and I'm clean. I'll post an update next week, but right now it looks like not properly removing the batman relay could've been the problem.
 
Damn! It won't stop...
R13288


Debug log is once again too big to add, so i copy/pasted the relevant part (everything from the previous adventure to until after I abort it. I didn't delete anything in-between because I can't tell what's important and what not.)
Those huge blocks of text with combat items' names sprinkled are wham_dontuse.


this is with a different CCS (though they both lead to WHAM eventually)
CCS: (my out-of-date aftercore sea routine)
[ default ]
[ default ]
skill entangling noodles
consult wham.ash


[ neptune flytrap ]
skill entangling noodles
skill transcendent olfaction
item Rain-Doh blue balls, Rain-Doh black box
skill shieldbutt

[ wild seahorse ]
item sea cowbell, sea cowbell
item sea cowbell, sea lasso

from the CLI:

You gain 43 Fortitude
You gain 46 Mysteriousness
You gain 81 Roguishness
Encounter: Mer-kin healer
Round 0: forkrunkyandjadra loses initiative!
KoLmafia thinks it is round 1 but KoL thinks it is round 8
KoLmafia thinks it is round 2 but KoL thinks it is round 8

> restore hp

Restoring HP! Currently at 194 of 643 HP, 14 of 582 MP, current meat: 4172687 ... Target HP = 611.
Restoring MP! Currently at 194 of 643 HP, 14 of 582 MP, current meat: 4172687 ... Target MP = 75.
You are currently in a fight.
You are currently in a fight.
You are currently in a fight.
You are currently in a fight.

which goes on and on an on until I abort. The repetitive "currently in a fight" doesn't always happen. If I try to change gear for example, it only displays it once.


As always- let me know what to try because I really have no idea what's going on, and thanks for the help!
 

Attachments

  • debug.txt
    891.9 KB · Views: 104

Veracity

Developer
Staff member
This starts like this:

Request 7 of 20 (The Sea: The Mer-Kin Outpost) in progress...
class net.sourceforge.kolmafia.request.AdventureRequest
Connecting to adventure.php…

It is "Request 7 of 20". So, this is obviously automation. How are you doing it? Did you go to the Adventure Frame in the GUI, select the Mer-kin Outpost, and tell it to run for 20 turns? Or are you running a script to adventure in the Sea? Like, for example, Theraze's "The Sea" script?

You get into a fight.

Starting consult script: wham.ash
(followed by all the outfit from WHAM telling you the things it knew that wouldn't work against the Mer-kin healer)

Requesting: http://www.kingdomofloathing.com/fight.php?action=macro&macrotext=abort+%22WHAM%3A+Unable+to+figure+out+a+combat+strategy.+Helpful+information+regarding+your+skills+have+been+printed+to+the+CLI%22

Which resulted in KoL returning this:

Macro Aborted ("abort "WHAM: Unable to figure out a combat strategy. Helpful information regarding your skills have been printed to the CLI"")

And KoLmafia printing this:

KoLmafia thinks it is round 3 but KoL thinks it is round 2
WHAM: Unable to figure out a combat strategy. Helpful information regarding your skills have been printed to the CLI
Finished consult script: wham.ash
You're on your own, partner.

Bottom line, your consult script aborted and the automated fight aborted, leaving you in a fight.

This was followed by:

class net.sourceforge.kolmafia.request.RelayRequest
Connecting to seafloor.php...
Field: Location = [fight.php]

That is a RelayRequest - which is to say, this is something you clocked in the Relay Browser.

It redirected to fight.php. No surprise; you are still in a fight.

Starting relay script: charpane.ash
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to charpane.php...

Interesting. A relay script for charpane.ash. I assume you clicked the "refresh" link on the charpane.

Finished relay script: charpane.ash
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to trophy.php...

Now to trophy.php?

Starting relay script: charsheet.ash
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to charsheet.php...

Now to the charsheet? These RelayRequests are coming fast and furious.

No surprise, charsheet and trophy redirect to fight.php since you continue to still be in a fight.

Finished relay script: charpane.ash
Starting relay script: charsheet.ash
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to trophy.php...

Wow, something sure wants to visit the charsheet a lot. And doing that seems to want to visit trophy.php.

Finished relay script: charpane.ash
Starting relay script: charsheet.ash
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to charsheet.php...

I see it again and again and again: your charpane.ash Relay Script finishes and your charsheet.ash Relay Script begins. It repeatedly tries to visit charsheet.php and trophy.php (the Trophy Maker), neither of which is accessible during a fight.

> restore hp

Starting recovery script: Universal_recovery.ash
<font color="#66CC00">Restoring HP! Currently at 194 of 643 HP, 14 of 582 MP, current meat: 4172687 ... Target HP = 611.</font>
<font color="#33CCCC">Restoring MP! Currently at 194 of 643 HP, 14 of 582 MP, current meat: 4172687 ... Target MP = 75.</font>
You are currently in a fight.
You are currently in a fight.


You are currently in a fight.
KoLmafia declares world peace.
Finished recovery script: Universal_recovery.ash
KoLmafia declares world peace.
Starting relay script: charpane.ash
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to charpane.php...
Finished relay script: charpane.ash
Starting relay script: charsheet.ash
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to charsheet.php...
Retrieving server reply...
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to trophy.php...
Retrieved: http://www.kingdomofloathing.com/charsheet.php
Retrieved: http://www.kingdomofloathing.com/trophy.php
Finished relay script: charsheet.ash
 

Veracity

Developer
Staff member
class net.sourceforge.kolmafia.request.RelayRequest
Round 18: forkrunkyandjadra executes a macro!
Connecting to fight.php...

Requesting: http://www.kingdomofloathing.com/fight.php?action=macro&macrotext=abort+pastround+25%3Battack%3Brepeat%3B&whichmacro=0

Retrieved: http://www.kingdomofloathing.com/charsheet.php
Field: Location = [fight.php]
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to fight.php...

Retrieved: http://www.kingdomofloathing.com/trophy.php
Field: Location = [fight.php]
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to fight.php...

We have three simultaneous requests out:

1) The actual in-progress fight
2) An attempt to connect to charsheet.php because your charsheet.ash relay script requested it. That redirects to fight.php.
3) An attempt to connect to trophy.php (the trophy maker) because one of your relay scripts requested it. That redirects to fight.php

You let's look at what happens when those requests come back:

Retrieved: http://www.kingdomofloathing.com/fight.php?action=macro&macrotext=abort+pastround+25%3Battack%3Brepeat%3B&whichmacro=0

Round 18: forkrunkyandjadra attacks!
KoLmafia thinks it is round 19 but KoL thinks it is round 9
Round 19: mer-kin healer takes 11 damage.
Round 19: mer-kin healer takes 205 damage.
Round 19: forkrunkyandjadra wins the fight!
...process results...

Sweet. you won.

Retrieved: http://www.kingdomofloathing.com/fight.php
ResponseText has 34269 characters.
You twiddle your thumbs
Encounter: Mer-kin healer
Round 0: forkrunkyandjadra loses initiative!
KoLmafia thinks it is round 1 but KoL thinks it is round 8
Finished relay script: charsheet.ash

Retrieved: http://www.kingdomofloathing.com/fight.php
ResponseText has 34269 characters.
You twiddle your thumbs.
KoLmafia thinks it is round 2 but KoL thinks it is round 8
Starting relay script: charpane.ash
class net.sourceforge.kolmafia.request.RelayRequest

So, you are obviously doing multiple things at the same time:

- You are automating adventuring; the "Request 7 of 20" proves that.
- You are typing things in the CLI: "restore HP". Although, I suppose that could have been via clicking the link in the charpane.
- In any case, you are doing things in the Relay Browser.

Something is attempting to go repeatedly to charpane.php
Something is attempting to go repeatedly to trophy.php.

I notice that both of the latter are RelayRequests. It so happens that if there is an active relay script running, calls to "visit_url" use a RelayRequest rather than a GenericRequest. I conclude that you have a relay script which is trying to go to those places and it is failing.

It so happens that we recently made visit_url follow redirections. So, when charsheet.php and trophy.php redirect to fight.php, we follow it. I see the following code in RuntimeLibrary.visit_url:

Code:
		// If we are not in a relay script, ignore a request to an unstarted fight
		if ( relayRequest == null &&
		     request.getPath().equals( "fight.php" ) &&
		     FightRequest.getCurrentRound() == 0 )
		{
			return returnValue;
		}
But you are in a relay script, so it submits the request. It submits the request even while the fight is actually being completed elsewhere. And, after the fight is complete, when the responses come back, KoLmafia thinks it is a new fight.

Before I can figure out the correct solution to this issue, I need to understand better how it happens.

1) How are you automating? GUI? Script? (which one?) Even, perhaps, a Relay Script?
2) What relay script are you running for charsheet.php?
3) What relay script are you running that wants to visit the Trophy Maker?

The core of the issue is that automation aborts - and then your charsheet relay script kicks in and repeatedly fails, since you are in the middle of a fight. I don't understand why that relay script would execute - unless your automation is failing to detect a failed (unfinished) fight and asks for the charsheet.

Hence, question #1 is key: How, EXACTLY, are you automating your turns?

(And an additional observation:

Starting ASH script: BestBetweenBattle.ash
Finished ASH script: BestBetweenBattle.ash
Starting recovery script: Universal_recovery.ash
Finished recovery script: Universal_recovery.ash
Starting recovery script: Universal_recovery.ash
Finished recovery script: Universal_recovery.ash
Request 7 of 20 (The Sea: The Mer-Kin Outpost) in progress...

Why did KoLmafia call the recovery script twice? That's a question for me, not for you.)
 

Veracity

Developer
Staff member
Starting recovery script: Universal_recovery.ash
Finished recovery script: Universal_recovery.ash
Starting recovery script: Universal_recovery.ash
Finished recovery script: Universal_recovery.ash
Request 7 of 20 (The Sea: The Mer-Kin Outpost) in progress...

Why did KoLmafia call the recovery script twice? That's a question for me, not for you.)
Answer: it called it once to recover HP and then again to recover MP.
 
- You are typing things in the CLI: "restore HP". Although, I suppose that could have been via clicking the link in the charpane.
Probably the latter.

1) How are you automating? GUI? Script? (which one?) Even, perhaps, a Relay Script?

I don't believe I have a relay script that automates adventures, so that's out. I do use turn-burning scripts like BCA and thesea, but that's not the case this time IIRC. I usually use the CLI, but sometimes GUI.
I'm pretty sure I've had this happen when a turn burning script stops mid-fight (if wham can't finish, for example) and I finish the fight in relay. Not in this particular case, but it does happen too.

2) What relay script are you running for charsheet.php?
This one-
http://kolmafia.us/showthread.php?1578-charsheet-php-Group-Skills-by-Character-Class
(why would it keep sending requests to visit charsheet? shouldn't it only activate WHEN I visit charsheet?)
I've also got bale's version of CHIT for the charsheet, if it matters.

3) What relay script are you running that wants to visit the Trophy Maker?
I.. don't know? Is it possible greasemonkey is somehow getting in the way? I see I have a greasemonkey trophy-checker. I'm guessing that's not it because those request shouldn't show on mafia's debug.


How, EXACTLY, are you automating your turns?
99% it was "condition set lockkey; adv 20 mer kin outpost;" though I can't rule out GUI for certain, can't remember. I'll pay more attention to this next time.

Should I start disabling greasemonkey/relay scripts?
 

slyz

Developer
3) What relay script are you running that wants to visit the Trophy Maker?
I.. don't know? Is it possible greasemonkey is somehow getting in the way? I see I have a greasemonkey trophy-checker. I'm guessing that's not it because those request shouldn't show on mafia's debug.
When you are using Mafia, any request to KoL goes through Mafia. Even the ones that come from the browser (that includes Greasemonkey):
Code:
KoL <--> Mafia <--> Browser
I don't know the trophy-checker script, but it looks like it hits the server heavily just in case something you just did earned you a trophy that you might miss if you don't buy it RIGHT NOW.
 
Top