Bug - Fixed Not running Logout script

holatuwol

Developer
Well, exiting directly shouldn't load a login frame anymore because of how exiting happens now. (Edit: Hm, seems like it does, I'll have to find out why that is.)

However, I'll see if I can somehow reproduce that getting stuck error. Do you have a logout script or anything?
 

roippi

Developer
On my dev build of mafia, I don't have a logout script, nope. I could check if my logout script actually does run on my playing build, though.

ETA: doesn't look like the logout script runs.
 
Last edited:

Veracity

Developer
Staff member
I just logged out via the close box on the Adventure Frame. The Login Frame appeared, and I saw the various expected messages in the status line. Issuing Logout Request, Logout COmplete, and so on.

I then clicked the close box of the Login Frame and the frame went away, but the process did not exit.
I could not ^C it in the shell from which I launched it. I had to ^Z it and do a kill -9 to get rid of it.
 

holatuwol

Developer
I'm not able to reproduce the process not going away, but I did find out what was creating the login frame, which was a second logout attempt running in parallel with the existing one, which was triggered just as KoLmafia closed the last window. I've attempted to fix this in 10544. Does this help your situation any?
 

fronobulax

Developer
Staff member
r10545

General->Exit does not stop the javaw process (Windows 7 SP 1, x64 or whatever I reported upthread).
 

fronobulax

Developer
Staff member
r10545

Different character. General->Logout ran the logout script. At that point General->Exit exited and stopped the javaw process.

Edit: Nevermind. The second time the process persisted.

Edit again: But... Different character, first login of the day, ran Logout script manually because that is important to me, General->Logout and then General->Exit ended up with the logout script running again, as expected and the javaw process gone.
 
Last edited:

holatuwol

Developer
The next time KoLmafia gets stuck on exit:

Code:
jps -l
Use that to figure out what the process id is for KoLmafia.

Code:
jstack {pid}
Use that to get a stack trace dumped to the console. I get the feeling there's some kind of weird locking going on still in the event dispatch thread, but it only occurs if certain conditions are met, and they don't get met by me logging on to do a bounty. =\
 
Last edited:

fronobulax

Developer
Staff member
The next time KoLmafia gets stuck on exit:

Code:
jps -l
Use that to figure out what the process id is for KoLmafia.

Code:
jstack {pid}
Use that to get a stack trace dumped to the console. I get the feeling there's some kind of weird locking going on still in the event dispatch thread, but it only occurs if certain conditions are met, and they don't get met by me logging on to do a bounty. =\

Neat commands. I need to remember they are there. For the visitor from the future on my Windows box they were in the bin subdirectory of my JRE and I needed to specify the path to them, one way or another.

I logged on, waited until Login processing had stopped and then went General->Exit. jstack info attached.
 

Attachments

  • mafia.txt
    9.9 KB · Views: 70

fronobulax

Developer
Staff member
r10555

No joy. General->Exit Process remains.

jstack output attached.
 

Attachments

  • again.txt
    8.6 KB · Views: 49

fronobulax

Developer
Staff member
r10557

No joy. General->Exit Process remains.

jstack output attached.

Not sure when my neck chance to test will be. Tomorrow afternoon?
 

Attachments

  • yetAgain.txt
    13.8 KB · Views: 53

roippi

Developer
Possible joy in r10559? My javaw process is now properly disposed of, and my logout script appears to run successfully. Win 7, JRE 1.6

I'll let frono report back before declaring Official Joy :)
 

Bale

Minion
Just ran r10561 and it logged out and quit perfectly! I hadn't had anything to add to this discussion, but I've found the bug very annoying. ;) I am so happy that this has been solved for me and now I'm also waiting to hear if fronobulax expresses joy.
 

Veracity

Developer
Staff member
I haven't said anything recently, since on OS X, this was running perfectly for me - logging out and exiting the process exactly correctly exactly when I wanted it to - but 10561 screwed up big time.

I had the Adventure Frame open
I clicked the close box
The Adventure Frame disappeared
... and that's it. No Login Frame appeared. I have no idea if it successfully logged me out. Probably not, since the icon in the dock says I have 10 turns left. The menu has stripped down, all the way to just the KoLmafia menu on the far left; none of the other menus are available. I can select "Quit" from that menu, and the program exits.

From my viewpoint, as an OS X user, this is a big step backwards.
 

Bale

Minion
Frack!

Now Veracity is annoyed by the same build that UN-annoyed me. Houston, we have a problem.

She's right, clicking the close box fails for me also on Windows XP. I just don't usually do that. I usually "General -> Exit KoLmafia" and that is working now.

Edit: "General -> Logout of KoLmafia" is... interestingly failed.

There is not joy.
 

Catch-22

Active member
This bug was happening to me and 10559 seems to kill the process at least.

What actually happened in the past few builds to cause this in the first place? I only noticed it happening this week when the session lock files weren't disappearing, but I don't always update to the latest JAR. Certainly it wasn't happening in a build from a few weeks ago.
 
Last edited:

holatuwol

Developer
I'm attempting to get Option-Q to kill the process on OSX 10.7 and also run the user's logout script, and because of all the complications on how it needs to happen (which I have not yet pinned down), it seems to be introducing other problems. :p

Edit: Found the current problem: I removed code that shouldn't have been removed when I committed r10560. See r10562.
 
Last edited:

fronobulax

Developer
Staff member
r10564

Different computer and I downloaded the jar instead of building it myself. Nevertheless, in the one trial I have been able to make General->Exit ran the logout script and then exited/shutdown the javaw process.

Tentative/Provisional Joy.
 
Top