Bug - Fixed Open Request Sequence stack traces

AlbinoRhino

Active member
I'm not sure what information is needed to examine this.

I was getting the errors in the attached log and a gui stuck in gray mode with r10474. I have both a topmenu and charpane override and usually play with the cli running in the chat pane. The errors seemed to occur during hp/mp restoration before adventuring. Closing the relay browser and re-opening it left me with blank character and topmenu panes. Reverting to r10466 seems to have resolved the issue.

If any more information is needed, please let me know.
 

Attachments

  • DEBUG_20120213.txt
    26.8 KB · Views: 55

Veracity

Developer
Staff member
I'm splitting this into a bug report, since having it attached to a commit message is unhelpful.

What charpane and topmenu overrides do you use?
What is your recovery script?
What command alias do you have that goes to the "rest" command?
 
Last edited:

AlbinoRhino

Active member
I'm splitting this into a bug report, since having it attached to a commit message is unhelpful.

I will keep that in mind in the future.

What is your recovery script?
What charpane and topmenu overrides do you use?

Recovery is Bale's. The overrides are my own creations. Not published here. All work fine in r10466. I haven't tested enough to be sure but it seemed I was able to use the newest revision as long as I did not have the cli running in the character pane.

The initial problems I reported earlier I was mining in disguise, and I believe I had used my 5 free mining adventures just fine and the problems started on the 1st or 2nd adventure during the pre-adventure burn/restore.

On another character, with r10475, I just had the same result when I used a mad tea party relay script from the browser. It is from this forum somewhere but I don't recall the author or thread. It was a relay script that previously would load the character pane in the main pane (override included) after using it ... as described in the other thread by others with other relay scripts. I did not get a debug log this time. But it was the same gray gui with no way to resolve except exit and restart. This is from the session log.

[1190] Infernal Seal Ritual
Encounter: heat seal
Round 0: AlbinoRhino wins initiative!
Round 1: AlbinoRhino casts THRUST-SMACK!
Round 2: heat seal takes 885 damage.
Round 2: heat seal takes 1 damage.
Round 2: heat seal takes 1 damage.
Round 2: AlbinoRhino wins the fight!
After Battle: item(*1.25)+com does a couple of karate moves, then swivels his hips and gyrates his pelvis.item(*1.25)+com holds out the plastic pumpkin bucket, hoping for extra goodies.
You acquire an item: sizzling seal fat
You acquire an item: Abyssal ember
You gain 20 Strengthliness
You gain 10 Enchantedness
You gain 19 Smarm
> --------------------------------
> This is a little chunk of burning Abyssal coal that never cools off. It reminds you of that time you had to escape from Bill Murray in that post-apocalyptic underground city. Not the time when you were a gopher, though, the time when you were some little kids.
> --------------------------------
> --------------------------------
> This is a little chunk of burning Abyssal coal that never cools off. It reminds you of that time you had to escape from Bill Murray in that post-apocalyptic underground city. Not the time when you were a gopher, though, the time when you were some little kids.
> --------------------------------
> You have the latest mad-tea-party.txt. Will not check again today.

use 1 "DRINK ME" potion
You acquire an effect: Down the Rabbit Hole (duration: 20 Adventures)

equip hat filthy knitted dread sack

Visiting the Mad Tea Party
Took choice 441/1: unknown
choice.php?pwd&whichchoice=441&option=1

[1190] Infernal Seal Ritual
You acquire an effect: Dances with Tweedles (duration: 30 Adventures)

equip hat bounty-hunting helmet

