Xamarin.iOS app crashes on startup on iOS13 RRS feed

  • Question

  • User133261 posted

    I have severe issue with my Xamarin.iOS app in the AppStore. It started crashing on iOS13 beta. Rebuilding the app with the latest SDKs and tools did not help. Any ideas what is the problem? I don't find anything useful from the crash logs. Anything is of course possible but to me this looks like a high level issue in Xamarin.iOS.

    Please see details here: https://stackoverflow.com/questions/57982260/xamarin-ios-app-crashes-on-startup-on-ios13

    Friday, September 20, 2019 7:58 AM

All replies

  • User133261 posted

    In the crash log there reads:

        Exception Type:  EXC_BAD_ACCESS (SIGABRT)
        Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000018

    Can it still be normal C# / .NET exception which happens or does that indicate some low level crash?

    If there is a C# exception (which I could catch) should I see the exception class or other details in this crash log?

    Friday, September 20, 2019 8:44 AM
  • User389291 posted

    Hi, I have a similar problem with an app hosted on Intune. When the app opens, it shows the dark screen after the launch image. If I install it from mac, works correctly. No debug errors. I hope we find a solution soon.

    Wednesday, September 25, 2019 12:16 PM
  • User133261 posted

    I found the reason for the crash (see https://stackoverflow.com/questions/57982260/xamarin-ios-app-crashes-on-startup-on-ios13). I learnt from this case that with Xamarin you can easily spend days or even weeks on investigating a simple crash issue as those crash logs are pretty useless. At the moment I am investigating other iOS 13 related crashes too, same situation. Reading those crash logs is mostly waste of time. You have to debug issues using some other methods.

    Monday, September 30, 2019 1:15 PM
  • User240468 posted

    Hi @kine

    Do you have any update on this issue as I am facing the same issue but the xamarin log is useless. The app always crash on app launch in iOS 13. I applied multiple ways to resolve this but still on the same stage. Help will be appreciated.

    Thanks in advance.

    Wednesday, October 2, 2019 7:31 AM
  • User133261 posted

    So you cannot reproduce the issue yourself? In that case try something like this:

        public class Application
            static void Main(string[] args)
                    UIApplication.Main(args, null, "AppDelegate");
                catch (Exception ex)
                    // TODO:
                    // Send here the exception details e.g. to Google Analytics or
                    // save exception details to a file and display it to user
                    // on the next startup and ask user to send a screenshot to you.

    From what I know it is not possible to display a dialog box in the catch block here because the app is already closing. That's why you should try to show it in the next startup. Show it only once on the next startup and stop app execution there (to prevent the crash when showing the error dialog).

    Also it may be useful to read the application output log when you run your app under the debugger. Even if it doesn't crash in your device the output log may contain some errors or warnings you should fix. I found couple of iOS 13 related issues this way. Check also any compiler warnings.

    You may also find this article useful https://docs.microsoft.com/en-us/xamarin/ios/platform/exception-marshaling

    Wednesday, October 2, 2019 8:01 AM
  • User388993 posted

    To get console output for a crash like this on a release version on device:
    connect your device to your Mac open XCode go to Window -> Devices and Simulators click Open Console for your device type your app name in the search window to filter the output

    I found our exception that way. The crash log posted didn't help, because it's just the apple main thread crashing.

    For us the crash was caused by using a deprecated class, namely UISearchDisplayController, which should be replaced by UISearchController.
    It continued to work in iOS12, but not in iOS13. It was deprecated in iOS8 though i think, so fair enough.

    You may have to upload the app to App Store Connect and run it via TestFlight to see the logs, not sure.

    Also, this is probably irrelevant, but go to your iPhone settings -> privacy -> Analytics -> Share with App Developers and Share iPhone Analytics

    Thursday, October 3, 2019 10:29 AM
  • User36095 posted


    I had the same problem with my app after updating Xamarin Studio and after trying more than 20 different solutions and searching in all forums and stackoverflow it turns out that Visual Studio for mac sometimes adds more than one MtouchLink configuration in *iOS.csproj file : <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' "> ... <MtouchLink>SdkOnly</MtouchLink> <MtouchLink>Full</MtouchLink> In my case the IDE was saving two linker behaviors configurations and the app was crashing after showing the LaunchScreen image, only in release mode

    To correct it I just edited the *iOS.csproj file with SublimeText and deleted the line : <MtouchLink>Full</MtouchLink>

    Hope it helps, Samuel

    Wednesday, February 19, 2020 5:42 AM