Hi,
i am using Jpasswords 0.1.0 under Mac OS x 10.4.2 and the issue
is that I cannot terminate the programm. It just stays open.
I have tried File -Terminate, or red close button or other methods it
does not exit.
only way to exit is Alt+Mac+Esc and kill the task.
best regards
Michael obiwanŤcybortek.de
Anonymous
Logged In: YES
user_id=551242
Good point!
Unfortunately I don't have the opportunity to test this myself,
so I must rely on further responses by users. You can aid the
process by looking for console output and any exceptions
thrown/not thrown. Post a console output if possible (picture
after you attempted to exit).
It might be a thread termination problem. I will check through
the code in respect to this.
Logged In: NO
Ok. I have opened the console and surprise when just starting the
application and then close it straight away it works fine ! However
starting the application, adding a new key, saving the database and exit
it appears that it wont exit anymore. I am pasting the console output
below. (The two exit at the end appeared after I have pressed two more
times exit :-))
bye Michael
# JPWS-F INITIAL SEQUENCE ...
# JPWS-F start, 1124733928
- attempting OPTION FILE: /Users/carmen/jpws.ini
# Locale: ,
[jpws-b] log: (Global) Standard Application: Local Files
[jpws-b] log: (Global) Global initialized
# JPWS-F System initialized
# JPWS-F exit
# *** JPWS-F SHUTDOWN INITIATED
# JPWS-F exit
# JPWS-F exit
Logged In: YES
user_id=551242
Hm, the shutdown thread does not terminate! And what is
more, it does not operate correctly. The condition you mention
is puzzling.
Can you do me the favour and make a copy of the "System
Info" text (Help menu) and attach the file here? I must see
what VM you are using. Many thanks!
Logged In: NO
So and finally I went to the java J2SE 5.0 preferences and changed the
order of the java versions that will used for JNPL programms from
J2SE 5.0
J2SE 1.42
to
J2SE 1.42
J2SE 5.0
The result is that jpws is now using 1.42 and look there it terminates
every time. In addition it appears faster. Also Azureus seems to work
properly. User happy !
thanks a lot
Michael
Logged In: YES
user_id=551242
The user is happy, but I am not! ;)
I have not heard yet from JRE 1.5 users of other platforms that
they encounter problems like you described. The surmise is
near that there is an error in the Apple JRE implementation.
For the moment we can put this bug aside, but further
clearification should be initiated.
I wonder whether you can send a message to the apple
responsibles for this library and put them into the picture. You
may also state this project (JPasswords) as a reference so
they might do further investigations if they wish.
Many thanks for your input and cooperation in this!
- Wolfgang
Logged In: YES
user_id=551242
Originator: NO
No further confirmations of the event.
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Logged In: YES
user_id=1924123
Originator: NO
The hang problem on the mac is related to deprecated threading calls in Java, suspend, pause and stop have major thread issues, and it seems that the mac runtime really brings these out.
I whacked Global.java a bit, using the recommended way of terminating a thread, and have something that seems to do the right thing. I will leave it to the maintainers to see if there is a better way of doing it.
BTW, using JDK 1.5
[ddhill front]$ cat ~/downloads/Global.java.diff--- Global.java.bak 2007-10-28 21:03:24.000000000 -0400
+++ Global.java 2007-10-28 22:11:09.000000000 -0400
@@ -1308,8 +1308,8 @@
System.out.println( "# JPWS-F exit" );
// make the demon threads suspended
- if ( serviceDemon != null )
- serviceDemon.pause();
+// if ( serviceDemon != null )
+// serviceDemon.pause();
// close active database
if ( theFile != null && !theFile.close() )
@@ -1317,8 +1317,8 @@
// this will interrupt the exit process (if close didn't work, e.g.
// because of user break action)
System.out.println( "# JPWS-F exit interrupted" );
- if ( serviceDemon != null )
- serviceDemon.resume();
+// if ( serviceDemon != null )
+// serviceDemon.resume();
return;
}
@@ -1420,6 +1420,8 @@
setDaemon( true );
}
+ private boolean running;
+
public synchronized void run ()
{
PwsFileContainer dbf;
@@ -1427,7 +1429,8 @@
int i, gcCount = 0;
boolean fileActive;
- while ( true )
+ running = true;
+ while ( running )
try {
idleTime = ActionHandler.getIdleTime();
dbf = getSelectedFile();
@@ -1477,13 +1480,13 @@
public synchronized void terminate ()
{
- stop();
- System.out.println( "# Service Demon terminated" );
+ running = false;
+ notifyAll();
}
public synchronized void pause ()
{
- this.suspend();
+ //this.suspend();
}
Logged In: YES
user_id=551242
Originator: NO
Thanks for taking care of this, Dave! - Can you confirm that your modification has resolved the problem, and did you encounter the problem before on your computer?
- Wolfgang
Logged In: YES
user_id=1924123
Originator: NO
>Thanks for taking care of this, Dave! - Can you confirm that your
>modification has resolved the problem, and did you encounter the problem
>before on your computer?
Yes, I can confirm the problem and (so far) the fix.
Before the fix, if I opened the program, copied a passwd to the clipboard, then hit the terminate button (with or without any other operation, like clearing the clipboard), I would see the hang 100% of the time, requiring a kill -9 from the command line to get rid of it.
After the fix - I have yet to see the problem and I have probably done at least 20 cycles of the program.
Also, I did have some print statements in to check what was going on, and I was satisfied that the serviceDemon run loop exited when I was terminating.
- Dave
Logged In: YES
user_id=551242
Originator: NO
Copy! :) I will have to work on the suspension function as your solution doesn't cover that. But many thanks again, you probably have opened up a door for potential MAC users, and they might appreciate this. Good work!
- Wolfgang
Logged In: YES
user_id=1924123
Originator: NO
Wolfgang,
> I will have to work on the suspension function as your solution
doesn't cover that.
I have found over the years that the solutions I provide to the open source community almost always are reworked by the main developers. Rather than take offense, I understand that the core developers have greater insight on all the aspects of the code in question :-)
For suspension, when I do that with a Swing animation thread, I normally let the original thread die, and restart a new one when I need it again. Instead of:
while(running)
I do a
while(deamonThread == Thread.currentThread())
and set daemonThread = null to stop the thread. Then your resume becomes an
if(deamonThread == null)
start new thread
Hope that made sense...
If you want me to beta some code, feel free to let me know.
- Dave
Logged In: YES
user_id=551242
Originator: NO
Good idea. I have implemented a suspension solution with wait() and notifyAll() instead which seemed more economic (the wait branch was there already). It works well now without deprecated thread calls and will be available with JPWS 0-6-0.
Anyway, if you feel any needs about features the program should have, you are invited to make use of the Feature Request tracker of this project.
- Wolfgang
This bug is obviously still unsolved. Whenever the database is updated, the application won't quit.
When will 0-6-0 be made available?
JPWS 0-6-0 is about 80% ready. OK, I sit down now and do the rest. ;) Might take a little while though.
- Wolfgang
I would like to add that the bug does NOT occur here when I close JPassword via the File->Exit menu entry.
May help in nailing down the problem. Or leave you completely confused.
Please anyone confirm this is ok now. I assume it is.