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.
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 */ }
}
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.).
Logged In: YES
user_id=1075744
Reopened, still hangs for DXN.
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.