uwp app (.net native) and unhandled exception
Asked Answered
S

1

5

I created uwp app(.Net native) for Windows 10 desktop. I use HockeyApp for collect live crash reports. Stack trace not informative. This is a long-standing problem and it does not have a solution. I tried this but it not working. I get these exceptions:

System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw
Arg_NullReferenceException

Microsoft.HockeyApp.Extensibility.Windows.UnhandledExceptionTelemetryModule.CoreApplication_UnhandledErrorDetected
 The parameter is incorrect. The parameter is incorrect.

On my computer the application works stably. Perhaps this is due to the versions of Windows. also I think that this is due to my xaml. It is very important for me to correct these mistakes. But I can not refuse the table. Any ideas how can I find the source of these errors?

Shavonda answered 28/12, 2017 at 6:46 Comment(0)
C
13

Sorry, this may not be an answer but I don't have enough room in the comments box.


Try the following in your App.xaml.cs. Add a handler to these events and see if they report something back to you about crashes.

public App()
{
    UnhandledException += OnUnhandledException;
    TaskScheduler.UnobservedTaskException += OnUnobservedException;

    InitializeComponent();
}

private static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
    // Occurs when an exception is not handled on the UI thread.


    // if you want to suppress and handle it manually, 
    // otherwise app shuts down.
    e.Handled = true; 
}

private static void OnUnobservedException(object sender, UnobservedTaskExceptionEventArgs e)
{
    // Occurs when an exception is not handled on a background thread.
    // ie. A task is fired and forgotten Task.Run(() => {...})


    // suppress and handle it manually.
    e.SetObserved();
}
Cloister answered 28/12, 2017 at 7:44 Comment(1)
e.Handled = true; has no bearing on the program terminating for me. Any idea what could be the cause for this?Disengagement

© 2022 - 2024 — McMap. All rights reserved.