Forum Xamarin Xamarin.iOS

Hockey App not getting SIG crash errors

brianduccabrianducca ARMember ✭✭
edited September 2016 in Xamarin.iOS

Hello everybody, i have an Xamarin.iOS app and i'm implementing Hockey App to follow my crashes. But when i'm testing in my iOS Simulator, i got a SIG error and the app crashes, when i open it again , it's supposed that it'll send the crash to Hockey App but it's not working, it only works for exceptions. Also i've added handlers for UnhandledException & UnobservedTaskException.

Added some code here:

 public override bool FinishedLaunching(UIApplication app, NSDictionary options)

            //Rethrow all unhandled exceptions on the UI thread
            AppDomain.CurrentDomain.UnhandledException += (sender, e) => {
                InvokeOnMainThread(() => {
                    throw (Exception)e.ExceptionObject;
            System.Threading.Tasks.TaskScheduler.UnobservedTaskException += (sender, e) => {
                InvokeOnMainThread(() => {
                    throw (Exception)e.Exception;
    return base.FinishedLaunching(app, options);

Still in AppDelegate.cs:

        private static extern int sigaction(Signal sig, IntPtr act, IntPtr oact);

        enum Signal
            SIGBUS = 10,
            SIGSEGV = 11

        static void EnableCrashReporting()
            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);

            // Enable crash reporting libraries

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

        static void EnableCrashReportingUnsafe()

            var manager = BITHockeyManager.SharedHockeyManager;
            manager.CrashManager.CrashManagerStatus = BITCrashManagerStatus.AutoSend;

Sign In or Register to comment.