|
|
|
Here's what happens.
Let's say we have the following example: "hello".sub(/l/, 5) The frames: Then, say, an exception inside div hapens. We add the second frame once again: Then, we calculate backtraces, and the code in ThreadContext.addBackTraceElement basically filters out the last frame. The quick and dirty fix is here: Will investigate further. Adjusted the subject to better reflect the situation.
Another reason for missed traces is that many core methods are not marked with frame=true or backtrace=true, and hence missing in the stack trace. E.g., "+" is not marked and never appears in the stack trace.
Partially fixed in rev. r5974. At least exception out of "hello".sub(/l/, 5) is printed properly now.
For '+', need to add appropriate annotations to methods. Not a compiler issue; more related to our core classes not having backtrace frames in all cases.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This one:
"hello".sub(/l/, 5)
Or this one:
1 / 0
This one:
[4,5,6] + 5
This one:
def my_meth
[4,5,6] + 5
end
my_meth