line numbers not printed in stacktrace

Project:JNode Core
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:works for me
Description

Sometime, line numbers are not printed in the stacktrace.
Instead, there is a memory address : that's not practical for debugging java source code !

Line numbers must always be printed in the stacktrace.

It seems that's related to inlining of methods/constructors.

exact, same problem

exact. in the bug I mention, there is not even the stack frame for the top.

Fabien

my blog (in english and french)

for testing...

That bug has been reported here. The report contains an example to reproduce it.

Fabien

my blog (in english and french)

#1

I've also noticed that the stack frame for the top (most deeply nested) method call is sometimes missing. This could well have the same root cause.

#1

This happens consistently with NullPointerExceptions. I suspect that it is something to do with the special way that NPEs are thrown by the JNode JVM.

It would be really good if someone who understands the low levels of the JVM could have a go at fixing this. Currently the only way to track down the source of an NPE is to insert traceprints. This is slow and tedious, and sometimes problematic.

#2

In some code i was creating i had some NPEs popping up. Although i did get the bug where the top method was not printed in the stack trace, i was getting accurate line numbers through the stack trace of all other methods. So its not exclusive or consistent to NPEs.

The only time i've had trouble with exceptions not printing out proper stack traces with line numbers is when hacking low-level jnode core APIs, usually when exceptions get thrown before vm_main has been called, which result in kernel panics.

Are there reproducible examples of stack traces coming up with no line numbers? I know enough of the low-level APIs to know where to start debugging if i knew how to make it happen.

#3

It looks like my interjection about NPEs is a misleading. Sorry. That is (we think) a separate problem; see this issue.

Cluster: can you recall if those stack traces without line numbers were the kind produced by the 'Unsafe' code? If so, I think this is (kind of) a non-issue. Those stack traces are produced by low level code which is not smart enough to find line numbers.

Unless someone can provide a scenario / testcase to reproduce this particular problem ... line numbers missing on all stack frames ... I suggest that we close this issue as 'Works for me'.

#4

Status:active» works for me

Nobody has responded to my last comment so ... "works for me" it is.