Xamarin.iOS missing error report

jonathanpeppers

Posted on
May 10 2014

We have a situation in our Xamarin.iOS app where no crash is being reported.

The crash looks like this in the Xcode console:

May  9 15:06:49 iPad OurApp[1477] <Error>:   at <unknown> <0xffffffff>
May  9 15:06:49 iPad OurApp[1477] <Error>:   at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0xffffffff>
May  9 15:06:49 iPad OurApp[1477] <Error>:   at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/.pmcs-compat.UIApplication.cs:38
May  9 15:06:49 iPad OurApp[1477] <Error>:   at OurApp.iOS.Application.Main (string[]) [0x00012] in /Users/jonathanpeppers/Desktop/MonoTouch/OurApp/OurApp.iOS/Main.cs:16
May  9 15:06:49 iPad OurApp[1477] <Error>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
May  9 15:06:49 iPad OurApp[1477] <Error>: 
    Native stacktrace:
May  9 15:06:49 iPad OurApp[1477] <Error>:  0   OurApp                             0x00633579 mono_handle_native_sigsegv + 260
May  9 15:06:49 iPad OurApp[1477] <Error>:  1   OurApp                             0x0063c949 mono_sigsegv_signal_handler + 176
May  9 15:06:49 iPad OurApp[1477] <Error>:  2   libsystem_platform.dylib            0x39de0723 _sigtramp + 42
May  9 15:06:49 iPad OurApp[1477] <Error>:  3   libAVFAudio.dylib                   0x2dc78b83 <redacted> + 30
May  9 15:06:49 iPad OurApp[1477] <Error>:  4   Foundation                          0x2f6d4c23 <redacted> + 386
May  9 15:06:49 iPad OurApp[1477] <Error>:  5   CoreFoundation                      0x2ecb6fef <redacted> + 14
May  9 15:06:49 iPad OurApp[1477] <Error>:  6   CoreFoundation                      0x2ecb653d <redacted> + 340
May  9 15:06:49 iPad OurApp[1477] <Error>:  7   CoreFoundation                      0x2ecb4ca7 <redacted> + 630
May  9 15:06:49 iPad OurApp[1477] <Error>:  8   CoreFoundation                      0x2ec1f769 CFRunLoopRunSpecific + 524
May  9 15:06:49 iPad OurApp[1477] <Error>:  9   CoreFoundation                      0x2ec1f54b CFRunLoopRunInMode + 106
May  9 15:06:49 iPad OurApp[1477] <Error>:  10  GraphicsServices                    0x33b596d3 GSEventRunModal + 138
May  9 15:06:49 iPad OurApp[1477] <Error>:  11  UIKit                               0x3157e891 UIApplicationMain + 1136
May  9 15:06:49 iPad OurApp[1477] <Error>:  12  OurApp                             0x001f4468 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 272
May  9 15:06:49 iPad OurApp[1477] <Error>:  13  OurApp                             0x001b64c8 MonoTouch_UIKit_UIApplication_Main_string___string_string + 300
May  9 15:06:49 iPad OurApp[1477] <Error>:  14  OurApp                             0x000f4184 OurApp_iOS_Application_Main_string__ + 232
May  9 15:06:49 iPad OurApp[1477] <Error>:  15  OurApp                             0x00355e38 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
May  9 15:06:49 iPad OurApp[1477] <Error>:  16  OurApp                             0x0063eaa1 mono_jit_runtime_invoke + 1196
May  9 15:06:49 iPad OurApp[1477] <Error>:  17  OurApp                             0x0067cfcd mono_runtime_invoke + 88
May  9 15:06:49 iPad OurApp[1477] <Error>:  18  OurApp                             0x00680c83 mono_runtime_exec_main + 282
May  9 15:06:49 iPad OurApp[1477] <Error>:  19  OurApp                             0x00680acb mono_runtime_run_main + 426
May  9 15:06:49 iPad OurApp[1477] <Error>:  20  OurApp                             0x0062ca7d mono_jit_exec + 48
May  9 15:06:49 iPad OurApp[1477] <Error>:  21  OurApp                             0x006b3648 main + 2484
May  9 15:06:49 iPad OurApp[1477] <Error>:  22  libdyld.dylib                       0x39cc6ab7 <redacted> + 2
May  9 15:06:49 iPad OurApp[1477] <Error>: 
    =================================================================
    Got a SIGSEGV while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries 
    used by your application.
    =================================================================

In Xamarin Studio, the app just closes and detaches the debugger immediately if we cause this to happen. It is a fairly random occurrence. However, Raygun never logs anything for us. We also have our dSym file uploaded.


Jason Fauchelle

Raygun

Posted on
May 12 2014

Hello Jonathan

We have had a couple of similar reports of certain crash scenarios not being detected by Raygun. Thanks for sending the stack trace, this will help us look into this further. If there is any other information that you can provide to help us reproduce this crash, that would be a huge help to finding if there is a way to detect these exceptions. I will be looking into this throughout this week.

-Jason Fauchelle


jonathanpeppers

Posted on
May 13 2014

Yeah this crash was so random, it's hard to send you an example. If I find a way to reproduce this, I'll send it to you.

I think you could try to reproduce it by:

1) Make an Objective-C library with a method that crashes the app 2) Call the library from a C# binding, where it crashes in the native Objective-C code

On #2 if everything works, you should try invoking the method inside of a BeginInvokeOnMainThread call or NSTimer.


Jason Fauchelle

Raygun

Posted on
May 13 2014

Thanks Jonathan

These steps will be a great help to determine if Raygun can catch these types of exceptions. I'll get back to you with what we find.

-Jason Fauchelle


Reply