Xamarin iOS:一个EXC_CRASH,无法理解日志的内容

时间:2017-07-06 04:36:48

标签: ios xamarin crash-reports

我有一个关于崩溃的崩溃日志,但不知道崩溃是什么

  Incident Identifier: 12D4E7E8-D09B-44B6-9E5C-216223C75C76
CrashReporter Key:   4c344eeca1fe853d12dc884970218feefdb6cdc2
Hardware Model:      iPad4,1
Process:             Provider.iOS [556]
Path:                /private/var/containers/Bundle/Application/B37F718C-171F-43C7-99AB-AFF5CA5F3D86/Provider.iOS.app/Provider.iOS
Identifier:          com.application.cheetah
Version:             1.0.30 (1.0.0)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.application.cheetah [630]


Date/Time:           2017-07-06 15:55:01.9326 +1200
Launch Time:         2017-07-06 14:49:31.6289 +1200
OS Version:          iPhone OS 10.3.2 (14F89)
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Application Specific Information:
abort() called

Filtered syslog:
None found

Thread 0 name:  tid_403  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x0000000183ea5014 __pthread_kill + 8
1   libsystem_pthread.dylib         0x0000000183f6f264 pthread_kill + 112
2   libsystem_c.dylib               0x0000000183e199c4 abort + 140
3   Provider.iOS                    0x0000000101a71430 xamarin_printf (runtime.m:2167)
4   Provider.iOS                    0x000000010196fe48 mono_invoke_unhandled_exception_hook (exception.c:1120)
5   Provider.iOS                    0x0000000101929c20 mono_handle_exception_internal (mini-exceptions.c:1893)
6   Provider.iOS                    0x0000000101928c44 mono_handle_exception (mini-exceptions.c:2126)
7   Provider.iOS                    0x0000000101920bd4 mono_arm_throw_exception (exceptions-arm64.c:410)
8   Provider.iOS                    0x00000001003287b8 throw_exception + 168
9   Provider.iOS                    0x000000010021190c System_Runtime_ExceptionServices_ExceptionDispatchInfo_Throw + 44
10  Provider.iOS                    0x0000000100214004 System_Runtime_CompilerServices_AsyncMethodBuilderCore__c__ThrowAsyncb__6_0_object + 84
11  Provider.iOS                    0x0000000100c670d8 UIKit_UIKitSynchronizationContext__Postc__AnonStorey0__m__0 (UIKitSynchronizationContext.cs:24)
12  Provider.iOS                    0x0000000100c55644 Foundation_NSAsyncActionDispatcher_Apply (NSAction.cs:163)
13  Provider.iOS                    0x00000001002f3ac4 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
14  Provider.iOS                    0x0000000101938cfc mono_jit_runtime_invoke (mini-runtime.c:2510)
15  Provider.iOS                    0x00000001019b1b58 do_runtime_invoke (object.c:2860)
16  Provider.iOS                    0x00000001019b1ab4 mono_runtime_invoke (object.c:3018)
17  Provider.iOS                    0x0000000101880104 native_to_managed_trampoline_3(objc_object*, objc_selector*, _MonoMethod**, unsigned int) (registrar.m:106)
18  Provider.iOS                    0x000000010188065c -[__MonoMac_NSAsyncActionDispatcher xamarinApplySelector] (registrar.m:7022)
19  Foundation                      0x000000018599e4cc __NSThreadPerformPerform + 340
20  CoreFoundation                  0x0000000184e5942c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
21  CoreFoundation                  0x0000000184e58d9c __CFRunLoopDoSources0 + 540
22  CoreFoundation                  0x0000000184e569a8 __CFRunLoopRun + 744
23  CoreFoundation                  0x0000000184d86da4 CFRunLoopRunSpecific + 424
24  GraphicsServices                0x00000001867f0074 GSEventRunModal + 100
25  UIKit                           0x000000018b03a058 UIApplicationMain + 208
26  Provider.iOS                    0x0000000100cc33d4 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr (/<unknown>:1)
27  Provider.iOS                    0x0000000100c6bc6c UIKit_UIApplication_Main_string___intptr_intptr (UIApplication.cs:79)
28  Provider.iOS                    0x0000000100c6bc2c UIKit_UIApplication_Main_string___string_string (UIApplication.cs:63)
29  Provider.iOS                    0x0000000100041b44 Provider_iOS_Application_Main_string__ (Main.cs:17)
30  Provider.iOS                    0x00000001002f3ac4 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
31  Provider.iOS                    0x0000000101938cfc mono_jit_runtime_invoke (mini-runtime.c:2510)
32  Provider.iOS                    0x00000001019b1b58 do_runtime_invoke (object.c:2860)
33  Provider.iOS                    0x00000001019b4d7c do_exec_main_checked (object.c:4681)
34  Provider.iOS                    0x000000010191d558 mono_jit_exec (driver.g.c:1037)
35  Provider.iOS                    0x0000000101a7e1ec xamarin_main (monotouch-main.m:480)
36  Provider.iOS                    0x00000001018a6310 main (main.m:173)
37  libdyld.dylib                   0x0000000183d9559c start + 4

有没有人知道这个崩溃报告引用了什么?

2 个答案:

答案 0 :(得分:1)

这对我有用:

检查支持的架构

enter image description here

清理并重建您的项目。

答案 1 :(得分:0)

很难说,但我可能会建议您的应用程序崩溃的根本原因可能是内存泄漏的结果,因为您的应用程序可能会分配太多内存,然后在使用后可能无法正确释放内存。从该日志中,您无法获得更多信息。我的建议是连接设备并在其上构建。在模拟器上构建可能不起作用,因为桌面具有比移动设备明显更多的可用内存。

如果无法在连接的设备上重现(有时可能会发生)。您可以使用一个hack从设备获取有关崩溃的更多信息。由于您的所有代码都是可执行的,因此可以轻松捕获我将UIaaplication.Main函数包装到try-catch块中的大量崩溃,并将异常字符串保存在设备的某处。

Main.cs中的

public class Application {
    static void Main(string[] args) {
        try {
            UIApplication.Main(args: args, principalClassName: null, delegateClassName: typeof(AppDelegate).Name);
        } catch (Exception e) {
            // save e.ToString() somewhere
        }
    }
}