I had fought a seal and everything was fine until the end of the battle. I ran the hatter command in the cli (which doesn't show in the session log.) The item description which appears is also from my own desc_item relay override, which removes the item description from the desc_item page but prints it to the cli.

Then I switched to the relay tea party script to actually get the hatter buff (mainly b/c I wanted to see if the charpane ended up in the mainpane after using it, as previously). That's when the "Took choice" etc. appeared along with the repeat of the [1190] from last seal battle and everything locked up / went gray.
 

Veracity

Developer
Staff member
None that I know of. I think Bale's recovery was attempting to use a free disco rest when the issues started.
There is an alias involved here.

Code:
java.lang.Exception: request sequence 2264
	at net.sourceforge.kolmafia.RequestThread.openRequestSequence(RequestThread.java:305)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:182)
	at net.sourceforge.kolmafia.KoLmafia.executeRequestOnce(KoLmafia.java:1364)
	at net.sourceforge.kolmafia.KoLmafia.executeRequest(KoLmafia.java:1226)
	at net.sourceforge.kolmafia.KoLmafia.makeRequest(KoLmafia.java:1100)
	at net.sourceforge.kolmafia.textui.command.CampgroundCommand.run(CampgroundCommand.java:63)
	at net.sourceforge.kolmafia.KoLmafiaCLI.doExecuteCommand(KoLmafiaCLI.java:533)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:489)
	at net.sourceforge.kolmafia.textui.command.CommandAlias.run(CommandAlias.java:52)
	at net.sourceforge.kolmafia.KoLmafiaCLI.doExecuteCommand(KoLmafiaCLI.java:533)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:489)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:395)
	at net.sourceforge.kolmafia.textui.RuntimeLibrary.cli_execute(RuntimeLibrary.java:1615)
The script was doing a cli_execute() - RuntimeLibrary.java:1615
of a command which was an alias- CommandAlias.java:52
of a "rest" command - CampgroundCommand.java:63

It puzzles me that Universal Recovery would invoke an alias, rather than a "rest" command directly.

Edit: never mind. I see that the "rest" command is built-into KoLmafia as an alias for "campground rest".

The initial problems I reported earlier I was mining in disguise, and I believe I had used my 5 free mining adventures just fine and the problems started on the 1st or 2nd adventure during the pre-adventure burn/restore.
Then I switched to the relay tea party script to actually get the hatter buff (mainly b/c I wanted to see if the charpane ended up in the mainpane after using it, as previously). That's when the "Took choice" etc. appeared along with the repeat of the [1190] from last seal battle and everything locked up / went gray.
These are the key bits of info: a description of what you actually did.
 
Last edited:

AlbinoRhino

Active member
Hmmm ... I certainly don't remember using an alias for anything. I do remember thinking of seeing something about graygui command on this forum and typing "help gray" or something similar. The help did appear and I tried the command to no effect that I could see.

Searching through Bale's script I found this:
if(contains_text(mpAutoRecoveryItems, "free disco rest")
&& (numeric_modifier("Base Resting MP") >= 10 || my_path() == "Bees Hate You"))
while(to_int(get_property("timesRested")) < disco && my_mp()<target
&& my_maxmp() - my_mp() >=rest_mp && (DiscoResting == "mp" || (my_maxhp() - my_hp())/2 >= rest_hp))
cli_execute("rest");


And here are my aliases:

abpg get autoBuyPriceLimit
abpl set autoBuyPriceLimit=
al alias
aps refresh inventory; refresh familiar; equip familiar pet sweater; familiar lock
aq acquire
bmp burn *
cl closet list
cm call mood.ash
cnw call networth.ash
cp closet put
cr condref
ct closet take
efc acquire 1 fortune cookie; eat 1 fortune cookie
eq equip
hc call hccheck.ash
hh help help
ic call icnts.ash
mr modref
mt modtrace
mtcr modtrace combat rate
mtda modtrace damage absorption
mtfw modtrace familiar weight
mti modtrace item
mtim modtrace item; modtrace meat
mtm modtrace meat
mtml modtrace monster level
mtsd modtrace spell damage
nem nemesis strips
prf ashq record r{string d ; }; r[string,string]m; file_to_map("defaults.txt",m); foreach t,p,d in m if(to_lower_case(p).contains_text(to_lower_case($string[%%]))) print(p+" ("+t+", now '"+get_property(p)+"', default "+d.d+")")
ra refresh all
recoff set recoveryScript =
recon set recoveryScript = Universal_recovery
rin refresh inv
zl zlib vars
 

Veracity

