Bug - Fixed GUI stuck in gray mode

jwylot

Member
I have 4 characters who just run under script control each day. No relay browser and no chat panes open and they haven't encountered this. Could it be tied to the relay browser somehow? Wasn't there a change recently to mafia where it now pulls certain information from the charpane? Is that when it started going wrong?
 

roippi

Developer
Mafia still parses the charpane while autoadventuring.

I have to say, I'm not sure if I've ever encountered this when I don't open the chat interface. It could be related.
 

oztrich

Member
But do you have any of the chats loaded? I have Mafia-chat loading when I log in and do get this.

As mentioned in my previous post (although not very clearly) I have tried logging out and starting a new instance without chat loaded after hitting the gray-out (I usually chat via the relay browser). This didn't help things, I still got the gray-out after about half an hour with no chat running.
 

Theraze

Active member
I don't load chat in any way. No clicking on the button for chat in the relay browser (leave it alone or use gCLI there instead), no clicking on the button for chat in the gCLI (done that 2-5 times ever, on accident). I think I might have run it a few times back when I was testing chat commands, but... that's it.
 

matt.chugg

Moderator
Does anyone get a debug log spat out when this happens? I get it when trying to allow a clover request in the relay browser (ie gallery for muscle) in ronin, it allows the first one, then when I try and adventure again with a clover, the relay browser freezes and checking out the gui shows all adventure buttons grayed out, looking in the directory shows a debug log indicating a null pointer exception at net.sourceforge.kolmafia.request.RelayRequest.pseudoResponse(RelayRequest.java:443)

This seems a little different to everone elses issue but also slightly related. debug log attached.
 

Attachments

  • DEBUG_20110808.txt
    12.6 KB · Views: 41

matt.chugg

Moderator
I've just realised that all this started for me when I eneabled a masterrelay script, (in response to a thread). I disabled it and everything is as smooth and shiny as it was before.

/me is a dumbass, I should have realised when some people mentioned charpane overrides.
 

Theraze

Active member
Unfortunately won't fix it for me... not using charpane relays, not using master relay override. :( Only 'char' relay for me is the charsheet custom dailies.
 

matt.chugg

Moderator
@Theraze I consider you an advanced user so please don't consider the below suggestions as patronising, just trying to rule a few things out.

Seems to be hard to track down, any objections to sending me your pref files so I can diff them with mine? long shot I know, but might help?

Also: what is your Java version and OS version.

