Menu

#491 DrJava Does Not Shut Down With Project Open

3: Ugly
closed-fixed
Other (88)
5
2006-05-03
2006-04-29
No

On the Compaq tc1100 Tablet PCs, DrJava does not shut
down uf a project was newly created and is still open
when the user tries to quit. This happens only when the
project was created in the same DrJava session. If an
old project was opened, the problem does not occur.

Discussion

  • Mathias Ricken

    Mathias Ricken - 2006-04-29

    Logged In: YES
    user_id=1075744

    Using logging, I determined that the code is executed all
    the way to the System.exit(0); line in
    AbstractGlobalModel.quit() and then hangs. I couldn't
    determine the cause. Any ideas?

    public void quit() {
    try {
    if (!closeAllFilesOnQuit()) return;
    dispose();
    // PROGRAM GETS HERE!
    System.exit(0);
    }
    catch(Throwable t) { System.exit(0); /* exit anyway */ }
    }

     
  • Mathias Ricken

    Mathias Ricken - 2006-04-29
    • assigned_to: nobody --> mgricken
    • status: open --> closed-fixed
     
  • Mathias Ricken

    Mathias Ricken - 2006-04-29

    Logged In: YES
    user_id=1075744

    I still don't know what causes DrJava to hang, but resetting
    interactions when quitting seems to remedy this problem. I
    have not been able to observe adverse reactions elsewhere,
    so I'm committing this change in revision 3831.
    Please bang on it (by quitting DrJava in different ways,
    e.g. having no project open; having one open; creating a new
    project, then quitting; closing a project, then quitting; etc.).

     
  • Mathias Ricken

    Mathias Ricken - 2006-04-29
    • status: closed-fixed --> open
     
  • Mathias Ricken

    Mathias Ricken - 2006-04-29

    Logged In: YES
    user_id=1075744

    Reopened, still hangs for DXN.

     
  • Mathias Ricken

    Mathias Ricken - 2006-05-03

    Logged In: YES
    user_id=1075744

    Hopefully fixed as of revision 3833.
    Instead of using System.exit to terminate the program, I am
    now calling Runtime.halt. The difference is that shutdown
    hooks do not get executed (nor do finalizers, but we did not
    set runFinalizersOnExit anyway).

    If for some reason we have to reverse this change, inserting
    a Thread.sleep(1000) before the System.exit helped as well.

    I would also like to document two easy workarounds for users:
    1) Close the project first, then quit.
    2) Enable the "Do you really want to quit?" dialog box.
    Either of these options will let DrJava terminate without a
    problem.

     
  • Mathias Ricken

    Mathias Ricken - 2006-05-03
    • status: open --> closed-fixed
     

Log in to post a comment.