简体   繁体   中英

Xamarin iOS: A EXC_CRASH, unable to understand what the log is about

I have a crash log saying about the crash but no idea what that crash is

  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

Does anyone have any idea what this crash report refer to?

this works for me:

Check de supported Architecture

在此处输入图片说明

Clean and rebuild your project.

It's hard to say, but I may suggest that the root cause of your app crash could be the result of memory leaks due to the fact that your app may allocate too much memory and then perhaps does not correctly release the memory after usage. From that log, you can't get more information. My suggestion will be to connect a device and build on it. Building on simulator may not work because desktop has significantly more available ram than a mobile device.

If it's not possible to reproduce on a connected device (sometimes that may happen). You can use one hack to get more information about the crash from a device. Since all your code is executable throw mono runtime, you can easily catch lots of crashed my wrapping your UIaaplication.Main function into a try-catch block, and save the exception string somewhere on the device.

in 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
        }
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM