views:

30

answers:

1

What are the numbers in a .NET stack trace on an ASPX error page (see picture)? They don't seem to be line numbers as they are too large? How can those numbers help me in determining the line of code that threw the exception?

Stack trace example

+4  A: 

EDIT: As this has been marked correct, I might as well edit it to make it so :)

They're offsets within the JITted native code of the method. Unfortunately that means they don't help very much when trying to work out what's going on. See this blog post for a more detailed example.

Jon Skeet
They might also be *native* offsets (as one would get with a native stack trace), in practice I doubt this would make any difference (the issue with large native offsets indicating mismatched symbols doesn't apply to .NET).
Richard
Offsets from what? The InitView method above is not even close to being 1064 IL lines...
Crassy
@Crassy: Not IL *lines*, but IL *offsets* - as in, the numbers shown on the left in ILDASM. A single instruction can take several bytes of IL.
Jon Skeet
Obviously this was the offset into the NATIVE code (see comment on original post). Thanks for your help!
Crassy