Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > The program that would'nt Quit

Reply
Thread Tools

The program that would'nt Quit

 
 
Roedy Green
Guest
Posts: n/a
 
      01-26-2006
On Thu, 26 Jan 2006 20:01:04 +0000, Thomas Hawtin
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone
who said :

>
>Have you tried using jstack

I had never heard of it till now. Will try that.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      01-26-2006
On Thu, 26 Jan 2006 20:01:04 +0000, Thomas Hawtin
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone
who said :

>Have you tried using jstack (or similar) to see what is continuing to run?

Jstack it turns out does not run on windows.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
 
 
 
Monique Y. Mudama
Guest
Posts: n/a
 
      01-27-2006
On 2006-01-26, Roedy Green penned:
>
> 6. There is a quantum mechanical effect. Watching the apps with
> JConsole makes it work!!


That certainly smells like a threading issue. Every time I've used
tools to inspect the code and the code started to work, it has always
turned out to be a threading problem.

http://catb.org/~esr/jargon/html/H/heisenbug.html



--
monique

Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
 
Reply With Quote
 
Thomas Hawtin
Guest
Posts: n/a
 
      01-27-2006
Roedy Green wrote:
> On Thu, 26 Jan 2006 20:01:04 +0000, Thomas Hawtin
> <(E-Mail Removed)> wrote, quoted or indirectly quoted someone
> who said :
>
>> Have you tried using jstack (or similar) to see what is continuing to run?

> Jstack it turns out does not run on windows.


jstack, by default, does much the same as ctrl-\ (which I think is
ctrl-break on Windows) only with less fiddling. There are some options,
like -m which causes it to NPE lots.

Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      01-27-2006
On Thu, 26 Jan 2006 17:24:31 -0700, "Monique Y. Mudama"
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone who
said :

>That certainly smells like a threading issue. Every time I've used
>tools to inspect the code and the code started to work, it has always
>turned out to be a threading problem.
>
>http://catb.org/~esr/jargon/html/H/heisenbug.html


more weirdness. The bug has now gone altogether. What changed? I
added some convenience methods to one of the base classes, but I don't
yet use them anywhere.

This is like the old days of FORTRAN when making tiny changes to code
changed which code got clobbered when subscripts when out of range.

I don't like this. I have been hit twice in a day with programs that
work fine on one compiler but not another. It is a sign Java has
grown past the manageable bounds of complexity for a group of humans.

There is no JNI in my code.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
opalpa@gmail.com opalinski from opalpaweb
Guest
Posts: n/a
 
      01-27-2006
> This is weird. I am doing pure batch text processing.

Opening files is preceeded by SecurityManager checks. That may involve
threads. Stefan Ram suggests a gradual isolation which may be
reasonable.

> 6. There is a quantum mechanical effect. Watching the apps with
> JConsole makes it work!!


Maybe, a long shot, when watching you give extra time which you don't
give when not watching and something time limited gets to complete.

Opalinski
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.geocities.com/opalpaweb/

 
Reply With Quote
 
opalpa@gmail.com opalinski from opalpaweb
Guest
Posts: n/a
 
      01-27-2006
Lack of determinism is a problem. Tread carefully to be certain it's
the virtual machine. It won't be first not-exiting bug:

http://developer.java.sun.com/develo...s/4515058.html
http://developer.java.sun.com/develo...s/4671025.html
http://developer.java.sun.com/develo...s/4465537.html

It appears they do get fixed as Sun agrees jvm should exit gracefully.

Opalinski
(E-Mail Removed)
http://www.geocities.com/opalpaweb/

 
Reply With Quote
 
Monique Y. Mudama
Guest
Posts: n/a
 
      01-27-2006
On 2006-01-27, Roedy Green penned:
>
>
> I don't like this. I have been hit twice in a day with programs that
> work fine on one compiler but not another. It is a sign Java has
> grown past the manageable bounds of complexity for a group of
> humans.


Now, now. I happen to know for a fact that they've had problems like
this all along. In my graphics class in college, we were using Java
1.1.7. I always made sure to test my projects, which I developed on
my windows box, on the lab boxes before submitting them. My professor
laughed at me and told me that Java works everywhere.

Well. I was running late for the final project of the semester, and I
was running into some weird environment problem, so I turned in the
project, a wireframe activated by keypresses, which worked flawlessly
on my Windows box. I got a zero on the project because the keypress
code didn't work the same between Windows and Solaris. I got a C for
the course instead of an A.

I know @!#! well that Java has *never* worked perfectly across all
systems.

--
monique

Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
 
Reply With Quote
 
abmccullough@gmail.com
Guest
Posts: n/a
 
      01-27-2006

It's not an API, it's a "dump" of the JVM state that you can use to
debug things. It is automatically created in certain error conditions
(like a bad signal from JNI code), but you can request one to debug a
problem. On Windows, type Ctrl-BREAK in the command window in which
the Java.exe is active, on *NIX, issue a kill -3 to the java.exe
process. In windows, it will dump to standard out (the console window
-- usually, you cannot do this in an IDE) a list of all threads, the
currently active thread, held locks and monitors, and a variety of
other highly useful information. On *NIX it will write the same
information to a file named javacoreTIMESTAMP.txt in the default
directory. I use it all the time to determine why things don't stop
and other problems. Some web searching should help you find some
pointers on interpreting the contents, but the thread dump is pretty
straightforward -- it lists all the threads and their current stack.


-Andrew

 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      01-27-2006
On 27 Jan 2006 06:31:08 -0800, (E-Mail Removed) wrote, quoted or
indirectly quoted someone who said :

> On Windows, type Ctrl-BREAK in the command window in which
>the Java.exe is active,


All I have even seen is a abort. does it hide this dump somewhere
without telling you?
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie:this program stops responding after pressing quit button Boris Python 2 12-04-2007 04:10 PM
Quit program that is running in command shell Java and Swing Java 4 09-11-2006 06:13 PM
firefox quit and wont work Vernon Firefox 10 10-11-2005 04:12 PM
How to quit a Windows GUI program gracefully with Python under Cygwin? KB Python 4 08-13-2005 12:42 AM
Junk Controls Quit David C Kifer Firefox 0 11-17-2004 06:59 PM



Advertisments