Bug - Cannot Reproduce Main UI freeze during ill-timed focus loss

Salculd

New member
This bug involves running two (separately installed) simultaneous instances of Mafia 8647. Based on the nature of this freeze, though, the nature or identity of the second program might not matter; I couldn't think of a way to easily test it offhand.

I typically play my "normal" turns at the same time as I have a separate instance of Mafia iterate through some of my multis to do their various summoning skills and such. Today was no exception, and I've been doing this for years now with no ill effects on my primary instance of the program.

Today, however, as I was about to click "begin" in my main instance, the passive multi-iterating instance happened to switch characters, which causes the login screen to briefly steal focus. In a sheer coincidence, the focus loss occurred after I had started to click the button but before I had released it.

Upon minimizing the other instance, I found that the UI was completely unresponsive, but only visually. The only thing I could do was move it around and resize it (which it would not redraw to compensate afterwards). Unlike a typical "hard" freeze or hang, where the mouse pointer would turn into an hourglass and it'd take forever to minimize and that sort of stuff, the UI appeared to be normal, just completely noninteractive.

On the other hand, the relay browser continued to work perfectly fine. I was able to adventure and Mafia would continue to perform its automatic duties like MP restoration and combat scripting. The gCLI was also completely unaffected. Trying "exit", though, had no effect, and subsequent CLI commands were simply appended to the end of the queue, which never advanced as it never actually exited. (Normal adventuring and automation did continue to work.)

I was ultimately forced to take the process out behind the barn and shoot it. I was also subsequently able to easily reproduce the freeze with a custom script that'd wait ten seconds on the other character and then log in while I held down the button in the main instance. Like I said above, I'm not sure if this is a Mafia issue specifically or just an issue in any instance regarding focus loss while that button is held down. I didn't think to check with other buttons.

(I had every intention of posting a debug log here showing me reproducing it, but all the debug logging (both via the cli and the preferences) gave me different, bizarre problems, like hanging and then hard crashing (with a java dump log, even) after five minutes. That's a story for a different report, though... in any case, though, I'm hoping this is reproduceable by others.)
 
Last edited:

fronobulax

Developer
Staff member
Any chance it might be related to this problem? (Read the whole thread, please). Are the instances logging in to the same or different servers? What language is the script that can reproduce the problem written in?
 

Salculd

New member
I didn't note the servers at the time it happened, but I just did it again twice with the main instance on 2 and 3 with the interrupting one logging in to 7 (forced) and 6 (unforced), respectively. It might be worth noting that the UI freezing in the primary instance had taken effect immediately upon the secondary instance bringing the login window into focus before it had even advanced beyond the first "sending login" message.

The initial occurrence was during a mixed ASH/basic script. I used a basic script to recreate it and the step during which it occurred initially was one of the non-ASH sections. I've run into the hash mismatch thing before and I suppose I could see them having similar root causes, though it manifested differently (and somewhat more destructively) in this case. I tried recreating this with various combinations of either instance having opened chat or not and it didn't appear to have an effect.

Additionally, I just attempted to recreate this using something other than Mafia to steal focus (namely, an incoming message window in trillian) and it did not appear to happen. I'll continue messing with this as time goes on to see if I can pinpoint any other conditions regarding it.
 
Top