Bug Intermittent issue with Relay Adventuring

Darzil

Developer
I'm getting (fairly frequently, was much worse when on a poor connection at a friends yesterday) an issue where Mafia (currently 9338) can still adventure using the graphical interface, but cannot in the relay browser. I noticed today that it also appears that when adventuring using the graphical interface, it isn't triggering mood updates (no self buffs cast) or recovery (I'm getting beaten up without heals).

Logging out and logging in again doesn't fix this situation.

Restarting Mafia does fix it.

Nothing is logged in the Graphical CLI for any of the things that don't happen.

Is there some debugging I can switch on to gather more information?
 

slyz

Developer
Mafia is probably hanging because it is waiting for a response to a request, or waiting for something, at least. What where you doing before it entered this state? Do you have gCLI output?
 

fronobulax

Developer
Staff member
I'm not sure that there is anything mafia could or would do differently if your connection is so flakey that mafia is not getting responses.
 

Darzil

Developer
Well, today comms were solid as a rock, as far as I could see.

Today when this happened I was adventuring using the last adventure link, killing hellseals. After 40 or so adventures like this, I could no longer adventure using the relay browser, but could using the graphical interface (but then got beaten up by hellseals due to healing not kicking in).

It's a very odd one, I suspect an edge case based on comms or lag issues. I don't get it much normally, but then I use a cable connection that rarely has lag or packetloss.

In this case mafia must have been getting responses, as it adventured via the graphical interface, albeit without running Moods or Recovery.
 

slyz

Developer
Oh, I had understood this backwards. I thought the GUI was held up, and you could adventure in the Relay Browser.

Have you tried opening another Relay Browser window?

I generally don't let my browser occupy all the space on my screen, so I can at least see the left part of the Mafia GUI. When it's green, it means I'm good to go and can click on the "adventure again" link.
 

Darzil

Developer
Yes, had tried opening another browser window, and logging off, logging on and opening another browser window. Only restarting Mafia completely sorted it.

It's why I was hoping to be able to switch on some kind of debugging if there was any that might help, as otherwise I can't really provide enough information to pinpoint my issue.
 

Winterbay

Active member
I've been having this issue today as well (infact I have it right now). I cna click around just fine in the relay browser until I try to go to an adventure.php-location when it hangs just doing nothing. A debuglog of me pressing The Black Forest (and nothing happening) shows:
Code:
-----From Browser-----
GET /adventure.php?snarfblat=111 HTTP/1.1
Host: 127.0.0.1:60080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17 ( .NET CLR 3.5.30729; .NET4.0E)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: sv-se,sv;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://127.0.0.1:60080/woods.php
Cookie: frcm_style=3
----------
 

fronobulax

Developer
Staff member
Sounds like it is not lag. Since it is repeated adventuring in the same place, using the Relay Browser could the RB be consuming a system resource that becomes scarce?
 

xKiv

Active member
Another guess: mafia somehow got into a state that prevents (blocks) running scripts that normally run between adventures (like recovery or between-battle script) and each request to adv.php is now waiting for the last request to "finish".

BTW, are there any exceptions printed to console (Terminal)?
 

Darzil

Developer
Not sure if it's useful or not, but I've been going through my session log, trying to find anything that might have been related to this.

What I've found is that todays instance, and some of yesterdays, coincide with my casting Cannelloni Cocoon by clicking on the underlined link under my current HP in the relay browser at a time when the Mood is casting another spell. Having spotted this, I also realise that as well as starring a dodgy network connection, I was also facing Bee Core Battlefield, and clicking on that link every 2-3 adventures to heal. Perhaps this explains the 2-3 times this happened during the Battlefield.

Relevant exerpt from session log:

Code:
cast 1 Leash of Linguini

cast 1 Cannelloni Cocoon
You acquire an effect: Leash of Linguini (duration: 10 Adventures)
You gain 833 hit points

Where the log instead shows casting Cannelloni Cocoon after the affects are received from the Mood casting the failure does not occur.
 

Darzil

Developer
Well, not sure what happened to that post, wrote a post detailing my findings, including some Graphical CLI output, and now it's not here. Must have somehow not hit submit.

I can indeed make this happen (not 100% yet) by hitting the underlined link on current HP in the relay browser, triggering a cast of Cannelloni Cocoon, whilst the Mood is casting buffs.

Sadly I don't have the CLI output at my current location, but the gist was :

Fight text
casting Rage of the Reindeer
gain effect Rage of the Reindeer
completed casting Rage of the Reindeer
casting Empathy

> recover hp

casting Cannelloni Cocoon
gain effect Empathy
completed casting Empathy
heal X hp
completed casting Cannelloni Cocoon

After this I could no longer adventure in the relay browser, and Moods and Recovery didn't trigger.

Then I went to work, and bizarrely didn't post the post with actual GCli in it. The main thing it showed, though, was the "> recover hp" and casting of Cannelloni Cocoon shown between casting a buff via Moods and it being applied.
 

Darzil

Developer
Do you mean this one? If so, it's showing for me...

No, that's from the session log. I replicated this morning and copy and pasted the GCLI output, which shows a little more (though no errors as such), but seem to have failed to post it.

Will have to replicate in a few hours when I'm back home.
 

xKiv

Active member
Do you also have Bale's UniversalRecovery script set? If so, was it also trying to heal you?
(that's what coincided with that for me ... I just learned to switch to kolmafia gui and restore by clicking the restore button there, after making sure nothing runs in the CLI)
 
Last edited:

Darzil

Developer
No, just using vanilla Kolmafia recovery.

Been trying to replicate it this evening and getting nowhere. This morning was one test, replicated the problem instantly. This evening I've done dozens of cannelloni cocoons, whilst moods were running, had the same GCLI logs, but not broken Mafia at all.

Did go from 9340 to 9344.
 

lostcalpolydude

Developer
Staff member
I know someone else reported this issue a while back. Nothing was done to fix it back then, so now that you know the cause it might just be a "don't do that" kind of issue.
 

NardoLoopa

Member
I've also had the problem where the gCLI log reports combat finished, but the proxy browser is still waiting on the page-load. I'm also using Bale's recovery script. I'll try to turn it off and see if I still get the problem.

It only seems to happen in combat for me. Most often on the last, or first round. Seldomly in the middle of combat. Usually hitting [stop] in FF4 or opening another relay browser tab fixes it. Sometimes it does not.
 

lostcalpolydude

Developer
Staff member
I don't know if that's related at all since you can still adventure in the relay browser after that. I see that regularly and all of mafia's autorecovery options are off for me.
 

Darzil

Developer
I'm declaring this fixed for me in 9342. I can repeat the issue pretty reliably in 9341, but not at all in 9342 and above. I guess maybe it relates to the Pending State change.
 
Top