Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Reading Stack Trace

Reply
Thread Tools

Reading Stack Trace

 
 
Jop
Guest
Posts: n/a
 
      01-24-2005
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

 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      01-24-2005
+ 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 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. Callback

(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
>
>.
>

 
Reply With Quote
 
 
 
 
Jop
Guest
Posts: n/a
 
      01-24-2005
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

 
Reply With Quote
 
Jop
Guest
Posts: n/a
 
      01-24-2005
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>

 
Reply With Quote
 
Jop
Guest
Posts: n/a
 
      01-24-2005
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

 
Reply With Quote
 
Guest
Posts: n/a
 
      01-24-2005
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 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>
>
>.
>

 
Reply With Quote
 
Jop
Guest
Posts: n/a
 
      01-24-2005
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?

 
Reply With Quote
 
Steven Spits
Guest
Posts: n/a
 
      01-24-2005
"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

- - -


 
Reply With Quote
 
Scott Allen
Guest
Posts: n/a
 
      01-24-2005
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?
>



 
Reply With Quote
 
Scott Allen
Guest
Posts: n/a
 
      01-24-2005
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?
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C/C++ compilers have one stack for local variables and return addresses and then another stack for array allocations on the stack. Casey Hawthorne C Programming 3 11-01-2009 08:23 PM
trace.axd and asp.net trace feature IIS only? Jiho Han ASP .Net 0 08-22-2006 12:44 PM
No trace messages using Diagnostics.Trace McGeeky ASP .Net 0 02-01-2006 02:49 PM
How to redirect output from Diagnostics.Trace to Page.Trace? Matthias S. ASP .Net 1 11-30-2005 09:01 AM
Trace: Can anyone suggest a good tool to catch trace messages? Rukmal Fernando ASP .Net 4 10-27-2003 09:03 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57