File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes 1.5 JVM would not show NPE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "1.5 JVM would not show NPE" Watch "1.5 JVM would not show NPE" New topic
Author

1.5 JVM would not show NPE

Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 685
Funny business debugging code today: The 1.5 JVM hung/exited my program instead of showing stack trace for a NullPointerException. There was no message at all.
I salted my program with println's and finally found where there was possibly a NPE, but the java command would not show it.
I tried the 1.4 java.exe and immediately got the NPE trace!
What is going on???
This is the first time I've seen this kind of thing. Going back several years.

Is 1.5 that unreliable on a Win98 system?

Norm
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Can you show us the code?
Is it reproducable with a small amount of lines?


http://home.arcor.de/hirnstrom/bewerbung
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

I've been having that exact same issue on Windows for Workgroups.


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
That's odd. I would be interested in seeing a small example that reproduces this.

Layne


Java API Documentation
The Java Tutorial
Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 685
The problem is not always repeatable. After I used JVM 1.4, then 1.5 would get and display the stack trace for the NPE.
Since there are 17 source files of about 240K bytes, I haven't tried to isolate the problem because it doesn't always happen. It may be related to the mini-IDE/smart editor I'm using (WinEdit).
I think I'll go back to JVM 1.4 to finish developing this project.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Frankly, I'm rather amazed to hear that Tiger supports Windows 98. I don't think you're going to be running any C# programs on that OS!

But in any case, it sounds to me like an issue whereby error output doesn't always get flushed on process exit. If you're saying, as I think you are, that this happens when the output is going into an IDE, rather than to the command window itself -- well, again, I'm bloody amazed this works at all.

If you can't afford to upgrade to a 21st century version of Windows, you might consider Linux.


[Jess in Action][AskingGoodQuestions]
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3416
    
  12
Originally posted by Ernest Friedman-Hill:
Frankly, I'm rather amazed to hear that Tiger supports Windows 98.


Sun release notes say that it supports Windows 98 (2nd Edition)


Joanne
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: 1.5 JVM would not show NPE
 
Similar Threads
ServletContextListener
Incorrect Colum/Size Error while converting from java to excel
BoxLayout
parsing a xml file via https
catching out of memory