Developer
Staff member
I do remember thinking of seeing something about graygui command on this forum and typing "help gray" or something similar. The help did appear and I tried the command to no effect that I could see.
The graygui command does nothing to actually fix your stuck condition. It prints a bunch of things to the debug log to help us figure out why you were stuck so we can fix the bug and keep it from happening again. You posted the debug log. I am attempting to figure out what the problem was. :)
 

AlbinoRhino

Active member
http://forums.kingdomofloathing.com:8080/vb/showthread.php?p=4032521#post4032521

I somehow feel it is related to this issue (linked above), which has existed for some time. (I am Rhinosaur over there.) I usually try to be careful to close the cli in the browser, when I am using the cli in the actual program, but of course sometimes I forget. Everything works fine if you are adventuring from the relay browser, but if you switch to the mafia interface and start doing things there, while the cli in the browser is still open, then things get out of synch and mafia tries to cast skills etc. mid-fight. But this issue never caused the gray gui problem and was easily resolved by closing the cli in the browser.

The graygui command does nothing to actually fix your stuck condition. It prints a bunch of things to the debug log to help us figure out why you were stuck so we can fix the bug and keep it from happening again. You posted the debug log. I am attempting to figure out what the problem was.

Hey ! I .... accidentally ... did something right ! LOL I wish I was a wizard like you ! :)
 

Veracity

Developer
Staff member
http://forums.kingdomofloathing.com:8080/vb/showthread.php?p=4032521#post4032521
I somehow feel it is related to this issue (linked above), which has existed for some time. (I am Rhinosaur over there.) I usually try to be careful to close the cli in the browser, when I am using the cli in the actual program, but of course sometimes I forget. Everything works fine if you are adventuring from the relay browser, but if you switch to the mafia interface and start doing things there, while the cli in the browser is still open, then things get out of synch and mafia tries to cast skills etc. mid-fight. But this issue never caused the gray gui problem and was easily resolved by closing the cli in the browser.
What's different is that initiating relay adventuring can now force script execution.

Your set of stack traces are all the pending requests. Many of them look like they were submitted by the browser and we were just waiting for KoL to respond to the request. (The browser does submit lots of requests at once; fetching multiple images, for example.)

One of them is a nested set of requests:
- you were about to adventure in the Relay Browser, so we ran between battle checks.
- your mood wanted to extend a buff, so it issued a UseSkillRequest
- you were low on MP, so it triggered MP recovery and started Bale's script. That triggered a "rest" command
- that issued a CampgroundRequest - which never returned

In the mean time, every 4 seconds, your CLI window in the browser is sending a command to KoLmafia, asking for update CLI messages.
Additionally, if you happen to type anything into the CLI window in the browser, that will get submitted as if it were a command from the CLI.

I wonder if recovery scripts, mood management, etc., disables the GUI - and the CLI, and hence, the browser CLI, while it is executing?

I am very suspicious of this browser CLI. I'd appreciate it if you'd not run with it for a while and see if you have any more issues from adventuring in the Relay Browser with between battle scripts and recovery kicking in, as they do now.
 

AlbinoRhino

Active member
I wonder if recovery scripts, mood management, etc., disables the GUI - and the CLI, and hence, the browser CLI, while it is executing?

I am very suspicious of this browser CLI. I'd appreciate it if you'd not run with it for a while and see if you have any more issues from adventuring in the Relay Browser with between battle scripts and recovery kicking in, as they do now.

It seems to me that while playing in the browser, that the charpane refreshes multiple times as hp/mp, meat are spent/restored for moods and restoration, so the charpane override is (should be ?) firing a lot in there too, amongst these other things. I assume it is still doing so in the background when switch focus to the gui to do something. I did try earlier, for a short while to play with no cli in the browser and was unable to lock things up. But I will try for a more extended time now that I am back at the desk.
 

AlbinoRhino

Active member
OK. Here is what I did:
I updated to r10479, since I routinely grab the latest revision before I play.

With the browser CLI closed, I played 110 advs at the broodling grounds bashing seals. I alternately played in the browser and auto-adventured in the gCLI, using the same simple combat script in both places. Everything worked fine.

Then I opened the browser CLI and played 36 advs in the browser without problems.

