By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,637 Members | 1,967 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,637 IT Pros & Developers. It's quick & easy.

Reading Stack Trace

P: n/a
Jop
Hi guys,

I'm trying to debug a deployed application (no debug symbols) and what
I got is a stack trace similar to this one. What does the '+' prefixed
number after the method name signify?

[ApplicationException: Hello, World!]
ASP.Default_cs_aspx.Page_Load() +34
System.Web.Util.ArglessEventHandlerDelegateProxy.C allback(Object
sender, EventArgs e)
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Thanks.
/jop

Nov 19 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
+ prefix mean location of the exception can be identified
where it originated in the code.
-----Original Message-----
Hi guys,

I'm trying to debug a deployed application (no debug symbols) and whatI got is a stack trace similar to this one. What does the '+' prefixednumber after the method name signify?

[ApplicationException: Hello, World!]
ASP.Default_cs_aspx.Page_Load() +34
System.Web.Util.ArglessEventHandlerDelegateProxy. Callback (Objectsender, EventArgs e)
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Thanks.
/jop

.

Nov 19 '05 #2

P: n/a
Jop
Thanks for the info, but where exactly is number pointing to? It is not
the line number because the application does not have source/debug info
to get the numbers from. The stack trace in question came from the code
below. What is the link between the number +34 in the above stack trace
to the line throwing the exception.

Is it possible to translate the +numbers into something more useful? I
guess there should be: why display something that we can not use?

<%@ Page language="c#" AutoEventWireup="true"%>
<script runat="server">
void Page_Load()
{
throw new ApplicationException("Hello, World!");
}
</script>
<html>
<body>
<form runat="server"></form>
</body>
</html>

Cheers,
/jop

Nov 19 '05 #3

P: n/a
Jop
Thanks for the info, but where exactly is number pointing to? It is not
a line number because the application does not have source/debug info
to get the numbers from. The stack trace in question came from the code
below. What is the link between the number +34 in the above stack trace
to the line throwing the exception.

Is it possible to translate the +numbers into something more useful? I
guess there should be: why display something that we can not use?

<%@ Page language="c#" AutoEventWireup="true"%>
<script runat="server">
void Page_Load()
{
throw new ApplicationException("Hello, World!");
}
</script>
<html>
<body>
<form runat="server"></form>
</body>
</html>

Nov 19 '05 #4

P: n/a
Jop
Thanks for the info, but where exactly is number pointing to? It is not
the line number because the application does not have source/debug info
to get the numbers from. The stack trace in question came from the code
below. What is the link between the number +34 in the above stack trace
to the line throwing the exception.

Is it possible to translate the +numbers into something more useful? I
guess there should be: why display something that we can not use?

<%@ Page language="c#" AutoEventWireup="true"%>
<script runat="server">
void Page_Load()
{
throw new ApplicationException("Hello, World!");
}
</script>
<html>
<body>
<form runat="server"></form>
</body>
</html>

Cheers,
/jop

Nov 19 '05 #5

P: n/a
page_load event handle by +34
onload event handle +64
each event has particular event handler which is invoked
by numbers having prefix +
-----Original Message-----
Thanks for the info, but where exactly is number pointing to? It is nota line number because the application does not have source/debug infoto get the numbers from. The stack trace in question came from the codebelow. What is the link between the number +34 in the above stack traceto the line throwing the exception.

Is it possible to translate the +numbers into something more useful? Iguess there should be: why display something that we can not use?
<%@ Page language="c#" AutoEventWireup="true"%>
<script runat="server">
void Page_Load()
{
throw new ApplicationException("Hello, World!");
}
</script>
<html>
<body>
<form runat="server"></form>
</body>
</html>

.

Nov 19 '05 #6

P: n/a
Jop
I'm sorry but I still don't get it. What does the numbers mean?

For example, if a program with debug info throws an exception, it will
print out a similar stack trace. But instead of a +prefixed number, it
shows the line number where the exception occurred.

However, if the program does not have debug info, it shows the
+prefixed number instead. I would expect that the +prefixed number
would carry the same type of information (i.e. line number). Even if
debug info is not available, it should be something similar, like IL
code offset in the methods, etc...

Any ideas?

Nov 19 '05 #7

P: n/a
"Jop" wrote:
Even if debug info is not available, it should be something similar,
like IL code offset in the methods, etc...


My guess would be that you're right. Without debug info, it's probably
showing an offset in the compiled DLL.

Have you tried ILDASM to see what's inside the Page_Load?

Steven

- - -
Nov 19 '05 #8

P: n/a
It is, I believe, an offset into the JIT'ed code - that is the native code.
If you have WinDbg you could disassemble the native code for Page_Load and
have a better idea of where the exception occured, but being native it is
sometimes difficult to map back the instruction to a specific line in C#/VB
or even IL. It would be easier to set the project options to "generate debugging
information" and have a line number to work from.

--
Scott
http://www.OdeToCode.com/blogs/scott/
I'm sorry but I still don't get it. What does the numbers mean?

For example, if a program with debug info throws an exception, it will
print out a similar stack trace. But instead of a +prefixed number, it
shows the line number where the exception occurred.

However, if the program does not have debug info, it shows the
+prefixed number instead. I would expect that the +prefixed number
would carry the same type of information (i.e. line number). Even if
debug info is not available, it should be something similar, like IL
code offset in the methods, etc...

Any ideas?

Nov 19 '05 #9

P: n/a
Actually, yes - it is the byte offset into native code.

I think I'll make a blog entry out of how to track this down later tonight.

--
Scott
http://www.OdeToCode.com/blogs/scott/
It is, I believe, an offset into the JIT'ed code - that is the native
code. If you have WinDbg you could disassemble the native code for
Page_Load and have a better idea of where the exception occured, but
being native it is sometimes difficult to map back the instruction to
a specific line in C#/VB or even IL. It would be easier to set the
project options to "generate debugging information" and have a line
number to work from.

--
Scott
http://www.OdeToCode.com/blogs/scott/
I'm sorry but I still don't get it. What does the numbers mean?

For example, if a program with debug info throws an exception, it
will print out a similar stack trace. But instead of a +prefixed
number, it shows the line number where the exception occurred.

However, if the program does not have debug info, it shows the
+prefixed number instead. I would expect that the +prefixed number
would carry the same type of information (i.e. line number). Even if
debug info is not available, it should be something similar, like IL
code offset in the methods, etc...

Any ideas?

Nov 19 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.