Bug - Waiting for Info Relay browser - can't adventure after beaten up

sfwarlock

New member
This has been going on for a long time now and I finally tracked down a correlation. Occasionally, the relay browser will refuse to let me adventure. I can go to messages, chat, wander round the map, everything, but if I click somewhere with a (1) after the title, it will just sit on (Loading...) forever. If I pop up the minibrowser, it works fine, so I know it's relay browser specific. I've tried turning off greasemonkey, various things within firefox, nothing.

Here's the correlation: it only happens after I've been Beaten Up. If that doesn't happen, things work fine all day, but as soon as I lose a fight, I autorecover HP, then the relay browser chokes.
 

slyz

Developer
I'm afraid you'll need to be a little more specific. Since you say this has been going on "for far too long", I guess you weren't using r8646 in which a little problem with buffing was introduced as the result of a fix.

- When you start a fight, FireFox says it's loading, but you don't tell us what is happening in the gCLI: is there any useful ouput there?

- It only happens after you have been Beaten Up - does that mean that you try to adventure with turns of the Beaten Up effect? Or does it happen even if you removed it before adventuring?

You might want to check your HP/MP Usage settings in the Adventure panel and see if you have "Auto-remove malignant status effects" checked in Preferences -> General. Maybe Mafia is trying to remove Beaten Up because of one of those settings, but aborts because it can't (I just checked your profile and that would be surprising since you have Tongue).

If the above doesn't help, and if it really has something to do with FF, I'm at a loss.

EDIT: If there isn't anything useful in the gCLI, a debug log would be helpful. Recreate the conditions where this happens, select Help -> Start Debug Log, try to adventure, then select Help -> Stop Debug Log, and attach the resulting DEBUG_2010XXXX.txt file in your kolmafia folder to your next post.
 
Last edited:

LizardKing

New member
I just ran into the same thing, and this was the only thread I could see mentioning the problem.

As far as I can tell, I didn't die at any point before then. I used a proxy to make sure it's not Firefox being stupid, but the request itself is definitely being sent in exactly the same manner as other requests. Nothing shows in the CLI when loading, and starting a debug log before clicking it generates nothing but the standard log header and the time. The last thing I can see happening in the log before it does it is this:
[1106] The Slime Tube
[...]
You gain 28 Muscleboundness
You gain 18 Enchantedness
You gain 50 Sarcasm
> Using chamois.

clan_slimetube.php?action=chamois&pwd
> There are 198 chamoix left in the bucket.

cast 1 Cannelloni Cocoon

cast 1 Cannelloni Cocoon
You gain 80 hit points

Note the cocoon twice; I clicked on my HP, and it was also cast automatically by the slime script. Thinking this may be an issue, I tried again after restarting Mafia.

I adventured in the slime tube until the script would be forced to heal me, and at the same time click on my HP in the character pane to try and heal myself.

[1120] The Slime Tube
[...]
You gain 7 Strengthliness
You gain 9 Magicalness
You gain 25 Roguishness
> Using chamois.

clan_slimetube.php?action=chamois&pwd
> There are 201 chamoix left in the bucket.

cast 1 Cannelloni Cocoon

cast 1 Cannelloni Cocoon

Two casts of Cocoon. Again, I am now unable to adventure by clicking on a link. I would hazard a guess that Mafia is waiting for the second (seemingly non-existent) cocoon to complete before it processes any adventure requests.
 
Last edited:

Theraze

Active member
Actually, there's another several threads mentioning that if you manually run a script in the relay browser (for example, restore HP by clicking on it) while a script is already running (for example, restoring health using an optimization script), it will lock up your KoLmafia.

The current fix? Don't do it. Display the gCLI if you have to, or realize that if the health is red, it's going to already run your healing script without you clicking on it. :)
 

Theraze

Active member
Yes... it's still an issue, despite being noted elsewhere... the (eventual) fix will likely be to lock the adventure tab as well as the relay browser when script/gCLI actions are queued. But until someone comes up with a good way to do it, avoidance is the best policy. :)
 

Rinn

Developer
You can disable a link by adding the following into the a href tag onclick="return false" (you could also set the onclick to a javascript function that returns false). I'm not sure if there's a good way to dynamically update the links though.
 

Theraze

Active member
It's more a matter of making the local relay server delay in processing until after the gCLI script is done... no clue on how to make that happen though.
 

Winterbay

Active member
When I run two things at once in the CLI they sometimes gets added to the queue and sometimes not (sometimes with strange behaviour as a result). Seeing as it is not even, to me at least, behaving in a logical way there I find it no surprise that the relay browser makes strange things :)

That said: Would it be possible to add Relay-browser actions to the queue as well instead of locking it up? That might be easier from a code point (no changing of links in the browser and so on) but I've no idea how the internal code works so it might be too hard to do...
 

Theraze

Active member
Should be possible... once I get done with combat delevelling, maybe that'll be my next goal. If it's me working on this, probably start with the adventure tab which should be easier to do, since all you end up doing there is basically the gCLI adventure command... just a matter of making sure it gets into the queue. While the relay browser doesn't necessarily correspond so easily... That's the issue. To be in the queue, there has to be a command that's connected to it... something has to be saved to the queue to be done in turn.
 
I would actually -not- like to see the relay browser hold while the gCLI executes, as sometimes I like to let a script run in the gCLI while I do some manual adventuring.

If I had to wait for everything to finish before I could manually adventure I would be very bored.
 

Theraze

Active member
With the exception of relay pages that completely avoid hitting the server, such as checking adventure advisor or zlib preferences, what can you actually safely use with the relay browser while a script is running?

Can't eat... combat will break that. Can't adventure... your relay sessions will break that. Can't craft... combat will break that. Can't mushroom farm... combat will break that too. Can't heal... combat will make that not work properly.

So... what're you doing with scripts while manually adventuring?
 
Last edited:
Sometimes a script will be doing something that isn't actually adventuring, like... anytime it has a wait() state. During this time ALL other mafia functions are locked up, so I'll use the relay browser to eat/drink/equip/adventure. If the script itself is adventuring, then I don't really need to be doing anything else anyway. Probably not the easiest to code, but inter-queueing would be nice... Like, if a script is adventuring 5 times and while that's going on I make an equipment change which would take place between the adventures. I don't actually know how mafia handles scripts so that might be easy to program or retard-hard. But yeah, relay freedom during automation might not be perfect but I like what I am allowed to do.
 

Theraze

Active member
Anything you do in a relay browser destroys your scripts... if you change outfits in the relay while a script has checkpoints going on, it won't restore the outfit it's supposed to... that's the reason (relay breaking scripts) why the thread regarding optimizing outfit changes got killed.
 
I'm not sure I quite understand. I do plenty in my relay browser and the script continues to plug along just fine. It's not what the scripts doing that locks up mafia... it's -that- the script is doing that locks it up. So a script running for any reason, even if it doesn't communicate with KoL, will stop me from doing anything else with mafia... relay browser is my back door to continue doing things while that's true.
 
Top