I switched to the mafia cli, deliberately leaving the browser cli open, used milk, queued 15 fullness of food and ate it, with no problems, gaining 85 advs.

Eating seemed slower than usual but it all completed without problems.

I auto-adventured for 20 advs in the mafia cli (browser cli still open) with no problems.

I hit the "begin" button again to attempt another 20 advs auto-adventuring.

8 advs went OK. Then gray gui, and everything locked up. I the hit escape button. Mafia character panel turned pink. Hit the refresh button at the bottom of the character panel with no noticeable response. At this point, I looked in my mafia directory and no debug log existed. I used the graygui command, and the attached log was generated.

From the mafia cli window:
Request 8 of 20 (Volcano: The Broodling Grounds) in progress...

[1363] The Broodling Grounds
Encounter: mother hellseal
Strategy: C:\Users\dan\kol\mafiaAR\ccs\xx-broodlinggrounds.ccs [the broodling grounds]
Round 0: AlbinoRhino loses initiative!
You lose 348 hit points
Round 1: AlbinoRhino executes a macro!
Round 1: AlbinoRhino casts ENTANGLING NOODLES!
Round 2: StatVtune.w.Eq ImproveComSkills grabs the end of one of the noodles in his mouth and gleerfully stromples around your opponent, pulling the noodles even tighter.
Round 2: AlbinoRhino casts LUNGING THRUST-SMACK!
Round 3: mother hellseal takes 261 damage.
Round 3: StatVtune.w.Eq ImproveComSkills is surpartled by your lunge and beaffets the air with his wings. Your opponents are obscured behind a cloud of smust.
Round 3: AlbinoRhino wins the fight!
You acquire an item: hellseal sinew
You acquire an item: hellseal whisker
You acquire an item: hellseal claw
After Battle: StatVtune.w.Eq ImproveComSkills smims beamishly, while the jub-jub bird flexes its wings like a little bird bodybuilder. Birdybuilder?
You gain 560 Muscleboundness
You gain a Muscle point!
You gain 251 Magicalness
You gain 226 Chutzpah

combat = xx-broodlinggrounds
mood = z01 extends gen, item, meat
Restoring HP! Currently at 827 of 1415 HP, 234 of 908 MP, current meat: 9599572 ... Target HP = 1345.
_meatperhp => 0.10852957
Casting Cannelloni Cocoon 1 times...
You gain 588 hit points
Cannelloni Cocoon was successfully cast.
KoLmafia declares world peace.

> help gray

graygui - print out a stack trace to help figure out why the UI might be gray/stuck.
greygui - print out a stack trace to help figure out why the UI might be gray/stuck.

> graygui

Open request sequence
Open request sequence
Open request sequence
Open request sequence
0 open request sequences
 

Attachments

  • DEBUG_20120213.txt
    16.1 KB · Views: 29

holatuwol

Developer
Yeah, that stack trace didn't help as much as I'd hoped. So, graygui now says what it's stuck on rather than what request sequence it started when it got stuck. If this happens again, please try 'graygui' again and let us know what the debug log looks like?
 

AlbinoRhino

Active member
OK. This time I was farming the castle, waiting for nemesis assassins to appear. Browser cli was open but I was auto-adventuring in mafia gui. Here is the cli just prior to the grayout:

