# Tuesday, 22 February 2005
« Eclipse is Evil | Main | New Snapshot »
Stack Traces

Corey comments on the previous entry:

While I agree that the Eclipse code is performing some nasty checks there I don't think I agree with the implication that the stacktrace created by the VM should change based on whether the method was inlined or not. I'm not sure what is mandated by the JVM spec but the stacktrace isn't going to be very useful for a developer debugging his program if the stacktrace changes depending on whether something got inlined or optimized away by the VM...

Here's what the Javadocs for Throwable.getStackTrace() say:

Some virtual machines may, under some circumstances, omit one or more stack frames from the stack trace. In the extreme case, a virtual machine that has no stack trace information concerning this throwable is permitted to return a zero-length array from this method.

On JDK 1.1 it was quite common to miss stack frames in a stack trace, but HotSpot is actually very good at creating a full stack trace even when it inlines methods. The CLR could certainly do better in this regard.

Bottom line is that the Eclipse code is very JVM specific and as far as I can tell it doesn't even serve any useful purpose.

Tuesday, 22 February 2005 21:20:05 (W. Europe Standard Time, UTC+01:00)  #    Comments [2] Tracked by:
"diet pills fast weight loss" (diet pills fast weight loss) [Trackback]
"ONLINE POKER" (ONLINE POKER) [Trackback]

Thursday, 24 February 2005 14:51:59 (W. Europe Standard Time, UTC+01:00)
Thats is prehaps the best comment I have ever seen written about eclipse :)
Sunday, 27 February 2005 15:36:46 (W. Europe Standard Time, UTC+01:00)
I saw the code you are talking about on project-mono's blog and such code is not just ugly its simply WRONG since its not compatible what Javadoc says.

There are message-strings and (even better) own exception for this task so why try to fix some broken code - let it break and send a description to the mailing list that this code is just awful or fill a bug-report.

I think its a bit funny - IBM always claims Eclipse is coded so wonderful and well and of course its based 100% on extreme programming but if I see such codelines I see extreme programming from a different point of view ;-)

lg Cemens
Clemens Eisserer
Name
E-mail
Home page

I apologize for the lameness of this, but the comment spam was driving me nuts. In order to be able to post a comment, you need to answer a simple question. Hopefully this question is easy enough not to annoy serious commenters, but hard enough to keep the spammers away.

Anti-Spam Question: What method on java.lang.System returns an object's original hashcode (i.e. the one that would be returned by java.lang.Object.hashCode() if it wasn't overridden)? (case is significant)

Answer:  
Comment (HTML not allowed)  

Live Comment Preview