Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

1.5 JVM would not show NPE

 
Norm Radder
Ranch Hand
Posts: 707
3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1923
Linux Postgres Database Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show us the code?
Is it reproducable with a small amount of lines?
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been having that exact same issue on Windows for Workgroups.
 
Layne Lund
Ranch Hand
Posts: 3061
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's odd. I would be interested in seeing a small example that reproduces this.

Layne
 
Norm Radder
Ranch Hand
Posts: 707
3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Joanne Neal
Rancher
Pie
Posts: 3742
16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic