johnvisiomvp

Life with Visio and other Microsoft Toys!

WP7 Stack Trace?

leave a comment »

Coding is like riding a bike. At some point you are going to crash. So what happens if you do crash your WP7 app and get a Stack Trace?

When you open the report in Excel, the results are in a bit of a mess, so the first hing to do is to apply a bit of formatting. The actual stack trace is multiline and appears in a single cell, so the first thing to do is apply wrap text to the entire sheet and while the sheet is selected, click on the edge of the cells in the border to resize the hieght and width of the cell. Set the vertical alignment to top of cell. This will make for a more readable result.

If you want to print the results, you may want to delete the first few columns or combine them into a single column. The one column I hoped would be useful, App Version, always ends up being blank. So was the crash due to a new bug or because the user has not upgraded?

The crashes are grouped by type, so the last entry is not always the last crash. Trying to narrow down the field by using the data range on the crash down page will give the appearance you have narrowed down the selection, but when you download, you get all the crashes.

So know that you ave a pretty picture of what happened, what next? The Stack Trace will show you what happened before the crash and what happened as it cleaned up, so your focus should not be on the first or last entry. Look around the middle and identify any line that matches one of your methods. The line before it should show the error that occured and you have the fun job of determining where in that method that that error occured. Sounds like a good reason to keep your methods short.

John Marshall… Visio MVP       Visio.MVPs.org

Advertisements

Written by johnvisiomvp

July 17, 2012 at 11:15 am

Posted in Windows Phone 7, WP7

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: