Bug Semirare counters not being saved

Xande1

Member
Ever since changing the in-game capitalization back to "telmah", to match my mafia login field, I have not lost counters.

About to change both to "telmaH", so they match that way, will report results in a few days.

P.S. - Sorry for the Great Wall of Text above. I do have a problem with brevity sometimes.
 

Xande1

Member
Things went swimmingly for a few days, but today I logged in to missing counters again. Haven't fiddled with anything, capitalization or otherwise, since they stayed the previous 2 days in a row. So it's not related to capitalization.

However, I was checking the Fortune Cookie counter saved in the config file, so I can report that the problem occurs on read, not write.

11 Feb 2013 (after logout), settings/telmah_prefs.txt:
Code:
relayCounters=783\:Fortune Cookie\:fortune.gif

12 Feb 2013 (after login and spending a few turns, while still logged in), settings/telmah_prefs.txt:
Code:
relayCounters

So mafia correctly saved the counter on logout, but discarded it after login. If I get any more useful data, I'll add it.
 
Last edited:

Xande1

Member
A Breakthrough!

A Breakthrough!

The issue is caused by playing on multiple, different accounts without closing KoLmafia. The reason it was only happening to one account is because that account is (usually, today was a rare exception) the only one that I play immediately after another account, and thus in the same instance of KoLmafia. That's also why it doesn't affect some people at all; it only affects people with multiple accounts, who play them without closing KoLmafia between logins.

That said, the bug is still irregular. I can't make it happen on command (not yet, anyway) and it seems to be random when it occurs.

I have another multi named testxande. Here's what happened to the config files during my most recent play session (stuff in code blocks is the result of a grep command):

After logging out telmaH, no characters logged in, KoL still running and at Login screen: (these counters are both correct)
Code:
settings/telmah_prefs.txt:relayCounters=965\:Fortune Cookie\:fortune.gif
settings/testxande_prefs.txt:relayCounters=1665\:Fortune Cookie\:fortune.gif

Next, logged in testxande, and immediately ran the same grep command:
Code:
settings/telmah_prefs.txt:relayCounters=965\:Fortune Cookie\:fortune.gif
settings/testxande_prefs.txt:relayCounters=965\:Fortune Cookie\:fortune.gif

Notice that testxande's fortune counter has been overwritten with telmaH's, to a turn number that testxande is already past. In KoLmafia, running counters reports "No active counters."

After spending an adventure, KoLmafia deletes the incorrect counter (as testxande is already past that adventure number).
 
Last edited:

Xande1

Member
I managed to (finally) capture a debug log during a login when the bug occurred. And using grep as mentioned above, I managed to catch that the bug had already happened very early in the login process and stop the log, so it's only ~130kB, rather than ~1.5MB. That said, looking through it, it looks like it's mostly a record of the HTTP requests and responses between mafia and the KoL server, so I'm not sure how relevant it is. Devs, would it be useful for me to email it somewhere?

Also, since I haven't said before, my Java is Open JDK 1.6.0_24, and I run mafia from a command line, and haven't gotten any error output to that window when the bug occurs.
 
Last edited:
Top