Trying to debug Windows Store App from dump files

ok, with the help of the Windbg Extension PDE.dll from Andrew Richards, I see that your application crashes because of an not handled System.UnauthorizedAccessException.

I used !PDE.dpx -dse to shows all Stowed Exceptions (those 0xC000027B exceptions):

0:006> !PDE.dpx -dse
Start memory scan  : 0x0551fc7c ($csp)
End memory scan    : 0x05520000 (User Stack Base)

0x0551fc94 : 0x012db914 :  !dse combase!STOWED_EXCEPTION_INFORMATION_V1
0x0551fcdc : 0x0163c168 :  !dse combase!STOWED_EXCEPTION_INFORMATION_V1

Now I use !PDE.dse to display its data:

0:006> !PDE.dse 0551fc94
Stowed Exception Array @ 0x0551fc94

Stowed Exception #1 @ 0x012db914
    0x80070005 (FACILITY_WIN32 - Win32 Undecorated Error Codes): E_ACCESSDENIED - General access denied error

    Stack    : 0x163c528
        770ba9f1 combase!RoOriginateLanguageException+0x3b
        6f137872 clr!SetupErrorInfo+0x1e1
        6f1fbc91 clr!MarshalNative::GetHRForException_WinRT+0x7d

>>> Associated CLR Exception <<<

Exception object: 02b424f8
Exception type:   System.UnauthorizedAccessException
Message:          <Invalid Object>
InnerException:   <none>
StackTrace (generated):
    SP       IP       Function
    00000000 00000001 UNKNOWN!UNKNOWN+0x2
    0551FC58 015702E9 CryptoQuoteW8cs!UNKNOWN+0x81
    0551FC6C 01570251 CryptoQuoteW8cs!UNKNOWN+0x11

StackTraceString: <none>
HResult: 80070005

0:006> !PDE.dse 0163c168
Stowed Exception Array @ 0x0163c168

Stowed Exception #1 @ 0x012db914
    0x80070005 (FACILITY_WIN32 - Win32 Undecorated Error Codes): E_ACCESSDENIED - General access denied error

    Stack    : 0x163c528
        770ba9f1 combase!RoOriginateLanguageException+0x3b
        6f137872 clr!SetupErrorInfo+0x1e1
        6f1fbc91 clr!MarshalNative::GetHRForException_WinRT+0x7d

>>> Associated CLR Exception <<<

Exception object: 02b424f8
Exception type:   System.UnauthorizedAccessException
Message:          <Invalid Object>
InnerException:   <none>
StackTrace (generated):
    SP       IP       Function
    00000000 00000001 UNKNOWN!UNKNOWN+0x2
    0551FC58 015702E9 CryptoQuoteW8cs!UNKNOWN+0x81
    0551FC6C 01570251 CryptoQuoteW8cs!UNKNOWN+0x11

StackTraceString: <none>
HResult: 80070005

Stowed Exception #2 @ 0x01639748
    0x80070005 (FACILITY_WIN32 - Win32 Undecorated Error Codes): E_ACCESSDENIED - General access denied error

    Stack    : 0x69d29c4
        6d33bd5e Windows_UI_Xaml!DirectUI::Application::MainASTAInitialize+0xa9
        6d33bb05 Windows_UI_Xaml!DirectUI::FrameworkView::Initialize+0x5a
        6dc5a597 twinapi_appcore!Windows::ApplicationModel::Core::CoreApplicationView::CreateAndInitializeFrameworkView+0xa7
        6dc5a6eb twinapi_appcore!Windows::ApplicationModel::Core::CoreApplicationView::CreateAndInitializeFrameworkView+0x1fb
        74b2a83a SHCore!Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,CScalingInfoBase,Microsoft::WRL::FtmBase,Microsoft::WRL::Details::Nil,Microsoft::WRL::Details::Nil,Microsoft::WRL::Details::Nil,Microsoft::WRL::Details::Nil,Microsoft::WRL::Details::Nil,Microsoft::WRL::Details::Nil,Microsoft::WRL::Details::Nil>::`vector deleting destructor'+0x189
        772c919f kernel32!BaseThreadInitThunk+0xe
        775a0bbb ntdll!__RtlUserThreadStart+0x20
        775a0b91 ntdll!_RtlUserThreadStart+0x1b

Here you can see that the underlaying issue is the System.UnauthorizedAccessException. The dmp is only a minidump, so I can’t see what CryptoQuoteW8cs!UNKNOWN+0x81 does.

Use the Application.UnhandledException event to handle exception that you have not handled via try/catch to prevent the app from crashing.

Here is a good guide on how to handle exceptions:

Strategies for Handling Errors in your Windows Store Apps

Leave a Comment