Quantcast
Viewing all articles
Browse latest Browse all 81910

SIGABRT while debugging async methods

These methods used to work fine, but iOS rejected our latest App version because an unspecified error.

While debugging, they work fine, unless you go step by step after a breakpoint. After said methods finish, we get this exception:

´=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================´

We cannot progress and send the app to the store unless this gets corrected.

A brief example of one of our async methods:

async Task chargeLists () {
//Hide main screen
scroll.IsVisible = false;
//Show hidden screen with an ActivityIndicator and a "Loading" text
overlay.IsVisible = true;
await Task.Run (() => {
//Do something while thinking
});
//Hide creen with an ActivityIndicator
overlay.IsVisible = false;
//Show main screen
scroll.IsVisible = true;
}

This method is used in the first screen and is called by:

protected override async void OnAppearing () {
try {
await chargeLists ();
base.OnAppearing ();
} catch (Exception ex) {
Debug.WriteLine (string.Format ("Error: {0}", ex.Message));
}
}

protected override async void OnDisappearing () {
try {
await chargeLists ();
base.OnDisappearing ();
} catch (Exception ex) {
Debug.WriteLine (string.Format ("Error: {0}", ex.Message));
}
}

Please and thank you for your help.


Viewing all articles
Browse latest Browse all 81910

Trending Articles