Task_disconnected_while_still_running

I have a Windows Phone 8.1 Rt application that widely uses the Background Uploader and downloader classes. I did some good testing and updated the app in the store. According to the crash log in the dev center, the application crashes for end users. Unfortunately, the log provided in the dev center does not have additional details and does not have a useful stack trace.

Task_disconnected_while_still_running :. _server_task_currentState _ = _ Hide, targetState = _Inactive

This is all the information I have about the disaster. I tried to implement the log by crushing all the basic functions in catch catch blocks and limiting the number of elements in the backgroundUploader class, but the crashes just don't get any less. Go find no help on the developer forums.

Please shed light on what exactly causes such a crash and how to deal with it.

Thanks in advance.

+4
source share
1 answer

You can catch all unhandled exceptions from the App.xaml.cs class where you are signing the UnhandledException event in the constructor:

  public App() { InitializeComponent(); UnhandledException += OnUnhandledException; } protected override void OnUnhandledException(object sender, UnhandledExceptionEventArgs e) { // Optionally use e.Handled = true; // Send to Google Ananlytics } 

The e.Handled=true line e.Handled=true prevent your application from crashing, but it is not recommended to use it, because it is likely that your application will no longer be in a healthy state after an exception occurs.

In my projects, I use Google Analytics to log all of my exceptions.

0
source

All Articles