Answered by:
How to debug a XAML/WinRT crash

Question
-
My app is crashing at startup, after the splash screen and construction of the app object but before the OnLaunched event of the first page. The call stack shows the crash occurring in Windows.UI.Xaml.dll. None of the app's code appears in the stack. The output window has:
First-chance exception at 0x774256C4 (KernelBase.dll) in [appname].exe: 0x40080201: WinRT originate error (parameters: 0x80004005, 0x00000061, 0x0308F59C).
Unhandled exception at 0x637F978E (Windows.UI.Xaml.dll) in [appname].exe: 0xC0000602: A fail fast exception occurred. Exception handlers will not be invoked and the process will be terminated immediately.I assume that there's an error in my XAML somewhere, but there's a lot of it, and I have no idea where to look. I tried commenting out essentially everything in the initial page, to no avail.
Any tips on how to diagnose this would be appreciated.
Thursday, April 5, 2012 12:34 PM
Answers
-
I eventually found the problem but left the thread open because I was hoping for some general tips on how to debug crashes like this. I'm not sure what we're going to be able to do when we get the inevitable crash dumps from WinQual that show nothing but XAML and WinRT functions in the call stack.
FWIW, the cause was an extra comma in the CornerRadius attribute of a Border element:
<Border CornerRadius="8,8,8,8," ... >
Note the extra comma aftter the last digit. The VS designer view doesn't care, but it crashed the app at runtime.- Edited by cdunford Friday, April 6, 2012 12:26 PM
- Proposed as answer by Jesse Jiang Tuesday, April 10, 2012 9:23 AM
- Marked as answer by Jesse Jiang Tuesday, April 17, 2012 7:35 AM
Friday, April 6, 2012 12:13 PM
All replies
-
Hello,
Would you please provide us more information about this issue, like how to reproduce this issue.
On the other hand, did you try to clear and rebuild your project?
Best regards,
JesseJesse Jiang [MSFT]
MSDN Community Support | Feedback to us
Friday, April 6, 2012 6:04 AM -
I eventually found the problem but left the thread open because I was hoping for some general tips on how to debug crashes like this. I'm not sure what we're going to be able to do when we get the inevitable crash dumps from WinQual that show nothing but XAML and WinRT functions in the call stack.
FWIW, the cause was an extra comma in the CornerRadius attribute of a Border element:
<Border CornerRadius="8,8,8,8," ... >
Note the extra comma aftter the last digit. The VS designer view doesn't care, but it crashed the app at runtime.- Edited by cdunford Friday, April 6, 2012 12:26 PM
- Proposed as answer by Jesse Jiang Tuesday, April 10, 2012 9:23 AM
- Marked as answer by Jesse Jiang Tuesday, April 17, 2012 7:35 AM
Friday, April 6, 2012 12:13 PM