The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

[UWP]ToastNotifier.Show() causes crashes (STOWED_EXCEPTION_System.Exception: McgInterop::McgHelpers.ThrowFailed) RRS feed

  • Question

  • Hi,

    after checking my Health statistics of my app Action Note (a UWP app) in Dev Center, I realized that one one of my methods is causing a lot of app crashes:

    public class ToastService : IToastService
        // ...
        public void Show(ToastNotification toast)
            var notifier = ToastNotificationManager.CreateToastNotifier();

    The provied stack try of DevCenter looks like this:

    Frame	Image	Function	Offset
    1	ActionNote_App_5af50000	$1_McgInterop::McgHelpers.ThrowFailed	0x33
    2	ActionNote_App_5af50000	$1_McgInterop::ComCallHelpers.ComCall__HRESULT	0xA9
    3	ActionNote_App_5af50000	$1_McgInterop::ForwardComSharedStubs.Proc_TArg0___System.__Canon,_System.__Canon_	0x45
    4	ActionNote_App_5af50000	$55_UWPCore::Framework::Notifications::ToastService.Show	0x2D
    5	ActionNote_App_5af50000	$2_ActionNote::Common::Services::ActionCenterService.AddNotification	0xEB
    6	ActionNote_App_5af50000	$2_ActionNote::Common::Services::ActionCenterService::_Refresh_d__12.MoveNext	0xD3
    7	SharedLibrary	System::Runtime::ExceptionServices::ExceptionDispatchInfo.Throw	0x19
    8	SharedLibrary	$13_System::Runtime::CompilerServices::TaskAwaiter.ThrowForNonSuccess	0x53
    9	SharedLibrary	$13_System::Runtime::CompilerServices::TaskAwaiter.HandleNonSuccessAndDebuggerNotification	0x2D
    10	SharedLibrary	$13_System::Runtime::CompilerServices::TaskAwaiter.ValidateEnd	0x1D
    11	SharedLibrary	$13_System::Runtime::CompilerServices::ConfiguredTaskAwaitable::ConfiguredTaskAwaiter.GetResult	0xB
    12	ActionNote_App_5af50000	$0_ActionNote::App::App::_OnSuspendingAsync_d__16.MoveNext	0x1CF
    13	SharedLibrary	System::Runtime::ExceptionServices::ExceptionDispatchInfo.Throw	0x19
    14	SharedLibrary	$13_System::Runtime::CompilerServices::TaskAwaiter.ThrowForNonSuccess	0x53
    15	SharedLibrary	$13_System::Runtime::CompilerServices::TaskAwaiter.HandleNonSuccessAndDebuggerNotification	0x2D
    16	SharedLibrary	$13_System::Runtime::CompilerServices::TaskAwaiter.ValidateEnd	0x1D
    17	SharedLibrary	$13_System::Runtime::CompilerServices::ConfiguredTaskAwaitable::ConfiguredTaskAwaiter.GetResult	0xB
    18	ActionNote_App_5af50000	$55_UWPCore::Framework::Common::UniversalApp::__-ctor_b__40_1_d.MoveNext	0xCB
    19	SharedLibrary	System::Runtime::ExceptionServices::ExceptionDispatchInfo.Throw	0x19
    20	SharedLibrary	$13_System::Runtime::CompilerServices::AsyncMethodBuilderCore::__c._ThrowAsync_b__9_0	0x13
    21	SharedLibrary	$13_System::Threading::WinRTSynchronizationContext::Invoker.InvokeCore	0x33

    I think the most important part here are the 4 most top entries:

    Frame	Image	Function	Offset
    1	ActionNote_App_5af50000	$1_McgInterop::McgHelpers.ThrowFailed	0x33
    2	ActionNote_App_5af50000	$1_McgInterop::ComCallHelpers.ComCall__HRESULT	0xA9
    3	ActionNote_App_5af50000	$1_McgInterop::ForwardComSharedStubs.Proc_TArg0___System.__Canon,_System.__Canon_	0x45
    4	ActionNote_App_5af50000	$55_UWPCore::Framework::Notifications::ToastService.Show	0x2D

    Unfortunately, I'm not sure how to interpret the first 3 frames, because they do not reflect any of tmy 2 lines of code inside my Toast.Service.Show() method.

    DevCenter tells me that the failure name is:


    But according the the documentation of ToastNotifier or ToastNotificationManager, both of my called methods do not cause any exceptions.

    So, does anyone know how to interpret this? Because I do simply want to wrap this method with a simple-stuid try-catch-Exception block, because I really want to make sure that this ToastNotification will be shown to the user.

    Some information that might be usefull, just to make sure I'm not doing anything that is not allowed:

    • Within the app, I'm creating several toast notification in a row (in a for-loop, with no delay in between)
    • I'm calling this method when suspending my app, as well as in background tasks

    Thank you very much in advance!

    Wednesday, June 15, 2016 4:06 PM


All replies

  • Hi Benjamin Sautermeister,

    Welcome to the Developing Universal Windows apps forum!

    Please read the sticky posts, especially the Guide to posting: subject line tags and Known Issues for Windows 10 SDK and Tools  

    Since your app has published to windows store successfully. If you could not provide a reproducible code sample, it’s difficult to locate this issue.

    I suggest that you could contact our paid phone support at You will get 1:1 support on that. Please kindly note that your support ticket will be free if it is Microsoft's issue.

    Best Regards,

    Xavier Eoro

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, June 16, 2016 10:01 AM
  • Did you by chance figure out your issue?  I'm facing a similar situation with my app and i'm not sure what's going on (see failures in the dev center for background task creating notifications with the same error and stack trace you see, but can't repro locally).



    Sunday, July 17, 2016 7:02 PM
  • Bump. I'm having similar issues... The code worked fine in an earlier version of the app. Throwing this after app update:

    0 JamBoneDJpro $1_McgInterop::McgHelpers.ThrowFailed 0x3C
    1 JamBoneDJpro $1_McgInterop::ComCallHelpers.ComCall__HRESULT 0xC6
    2 JamBoneDJpro $1_McgInterop::ForwardComSharedStubs.Proc__System.__Canon_ 0x24
    3 JamBoneDJpro $0_JamBoneDJpro::MainPage.OnSuspending 0x1F
    4 JamBoneDJpro $1_Windows::UI::Xaml::Controls::Primitives::DragCompletedEventHandler.Invoke 0xE
    5 JamBoneDJpro $1_McgInterop::Intrinsics.HasThisCall__Proc_object__TArg0___System.__Canon_ 0x1C
    6 JamBoneDJpro $1_McgInterop::ReverseComSharedStubs.Proc_object__TArg0___System.__Canon_ 0x82

    Saturday, February 4, 2017 10:35 PM