我的应用程序出现错误,影响了将近80%的活跃用户。
似乎与线程有关
`com.twitter.crashlytics.ios.MachExceptionServer`
但是我一直无法找到它,最糟糕的是我什至不知道什么时候崩溃发生,我猜测是在应用程序在DidFinishLaunchingWithOptions方法中启动时发生的。 :/
希望您能帮帮我,我是这次崩溃跟踪的新手。
这是崩溃日志。
Incident Identifier: F627A1C2-A28A-4200-8920-1F77D3C0855C
CrashReporter Key: 88dbf413f263228712a90868f4c08e9d59a715f8
Hardware Model: iPhone10,4
Process: <APP_NAME> [1285]
Path: /private/var/containers/Bundle/Application/XXXXXXXXXXXXXXXXX/<APP_NAME>.app/<APP_NAME>
Identifier: xxx.xxxxxxxx.<APP_NAME>
Version: 34 (4.0.0)
AppStoreTools: 10B63
AppVariant: 1:iPhone10,4:12
Code Type: ARM-64 (Native)
Role: Non UI
Parent Process: launchd [1]
Coalition: xxx.xxxxxx.xxxxxx [677]
Date/Time: 2018-12-16 16:41:34.1689 -0600
Launch Time: 2018-12-16 15:52:00.9225 -0600
OS Version: iPhone OS 12.1 (16B92)
Baseband Version: 2.01.07
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000f262e3bc0
VM Region Info: 0xf262e3bc0 is not in any region. Bytes after previous region: 53790784449
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
MALLOC_NANO 0000000280000000-00000002a0000000 [512.0M] rw-/rwx SM=PRV
--->
UNUSED SPACE AT END
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [1285]
Triggered by Thread: 10
Thread 0 name:
Thread 0:
0 libsystem_kernel.dylib 0x0000000203c3bed0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000203c3b3a8 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x000000020403fbc4 __CFRunLoopServiceMachPort + 236 (CFRunLoop.c:2615)
3 CoreFoundation 0x000000020403aa60 __CFRunLoopRun + 1396 (CFRunLoop.c:2971)
4 CoreFoundation 0x000000020403a1cc CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247)
5 GraphicsServices 0x00000002062b1584 GSEventRunModal + 100 (GSEvent.c:2245)
6 UIKitCore 0x000000023127d054 UIApplicationMain + 212 (UIApplication.m:4347)
7 <APP_NAME> 0x0000000104ae4548 main + 17736 (AppDelegate.swift:22)
8 libdyld.dylib 0x0000000203afabb4 start + 4
Thread 1 name:
Thread 1:
0 libsystem_kernel.dylib 0x0000000203c3bed0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000203c3b3a8 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x000000020403fbc4 __CFRunLoopServiceMachPort + 236 (CFRunLoop.c:2615)
3 CoreFoundation 0x000000020403aa60 __CFRunLoopRun + 1396 (CFRunLoop.c:2971)
4 CoreFoundation 0x000000020403a1cc CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247)
5 Foundation 0x0000000204a2f404 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300 (NSRunLoop.m:367)
6 Foundation 0x0000000204a2f2b0 -[NSRunLoop(NSRunLoop) runUntilDate:] + 148 (NSRunLoop.m:411)
7 UIKitCore 0x000000023136a808 -[UIEventFetcher threadMain] + 136 (UIEventFetcher.m:603)
8 Foundation 0x0000000204b621ac __NSThread__start__ + 1040 (NSThread.m:1175)
9 libsystem_pthread.dylib 0x0000000203ccb2ac _pthread_body + 128 (pthread.c:857)
10 libsystem_pthread.dylib 0x0000000203ccb20c _pthread_start + 48 (pthread.c:884)
11 libsystem_pthread.dylib 0x0000000203ccecf4 thread_start + 4
Thread 2 name: com.twitter.crashlytics.ios.MachExceptionServer
Thread 2:
0 libsystem_kernel.dylib 0x0000000203c3bed0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000203c3b3a8 mach_msg + 72
2 <APP_NAME> 0x0000000104f0c490 CLSMachExceptionServer + 952
3 libsystem_pthread.dylib 0x0000000203ccb2ac _pthread_body + 128
4 libsystem_pthread.dylib 0x0000000203ccb20c _pthread_start + 48
5 libsystem_pthread.dylib 0x0000000203ccecf4 thread_start + 4
Thread 3 name:
Thread 3:
0 libsystem_kernel.dylib 0x0000000203c3bed0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000203c3b3a8 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x000000020403fbc4 __CFRunLoopServiceMachPort + 236 (CFRunLoop.c:2615)
3 CoreFoundation 0x000000020403aa60 __CFRunLoopRun + 1396 (CFRunLoop.c:2971)
4 CoreFoundation 0x000000020403a1cc CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247)
5 CFNetwork 0x000000020465b834 -[__CoreSchedulingSetRunnable runForever] + 212 (CoreSchedulingSet.mm:1365)
6 Foundation 0x0000000204b621ac __NSThread__start__ + 1040 (NSThread.m:1175)
7 libsystem_pthread.dylib 0x0000000203ccb2ac _pthread_body + 128 (pthread.c:857)
8 libsystem_pthread.dylib 0x0000000203ccb20c _pthread_start + 48 (pthread.c:884)
9 libsystem_pthread.dylib 0x0000000203ccecf4 thread_start + 4
Thread 4:
0 libsystem_pthread.dylib 0x0000000203ccece8 start_wqthread + 0
Thread 5:
0 libsystem_pthread.dylib 0x0000000203ccece8 start_wqthread + 0
Thread 6:
0 libsystem_pthread.dylib 0x0000000203ccece8 start_wqthread + 0
Thread 7:
0 libsystem_pthread.dylib 0x0000000203ccece8 start_wqthread + 0
Thread 8 name:
Thread 8:
0 libsystem_malloc.dylib 0x0000000203c80c74 nanov2_allocate_from_block$VARIANT$armv81 + 220
1 libsystem_malloc.dylib 0x0000000203c80040 nanov2_allocate$VARIANT$armv81 + 140
2 libsystem_malloc.dylib 0x0000000203c80040 nanov2_allocate$VARIANT$armv81 + 140
3 libsystem_malloc.dylib 0x0000000203c80540 nanov2_calloc$VARIANT$armv81 + 136
4 libsystem_malloc.dylib 0x0000000203c8db74 malloc_zone_calloc + 140 (malloc.c:1475)
5 libsystem_malloc.dylib 0x0000000203c8e3fc calloc + 40 (malloc.c:1731)
6 libobjc.A.dylib 0x0000000203290554 class_createInstance + 72 (objc-runtime-new.mm:0)
7 libdispatch.dylib 0x0000000203ae9ad8 _os_object_alloc_realized + 40 (object.m:55)
8 libdispatch.dylib 0x0000000203ae3af4 dispatch_data_create_concat$VARIANT$armv81 + 164 (data.c:118)
9 CFNetwork 0x00000002048b8ffc invocation function for block in ConnectionProtocolReadInner(nw_protocol*, unsigned int, unsigned int, bool, long long, void (dispatch_data_s*, CFStreamError) block_pointer, void (nw_frame_array_s*, CFStreamError) block_pointer) + 152 (ConnectionProtocol.cpp:771)
10 libnetwork.dylib 0x00000002050d3474 nw_frame_array_foreach + 48 (frame_internal.h:999)
11 CFNetwork 0x00000002048b64ac ConnectionProtocolReadInner(nw_protocol*, unsigned int, unsigned int, bool, long long, void (dispatch_data_s*, CFStreamError) block_pointer, void (nw_frame_array_s*, CFStreamError) block_pointer) + 408 (ConnectionProtocol.cpp:755)
12 CFNetwork 0x00000002048b6264 ConnectionProtocolServiceReads(nw_protocol*) + 380 (ConnectionProtocol.cpp:658)
13 CFNetwork 0x00000002048b7270 ConnectionProtocolInputAvailable(nw_protocol*, nw_protocol*) + 64 (ConnectionProtocol.cpp:964)
14 libboringssl.dylib 0x0000000204f34ac8 nw_boringssl_read + 532 (protocol_boringssl.m:1177)
15 libboringssl.dylib 0x0000000204f362a4 nw_protocol_boringssl_input_available + 120 (protocol_boringssl.m:1218)
16 libusrtcp.dylib 0x00000002053d8e9c nw_protocol_tcp_wake_read + 484 (protocol_tcp.c:269)
17 libusrtcp.dylib 0x00000002053c9774 nw_protocol_tcp_input_flush + 100 (user_north.c:40)
18 libnetwork.dylib 0x0000000205167474 nw_channel_add_input_frames + 4184 (channel.c:1096)
19 libnetwork.dylib 0x00000002051663b8 nw_channel_update_input_source + 136 (channel.c:1138)
20 libnetwork.dylib 0x0000000205165c08 __nw_channel_create_block_invoke.21 + 52 (channel.c:1960)
21 libdispatch.dylib 0x0000000203aea484 _dispatch_client_callout + 16 (object.m:511)
22 libdispatch.dylib 0x0000000203ac0e14 _dispatch_continuation_pop$VARIANT$armv81 + 404 (inline_internal.h:2441)
23 libdispatch.dylib 0x0000000203ad0ab4 _dispatch_source_invoke$VARIANT$armv81 + 1704 (source.c:568)
24 libdispatch.dylib 0x0000000203ac6d70 _dispatch_workloop_invoke$VARIANT$armv81 + 1892 (inline_internal.h:2482)
25 libdispatch.dylib 0x0000000203acdf14 _dispatch_workloop_worker_thread + 584 (queue.c:5889)
26 libsystem_pthread.dylib 0x0000000203ccc0dc _pthread_wqthread + 312 (pthread.c:2363)
27 libsystem_pthread.dylib 0x0000000203ccecec start_wqthread + 4
Thread 9:
0 libsystem_pthread.dylib 0x0000000203ccece8 start_wqthread + 0
Thread 10 name:
Thread 10 Crashed:
0 libobjc.A.dylib 0x0000000203298d70 objc_msgSend + 16
1 CoreData 0x0000000206c17754 -[_PFArray dealloc] + 100 (_PFArray.m:379)
2 libobjc.A.dylib 0x000000020329b38c (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 676 (NSObject.mm:1605)
3 libdispatch.dylib 0x0000000203aea464 _dispatch_last_resort_autorelease_pool_pop + 40 (object.m:488)
4 libdispatch.dylib 0x0000000203accddc _dispatch_root_queue_drain + 1080 (queue.c:6049)
5 libdispatch.dylib 0x0000000203acd35c _dispatch_worker_thread2 + 116 (queue.c:6072)
6 libsystem_pthread.dylib 0x0000000203ccc17c _pthread_wqthread + 472 (pthread.c:2353)
7 libsystem_pthread.dylib 0x0000000203ccecec start_wqthread + 4
Thread 11:
0 libsystem_pthread.dylib 0x0000000203ccece8 start_wqthread + 0
Thread 10 crashed with ARM Thread State (64-bit):
x0: 0x0000000280283bb0 x1: 0x00000002317c19b4 x2: 0x0000000000000001 x3: 0x0000000203c8019c
x4: 0x000000014a514400 x5: 0x0000000000000012 x6: 0x000000023b9c4000 x7: 0x000000016b77e538
x8: 0x0000000281685080 x9: 0x0000000000000000 x10: 0x0000000148860a00 x11: 0x0000002f0000003f
x12: 0x0000000148860d40 x13: 0x0000a69f262e3bb0 x14: 0x000000000000004c x15: 0x0000000080000000
x16: 0x0000000f262e3bb0 x17: 0x0000000206c0f138 x18: 0x0000000000000000 x19: 0x0000000282fc8b70
x20: 0x00000002317c19b4 x21: 0x000000000000000c x22: 0x0000000000000020 x23: 0x0000000000000015
x24: 0x0000000000000010 x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000000000000
x28: 0x000000016b77f0e0 fp: 0x000000016b77ea80 lr: 0x0000000206c17754
sp: 0x000000016b77ea40 pc: 0x0000000203298d70 cpsr: 0x20000000
AppDelegate
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
GeoBasedManager.instance.setCountry()
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
NotificationManager.shared.retrievePushNotifications()
FirebaseApp.configure()
SwiftDate.defaultRegion = Region.local
DropDown.startListeningToKeyboard()
return true
答案 0 :(得分:0)
线程com.twitter.crashlytics.ios.MachExceptionServer
是Crashlytics报告机制的一部分。它出现在Crashlytics生成的每个报告中,并且与您的问题无关。
从您的报告中,那个Triggered by Thread: 10
指示哪个线程有故障。由此可见,您看起来像是经典的过发行版。
Thread 10 name:
Thread 10 Crashed:
0 libobjc.A.dylib 0x0000000203298d70 objc_msgSend + 16
1 CoreData 0x0000000206c17754 -[_PFArray dealloc] + 100 (_PFArray.m:379)
2 libobjc.A.dylib 0x000000020329b38c (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 676 (NSObject.mm:1605)
3 libdispatch.dylib 0x0000000203aea464 _dispatch_last_resort_autorelease_pool_pop + 40 (object.m:488)
4 libdispatch.dylib 0x0000000203accddc _dispatch_root_queue_drain + 1080 (queue.c:6049)
5 libdispatch.dylib 0x0000000203acd35c _dispatch_worker_thread2 + 116 (queue.c:6072)
6 libsystem_pthread.dylib 0x0000000203ccc17c _pthread_wqthread + 472 (pthread.c:2353)
7 libsystem_pthread.dylib 0x0000000203ccecec start_wqthread + 4
从第2帧和第3帧中,您可以看到系统正在从内部调度队列中清除自动释放的对象。其中有一个对象已经被释放,但是现在又被释放。
这类错误可能会在各种外观不同的崩溃中显示出来。它们可能很难调试。如您所见,很难确定实际的过度释放发生在哪里。幸运的是,Apple提供了一些可以提供帮助的工具。查看仪器的僵尸功能。祝你好运!