Are you running kolmafia from a priveliged location (root of system drive, windows, system(32) folder, program files?

Have you tried: copy your .jar to a new directory and let it create all new folders and settings, add your settings, scripts and ccs back in as you need them. I know this is a pain in the ass but it may track down the problem. if a 'clean' install of kolmafia has the problem then I think we have to consider it as a java or system problem..
 

Theraze

Active member
Java version is 1.6.26, OS is 64-bit Win7. Running mafia from Program Files, as Administrator with UAC off.

Prefer not to scrap session logs and the like. Since it's not a consistent problem, running without scripts, settings, etc, just means that I don't get to enjoy mafia near as much as I'm normally do. :) As it's not consistent, failure to have it grey doesn't mean that it's fine. The 'best' result is knowing that it's still broken.

If we can figure out a way to break it consistently, then we can try to see if we can un-break it. But random lockups? Not especially traceable. :(
 

O_3_141592

New member
I think I found something:

The problem seems to be related to the zlib-function "load_current_map". This function will try to update the requested map from "http://zachbardon.com/mafiatools/autoupdate.php" (once a day). However currently (i.e. for at least the last two hours) that site is not reachable from here (just checked with firefox).

The problem now is that the site not being reachable does not result in an immediate error but in a timeout after several minutes and while Mafia waits for the timeout many requests get added to the command queue instead of being processed immediately.

Observation: A script waiting on the http request is not terminated by pressing ESC.
Assumption: Logging out and back in (without quitting mafia) leaves an inconsistent internal state making the problem stay until mafia is closed.

Assumption2: Waiting a few minutes without logging out could fix the problem.
Edit: I let mafia sit in the backgroud while typing this post and indeed found that it had completed my requests in the meantime.
 
The problem described by O_3_141592 is real and does cause noticeable delays (that could be described as "GUI stuck in gray mode"). I found it to be happening today at every "first adventure", presumably due to something calling this function. During this, the output of "netstat" included a connection in state SYN_SENT to 98.175.61.16:80. 98.175.61.16 is the IP address pointed to by zachbardon.com.

The problem described by O_3_141592 is, however, presumably a different one than the problem discussed in this thread.
 

fronobulax

Developer
Staff member
The problem is most certainly not with zlib.

I do believe that O_3 is describing a problem that is real and worthy of being addressed. I agree that it is probably not a zLib problem but the underlying fix may very well be to change an ash function that zLib uses. I am not sure either way whether this has any bearing on the gray mode problem. My personal belief is that we are seeing several different behaviors with a common cause but that remains to be seen.
 

Winterbay

Active member
Th same problem can be seen with bccs ascend script when it fails to connect in order to update the data files used there, different server, same problem.
 

roippi

Developer
I do believe that O_3 is describing a problem that is real and worthy of being addressed. I agree that it is probably not a zLib problem but the underlying fix may very well be to change an ash function that zLib uses. I am not sure either way whether this has any bearing on the gray mode problem. My personal belief is that we are seeing several different behaviors with a common cause but that remains to be seen.

Indeed, my worry is that the scope of this bug report is broadening to include any and all situations where mafia is left in a pending state (i.e. it is "grayed out"). While I do not doubt that there is more than one way to end up there, it is not useful to creep the scope of this particular report.

I think the scope of this report should be: a normal mafia action - such as creating an item - leaves mafia in a pending (gray) state upon completion, rather than returning it to a "green" or "red" state.

If there are problems with ash functions that result in perma-gray, that is external to the problem here and should be in its own bug report.
 

fronobulax

Developer
Staff member
Indeed, my worry is that the scope of this bug report is broadening to include any and all situations where mafia is left in a pending state (i.e. it is "grayed out").

Under the circumstances I think trying to limit the scope of bug reports on a lightly moderated board will ultimately prove to be futile.

That said, KoLmafia was stuck in gray mode for about five minutes for me this morning. I believe the cause was my Login script using load_current_map and waiting for a timeout. If I had not waited patiently and filed a bug report after four minutes, I'm not sure I would have realized that what I observed was probably not what this thread started out to be discussing.
 

Isvarka

Member
I had this happen last night for the first time. When I noticed it was when it was between battles running moods. I could hit escape and Mafia would declare world peace, but as soon as I did anything else it would go gray again. I do most things from the relay browser, and that wasn't affected, but I had to manually cast buffs since it wouldn't respond to moods or the rebuff arrows. I did get a debug log from it though, so I hope it might help track this down.

I don't use a master relay override and I don't use a charpane override.
 

Attachments

  • DEBUG_20110812.txt
    3.6 KB · Views: 33
I am facing this issue still, and would like to know what I can do to help. I can try the 'clean install' if need be, but I do hate to lose any progress. I can try it on my next ascension in a couple of days, since I won't be losing any of the tracking for that run. I am not sure what this autoupdate thing is, but I can be fairly sure that it does not apply to me. Is there any logging I can enable to help? I have it all off so I don't get a pile of little text files, but I want to help to resolve this. It doesn't help that it is summer and people are gone away, either.
 

fronobulax

Developer
Staff member
My attempt to get some technical discussion going about this has generated nothing but crickets. I have a strong suspicion about at least one bit of code and a patch that addresses that. The patch works for me, but of course I can not make this happen reliably to begin with. I have attached the patch in case any of the builders want to try. If it works with no undesirable side effects or there are people who want to try it but don't build, I will commit it knowing it may be reverted.
 

Attachments

  • NoSynch.patch
    862 bytes · Views: 32
Top