Request 9 of 60 (Beanstalk: Giant's Castle) in progress...

[760] Giant's Castle
Encounter: Possibility Giant
Strategy: C:\Users\dan\kol\mafiaMB\ccs\yy-farm-castle.ccs [giant's castle]
Round 0: MeatBall wins initiative!
Round 1: MeatBall executes a macro!
Round 1: MeatBall tries to steal an item!
You acquire an item: probability potion
Round 2: MeatBall casts DISCO DANCE OF DOOM!
Round 3: possibility giant takes 6 damage.
Round 3: possibility giant drops 5 attack power.
Round 3: possibility giant drops 5 defense.
Round 3: MeatBall casts DISCO DANCE II: ELECTRIC BOOGALOO!
Round 4: possibility giant takes 10 damage.
You acquire an effect: Disco Nirvana (duration: 1 Adventure)
Round 4: possibility giant drops 7 attack power.
Round 4: possibility giant drops 7 defense.
Round 4: MeatBall casts DISCO EYE-POKE!
Round 5: possibility giant takes 1 damage.
Round 5: possibility giant drops 3 attack power.
Round 5: possibility giant drops 3 defense.
Round 5: MeatBall casts DISCO DANCE OF DOOM!
Round 6: possibility giant takes 8 damage.
Round 6: possibility giant drops 5 attack power.
Round 6: possibility giant drops 5 defense.
Round 6: MeatBall casts DISCO DANCE II: ELECTRIC BOOGALOO!
Round 7: possibility giant takes 10 damage.
You acquire an effect: Disco Concentration (duration: 1 Adventure)
Round 7: possibility giant drops 7 attack power.
Round 7: possibility giant drops 7 defense.
Round 7: MeatBall attacks!
Round 8: possibility giant takes 50 damage.
You lose 7 hit points
Round 8: MeatBall attacks!
Round 9: possibility giant takes 56 damage.
Round 9: MeatBall attacks!
Round 10: possibility giant takes 57 damage.
Round 10: MeatBall wins the fight!
After Battle: suckmeat winks at you.
You gain 784 Meat
You acquire an item: plot hole
You gain 5 Fortitude
You gain 9 Mysteriousness
You gain 24 Cheek
You gain a Moxie point!

Casting Holiday Weight Gain 1 times...
You acquire an effect: A Few Extra Pounds (duration: 10 Adventures)
Holiday Weight Gain was successfully cast.
Casting Leash of Linguini 1 times...
You acquire an effect: Leash of Linguini (duration: 10 Adventures)
Leash of Linguini was successfully cast.
Casting Rage of the Reindeer 1 times...
You acquire an effect: Rage of the Reindeer (duration: 10 Adventures)
Rage of the Reindeer was successfully cast.
Casting Carlweather's Cantata of Confrontation 1 times...
You acquire an effect: Carlweather's Cantata of Confrontation (duration: 15 Adventures)
Carlweather's Cantata of Confrontation was successfully cast.
combat = yy-farm-castle
mood = z05 extends gen, item, meat, misc, +com
Restoring MP! Currently at 250 of 269 HP, 18 of 346 MP, current meat: 97545 ... Target MP = 70.
Casting Tenacity of the Snapper 1 times...
You acquire an effect: Tenacity of the Snapper (duration: 15 Adventures)
Tenacity of the Snapper was successfully cast.

> help gray

graygui - print out a stack trace to help figure out why the UI might be gray/stuck.
greygui - print out a stack trace to help figure out why the UI might be gray/stuck.
jstack - print out a stack trace to help figure out why the UI might be gray/stuck.

> graygui

5 open request sequences detected.
Unable to determine KoLmafia process id.

> jstack

5 open request sequences detected.
Unable to determine KoLmafia process id.

> graygui force

5 request sequences will be ignored.
Unable to determine KoLmafia process id.

The "force" did return me to a green state. The debug log is attached, but it doesn't appear very helpful.

EDIT: After posting this, I tried to run a script and nothing happened. I hit the "refresh" button at the bottom of the character panel and mafia returned to graystate. I tried to run "graygui" again and got the queue information. This cli info follows directly from the info above:

graygui force

5 request sequences will be ignored.
Unable to determine KoLmafia process id.

> call scripts\mood.ash

Retrieving character data...

> CURRENT: call scripts\mood.ash
> QUEUED 1: graygui
 

Attachments

  • DEBUG_20120215.txt
    1.9 KB · Views: 27
Last edited:

AlbinoRhino

Active member
This time I switched from the browser to the gui (leaving the cli open in the browser) and tried to run Bale's OCD script.
> call scripts\OCD Inventory Control.ash

Checking for updates (running Bale's OCD Inventory Control ver. 3.7.1)...
Running Bale's OCD Inventory Control version: 3.7.1 (current)
use 1 fat wallet

Using 1 fat wallet...
You gain 405 Meat
Finished using 1 fat wallet.
pulverize 1 big red clown nose, 1 bloody clown pants, 5 disturbing fanfic, 8 giant needle, 1 solid gold pegleg, 1 witty rapier, 1 wolf mask

Pulling items from stash...
You acquire an item: tenderizing hammer
Pulverizing big red clown nose...
You acquire twinkly powder (2)
big red clown nose smashed.

> CURRENT: call scripts\OCD Inventory Control.ash
> QUEUED 1: help gray

> CURRENT: call scripts\OCD Inventory Control.ash
> QUEUED 1: help gray
> QUEUED 2: graygui

I couldn't get any debug log since it only queued the command.
 

AlbinoRhino

Active member
> help gray

graygui - print out a stack trace to help figure out why the UI might be gray/stuck (requires use of the JDK instead of the JRE).
greygui - print out a stack trace to help figure out why the UI might be gray/stuck (requires use of the JDK instead of the JRE).
jstack - print out a stack trace to help figure out why the UI might be gray/stuck (requires use of the JDK instead of the JRE).
4 open request sequences detected.
To use this feature, you must run KoLmafia with a JDK instead of a JRE.
4 open request sequences detected.
To use this feature, you must run KoLmafia with a JDK instead of a JRE.

Unfortunately, I'm not sure what a JDK or JRE are. This time I was playing in the browser with the cli open. I have a script which runs as part of my mood. The graygui occurred while that script was running. I have bolded the output which came from my script.

[5] Outskirts of The Knob
Encounter: sleeping Knob Goblin Guard
Round 0: MeatBall wins initiative!
Round 1: MeatBall executes a macro!
Round 1: MeatBall casts ENTANGLING NOODLES!
Round 2: Karen bleeps, "MEDICAL SYSTEMS ACTIVATED," and fires a dart into your neck. You suddenly feel much better.
You gain 45 hit points
You gain 45 Muscularity Points
Round 2: MeatBall casts SPRING RAINDROP ATTACK!
You gain 15 hit points
You gain 16 Muscularity Points
Round 3: Karen does a pelvic thrust at your opponent. A piece of toast ricochets off his head, momentarily stunning him (and/or driving him insa-a-a-a-ane.)
You acquire an item: toast
Round 3: MeatBall uses the seal tooth!
Round 4: sleeping knob goblin guard takes 1 damage.
Round 4: Karen shouts "Yarrrr!" and battens your opponent's hatches for him. Violently. For 42 damage.
Round 4: sleeping knob goblin guard takes 42 damage.
Round 4: MeatBall wins the fight!
You gain 7 Meat
You acquire an item: Knob Goblin scimitar
You gain 6 Fortitude
You gain 2 Enchantedness
You gain 4 Smarm
You gain a Moxie point!
Casting Fat Leon's Phat Loot Lyric 1 times...
You acquire an effect: Fat Leon's Phat Loot Lyric (duration: 15 Adventures)
Fat Leon's Phat Loot Lyric was successfully cast.
Closeted Knob Goblin firecracker
Placing items into closet...
Stashing stuffed Baron von Ratsworth
Dropping items into stash...


> help gray
 

roippi

Developer
Unless you're going to be editing the source code, you don't need netbeans or any other IDE (ie eclipse).
 

AlbinoRhino

Active member
OK. This time I switched to the GUI to drink, left the cli open in the browser. I uneffected polka and pressed a custom button to "cast ode" (one of the buttons you can set up yourself in preferences, not the one on the booze manager pane). Mafia bought some MP from Galaktik and then froze. I typed "graygui". This time the debug log actually has stuff in it.

Shrugging off your buff...
Polka of Plenty removed.
Purchasing anti-anti-antidote (3 @ 28)...
You acquire anti-anti-antidote (3)
You spent 84 Meat
Purchases complete.
Restoring MP! Currently at 150 of 151 HP, 9 of 112 MP, current meat: 5583 ... Target MP = 49.
Visiting Doc Galaktik...

Restore 40 MP at Doc Galaktik's
You gain 40 Muscularity Points
You spent 680 Meat
Cure purchased.
5 open request sequences detected.
Generating thread dump for KoLmafia process id 4940...
 

Attachments

  • DEBUG_20120215.txt
    32.1 KB · Views: 35
Top