Mafia freezes and becomes unplayable, don't know if it is with Mafia or my system

Nothing appears to be saturated in the task manager (CPU <10%, Memory < 50%, Disk ~0%, Network ~0%, GPU ~0%). I too initially wondered if it was an issue with my system (desktop), hence I tried running Mafia on my laptop (which worked fine before I encountered this issue), but the same lag/freezing also surfaced there.

...

The UI is responsive. While logged in, it is possible to type in the gCLI, which allows for the queuing of additional scripts (although none of the scripts actually run). It is also possible to open the relay browser to carry out actions (which are reflected and recorded on the gCLI) while the scripts freeze.

Hm. If it occurs across systems, I'm leaning more toward to a network issue, although it's strange that Mafia hangs waiting for requests -- I'd expect them to time out after ~30s (and throw an IOException). Any weird firewall in play? Does this persist if you take your laptop to e.g. starbucks public wifi?

UI responsiveness rules out (I think) memory pressure for the JVM, although as frono suggests, a threading issue is still possible.
 
My current thinking is that this thread and http://kolmafia.us/showthread.php?22221-KoLmafia-showing-erratic-behaviour have similar causes.

That hypothesis leads me to suggest it does not have anything to do with a particular computer, which OS is used, or network lag, or a lack of system resources.

We fear that which we do not understand. I know enough about threads to manage them sometimes and program defensively in some cases but I don't know as much as I should, so I will point a finger at threads. I will furthermore suggest an inventory management function might be involved.

Since I can't reproduce it on my system, all I can bring to bear is manual code inspection and static analysis but I am slowly doing that. The evil and lazy part of me wishes it would happen to Veracity but the more noble part just asks "What Would Veracity Do?" and is very glad she has a job she enjoys.

I will also note that there have been concerns about threading at least as far back as 2012 which is when hola suspected an issue and told people about jstack in hopes of gathering data.
 
Hm. If it occurs across systems, I'm leaning more toward to a network issue, although it's strange that Mafia hangs waiting for requests -- I'd expect them to time out after ~30s (and throw an IOException). Any weird firewall in play? Does this persist if you take your laptop to e.g. starbucks public wifi?

UI responsiveness rules out (I think) memory pressure for the JVM, although as frono suggests, a threading issue is still possible.

I am also considering the possibility of a network issue, and I do intend to test it out on a public Wi-Fi. However, I've been running some (unrelated) simulations on my laptop for the past few days (and will carry on running the simulations for the next few days at full capacity), so I can only report back in a week or so.

Edit: I also suspect no weird firewall is in play. I have created exceptions for www.kingdomofloathing.com and turned off my anti-virus in my debugging of the issue (also to note - I have no issues on Vanilla KOL so it doesn't seem like my network has any issues retrieving data directly from the KOL servers).
 
Last edited:
By "weird firewall", I'm suggesting something might be throttling the rate of requests you might make to a given domain -- with a script, Mafia has the potential to make many more requests than you're likely to trigger by just playing in the vanilla browser. Generally difficult to test, although opening e.g. holderofsecrets's display case might do the trick (fetching and rendering lots of images, in particular).
 
... I can only report back in a week or so.

Reporting back - I just downloaded the latest build (r18478) onto my laptop and tested it on a public WiFi, and it still experiences freezes (in this particular case, my KoLMafia froze on while I was running "svn update" after updating a single svn project (there were 6 projects that required updating)).
 
Wish we had some better ideas.

Do you have any other jar file based applications on the system and do they run as expected? In other words could it be a Java issue? Did you get java from Oracle or OpenJDK or some other source? Grasping at straws here.
 
Do you have any other jar file based applications on the system and do they run as expected? In other words could it be a Java issue? Did you get java from Oracle or OpenJDK or some other source? Grasping at straws here.

I don't have any other .jar based applications that I know of. While trying to debug it myself before this thread was started by OP, I re-downloaded Java (from Oracle) just to be sure that it wasn't an issue with the version of Java I had (I also went through the Java control panel to delete all Trace and Log Files, Cached Applications and Applets, as well as Installed Applications and Applets before uninstalling and reinstalling [from Oracle] on my desktop).

I guess it's alright if there isn't a clear cut/simple solution to be found. I understand that KoLMafia is just a QoL thing to have, and given that this appears to be some sort of edge case that seems to affect just a tiny fraction of KoLMafia users while requiring a disproportionate amount of effort to resolve, I don't really expect much of a resolution and I really don't wish to trouble you guys any further (I would suppose your efforts would be better spent elsewhere - on other issues or your own IRL commitments). I truly appreciate all the help given thus far!

Hopefully, for the small fraction of us facing this issue, it would come and go just like it had with OP's.
 
Back
Top