Native Windows (x86) KoLmafia.exe

Borzon

New member
I keep getting an unable to load C:\...jetrt\XKRN76037.dll error when I try to use a newer KoLmafia.exe. I have tried each new nightly for the past couple days and they each do the same thing. I tried downloading a whole new set of rt files as well and I still get the error. Any idea of what could be going on?

I am on windows 8 if that helps.
 

Catch-22

Active member
I have tried each new nightly for the past couple days and they each do the same thing. I tried downloading a whole new set of rt files as well and I still get the error. Any idea of what could be going on?

That's usually an error that appears if you have out of date rt files, but you said you've tried to update the rt files, so I'm not sure. My suggestion is that you delete the rt folder completely and unzip it from the latest rt.7z. Also make sure your path is correct to where KoLmafia.exe is, so the jetrt folder should be in "./rt/jetrt" from where KoLmafia.exe is.
 

AlbinoRhino

Active member
So, a couple of days ago, I decided to give this a try. I have to say I am very pleased with how well it performs ! I am curious though as to how often this gets updated. The sourceforge page says "Nightly" but I notice it hasn't updated since 2/28. Does this version lag way behind the most current .jar revision ?
 

Catch-22

Active member
Does this version lag way behind the most current .jar revision ?

It's usually within 1-2 revisions of the JAR build and can occasionally be ahead (for an hour or so). I've been away and having internet troubles, so I think I missed a couple days. It's up to date now.
 

AlbinoRhino

Active member
It's usually within 1-2 revisions of the JAR build and can occasionally be ahead (for an hour or so). I've been away and having internet troubles, so I think I missed a couple days. It's up to date now.

That's great to hear ! (Not the part about having troubles.) Do you have to manually update it ? It's not an automated process ?
 

Catch-22

Active member
I just need to click a button. I tried scheduling it but it didn't work (been meaning to look into it). Also it doesn't warn me if the upload fails, but yeah..

For the most part it works but I should probably get to something more automated, like maybe every 4 hours or something. I'll probably prioritize an automatic updater for it first, though.
 

AlbinoRhino

Active member
It seems in the last couple of versions of this, that memory usage has started climbing drastically while auto-adventuring. When I first started using it, it seemed to hold steady at around 150-200K (per the windows task manager). Yesterday at one point it started to seem sluggish to me and the task manager had it at nearly 1500K. Perhaps a recent mafia change has done something to this build ?
 

Catch-22

Active member
Yes, it's entirely possible. I have two repositories, one which I tinker on and one which is just exactly how the KoLmafia codebase is and I reserve that for the JET builds. If there's some sort of adverse change being made in the KoLmafia codebase, it's going to affect the JET builds too.

Unfortunately I have barely played KoL since Crimbo due to lack of time. I will try to do some testing of the JET client tomorrow and see if I notice anything strange. I don't want to be maintaining a fork of the codebase just for JET so if I happen find an issue then any changes to the codebase would need to be approved by someone with commit access first.

If anyone else is noticing similar issues with the JET build please post here so I can get a better idea of what to look out for when I try it myself.
 

AlbinoRhino

Active member
I will try to provide more details. I am not having similar issues with the mafia daily .jars. Your build seems to be fine until i start auto-adventuring. Whether using a script or just using the mafia adventure panel, the memory usage starts climbing (according to task manager). I have both before & after adventure scripts. Also a recovery script firing intermittently. Interesting, if I stop the auto-adventuring, and let mafia sit idle, the KoLmafia.exe memory usage will slowly creep back down. As if it catching up on a backlog of instructions or something. I don't know. But I know it worked fine the first few days I used it.
 

Catch-22

Active member
As if it catching up on a backlog of instructions or something. I don't know.

I'm going to guess you're using a custom combat script that makes use of BatBrain.ash? For whatever reason, in my testing, that was causing huge amounts of memory/CPU usage.

Try running with a simpler combat script and I think you'll notice the memory stays pretty consistent throughout your session. Obviously people like using BatBrain, so I'll see what I can do about tweaking the memory management settings in the compiler (though the default settings have been working fine for a long time now, I suspect BatBrain is doing something silly).
 

AlbinoRhino

Active member
I use a custom combat script. But it's my own. It builds a KoL macro as a string and submits it. It is only consulted once per fight, and the macro it builds handles the entirety of the fight (except in a few random cases such as a tomb rat, where it uses a tangle of tails and then re-consults for a new macro to handle the resulting rat king).
 

Catch-22

Active member
Hmm the only reason I can see memory going up a lot over what Java uses is if there's not enough CPU time to perform effective memory management (GC works differently in JET than Java).

I can tweak the amount of CPU time spent on GC, which will possibly affect performance (not by much) but it will mean less memory usage. Like I said though, the setting it's on at the moment has been alright for a while.

Do you notice high CPU usage when you're auto adventuring? Does your memory usage still increase when you turn off your (pre/post) combat scripts?

I'm also tweaking with some advanced compiler options to see if that helps.
 

AlbinoRhino

Active member
Yes, the memory increase occurs while auto-adventuring, but not with the mafia .jar. I will do some more testing later tonight disabling the scripts and report back. My current version of this build appears to be r11951. Should I delay updating it until after testing ?
 

AlbinoRhino

Active member
OK. I just spent 244 adventures auto-adventuring. For the first 100 to 150, I made no changes and I never saw it go above 240K, and it seemed to hover around 150-180K. Then I noticed it started creeping above 300K. I disabled the combat script for another 50 advs or so and it was creeping above 400K. For the last 50 advs or so, I re-enabled the combat script and disabled both the before & after scripts, and when I finished it was at about 450K. It's sat idle for about 5 min. now and it has crept back down to 260K and doesn't seem to want to go any lower. Whatever wizardry you performed seems to have improved it a lot. I would have started disabling scripts earlier but I saw no great increases in memory and was under the impression that it was totally fixed.
 

Catch-22

Active member
Whatever wizardry you performed seems to have improved it a lot.

I haven't done anything yet, that's the build from last night :) I've only tinkered on my own machine, so far. I'll do some more profiling before I put out the next release (hopefully in a few hours).
 

AlbinoRhino

Active member
Huh. Last time it had gone to nearly 1300K and begun to bog down on me. But I think it was probably running a lot longer before I started adventuring and it became noticeable enough to me to open the task manager and investigate.
 

Catch-22

Active member
Give the new build a try, it's the same revision so you won't get a notification from the update script. The runtimes have also changed, I figure I would build everything from scratch in case there's some lingering component that was causing dastardly things.
 
Top