Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App crashes when Crashlytics catches an exception

I've integrated Crashlytics into my Xamarin.iOS project, Crashlytics starts, application appeared at crashlytics site. But then, when crashlytics catches exception, it crashes with the next error:

signal %d, info %p, uapVoid %p

Unable to setup stack %s

I'm starting crashlytics and AppDomain.CurrentDomain.UnhandledException like this (method description):

public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
    IntPtr sigbus = Marshal.AllocHGlobal (512);
    IntPtr sigsegv = Marshal.AllocHGlobal (512);

    // Store Mono SIGSEGV and SIGBUS handlers
    sigaction (Signal.SIGBUS, IntPtr.Zero, sigbus);
    sigaction (Signal.SIGSEGV, IntPtr.Zero, sigsegv);

    ...

    Crashlytics.Crashlytics.StartWithAPIKey("myApiKeyHere");
    AppDomain.CurrentDomain.UnhandledException += (object sender, UnhandledExceptionEventArgs e) => {
        ...
    };

    sigaction (Signal.SIGBUS, sigbus, IntPtr.Zero);
    sigaction (Signal.SIGSEGV, sigsegv, IntPtr.Zero);

    Marshal.FreeHGlobal (sigbus);
    Marshal.FreeHGlobal (sigsegv);

    return true;
}
like image 519
folex Avatar asked Nov 12 '22 22:11

folex


1 Answers

If you're looking for an officially supported crash reporter for Xamarin, Crittercism just released our bindings here:

http://components.xamarin.com/view/crittercism

like image 132
crittercismrob Avatar answered Nov 15 '22 07:11

crittercismrob