帮助理解MonoTouch崩溃日志

时间:2011-03-24 20:19:31

标签: xamarin.ios

我的MonoTouch应用程序(发布版本)随机崩溃,我在崩溃日志中得到了这个。不幸的是,我没有看到任何与我的应用相关的有用信息。看起来它在MonoTouch和iOS的内部深处。

我在带有OS 3.1.2的iPhone 3G上运行。

任何人都可以帮我理解崩溃日志的含义吗?


Incident Identifier: 222781AB-0F7C-4E1D-9E10-6EE946D6C320
CrashReporter Key:   0ee985a48f32f63b7e50536870f06a1ab4122600
Process:         MyApp_iOS [593]
Path:            /var/mobile/Applications/095A615B-2F9B-4A84-B0E3-EF1246915594/MyApp_iOS.app/MyApp_iOS
Identifier:      MyApp_iOS
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2011-03-24 13:04:18.479 -0700
OS Version:      iPhone OS 3.1.2 (7D11)
Report Version:  104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread:  0

Thread 0 Crashed:
0   dyld                              0x2fe125b2 ImageLoaderMachOCompressed::findExportedSymbol(char const*, ImageLoader const**) const + 58
1   dyld                              0x2fe0dcd6 ImageLoaderMachO::findExportedSymbol(char const*, bool, ImageLoader const**) const + 30
2   dyld                              0x2fe0ee6e ImageLoaderMachOClassic::resolveUndefined(ImageLoader::LinkContext const&, macho_nlist const*, bool, bool, ImageLoader const**) + 434
3   dyld                              0x2fe10250 ImageLoaderMachOClassic::doBindLazySymbol(unsigned long*, ImageLoader::LinkContext const&) + 212
4   dyld                              0x2fe037ae dyld::bindLazySymbol(mach_header const*, unsigned long*) + 94
5   dyld                              0x2fe0e29c stub_binding_helper_interface + 12
6   MyApp_iOS                         0x0071a754 mono_handle_native_sigsegv (mini-exceptions.c:1762)
7   MyApp_iOS                         0x0073d900 sigabrt_signal_handler (mini-posix.c:155)
8   libSystem.B.dylib                 0x0008e81c _sigtramp + 28
9   libSystem.B.dylib                 0x00033904 semaphore_wait_signal + 4
10  libSystem.B.dylib                 0x00003ca8 pthread_mutex_lock + 440
11  MyApp_iOS                         0x0088e76c GC_lock (pthread_support.c:1679)
12  MyApp_iOS                         0x00884970 GC_malloc_atomic (malloc.c:259)
13  MyApp_iOS                         0x007f26e4 mono_object_new_ptrfree_box (object.c:3996)


[... there are 10 active threads but I've only included the one that crashed]


Thread 0 crashed with ARM Thread State:
    r0: 0x00000000    r1: 0x0097dc97      r2: 0x344d7c3c      r3: 0x344dd2bd
    r4: 0x344dd2bd    r5: 0x00005681      r6: 0x0097dc97      r7: 0x2fffe6d8
    r8: 0x344e7f34    r9: 0x00000001     r10: 0x0000007f     r11: 0x0097dc97
    ip: 0x344d8e4c    sp: 0x2fffe658      lr: 0x2fe0dcdd      pc: 0x2fe125b2
  cpsr: 0x20000030

1 个答案:

答案 0 :(得分:5)

我发现的另一个诊断选项是:

  1. 连接AppDomain.CurrentDomain.UnhandledException
  2. 在整个“static void Main()”方法中放置一个try-catch
  3. 在两个原因中都将异常写入Console.WriteLine()。

    然后运行您的应用程序,打开XCode并在设备插入时打开控制台窗口。然后导致崩溃。您应该能够看到异常的C#堆栈跟踪。

    这帮助我解决了许多只在设备上发布时才会发生的问题。