I'm seeing crashlogs being generated containing the following call stack
Thread : Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x38a0a1f0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x38a74797 pthread_kill + 58
2 libsystem_c.dylib 0x389bafdd abort + 76
3 libsystem_malloc.dylib 0x38a32d67 free + 382
4 libobjc.A.dylib 0x3844e3ad object_dispose + 20
5 UIKit 0x305511ef -[UIViewAnimationState dealloc] + 174
6 libobjc.A.dylib 0x38456b6b objc_object::sidetable_release(bool) + 174
7 CoreFoundation 0x2dc2d93d CFRelease + 556
8 QuartzCore 0x30195635 CA::release_objects(X::List<void const*>*) + 16
9 QuartzCore 0x3019aad7 -[CAAnimation dealloc] + 54
10 libobjc.A.dylib 0x38456b6b objc_object::sidetable_release(bool) + 174
11 CoreFoundation 0x2dc2d93d CFRelease + 556
12 QuartzCore 0x3019d117 CA::Layer::run_animation_callbacks(void*) + 238
13 libdispatch.dylib 0x3892f81f _dispatch_client_callout + 22
14 libdispatch.dylib 0x3893649f _dispatch_main_queue_callback_4CF$VARIANT$mp + 278
15 CoreFoundation 0x2dcc78f1 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
16 CoreFoundation 0x2dcc61c5 __CFRunLoopRun + 1300
17 CoreFoundation 0x2dc30f0f CFRunLoopRunSpecific + 522
18 CoreFoundation 0x2dc30cf3 CFRunLoopRunInMode + 106
19 GraphicsServices 0x32b52663 GSEventRunModal + 138
20 UIKit 0x3057c16d UIApplicationMain + 1136
21 Domino M 0x000c125f main (main.m:14)
Other threads only show the AFNetworking library doing something.
How can I find and fix issues like this (the ones that don't seem to have anything to do with self written code)?
Related
We have encountered the crash : -[WKSyntheticTapGestureRecognizer setState:] in our app.I am also attaching crash report for the reference:
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x1540 objc_msgSend + 32
1 WebKit 0x4a6bd8 -[WKSyntheticTapGestureRecognizer setState:] + 100
2 UIKitCore 0x2bb320 -[UITapRecognizer tooSlow:] + 76
3 Foundation 0x365fc __NSFireDelayedPerform + 460
4 CoreFoundation 0xae318 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
5 CoreFoundation 0x32cf0 __CFRunLoopDoTimer + 1076
6 CoreFoundation 0x2d4ec __CFRunLoopDoTimers + 328
7 CoreFoundation 0xbd08 __CFRunLoopRun + 1944
8 CoreFoundation 0x1f468 CFRunLoopRunSpecific + 600
9 GraphicsServices 0x138c GSEventRunModal + 164
10 UIKitCore 0x51a088 -[UIApplication _run] + 1100
11 UIKitCore 0x298958 UIApplicationMain + 2092
12 Adoddle Field Plus 0x1238f0 main + 17 (main.mm:17)
13 ??? 0x10817daa4 (Missing)
KERN_INVALID_ADDRESS at 0x0000000000000010
Like WKSyntheticTapGesturestabilizer has been released and is still accessing its member variables
I'm getting a crash, reported in Crashlytics, and I have no idea how to reproduce the error, It happens randomly so it's hard to debug it with Xcode. Any ideas?
Crashed: NSOperationQueue 0x11f10ac10 (QOS: UNSPECIFIED)
0 libsystem_kernel.dylib 0x1b5efe84c __pthread_kill + 8
1 libsystem_pthread.dylib 0x1d211a9e8 pthread_kill + 212
2 libsystem_c.dylib 0x1934bd8f4 abort + 100
3 libsystem_malloc.dylib 0x199b73030 _malloc_put + 554
4 libsystem_malloc.dylib 0x199b732a4 malloc_zone_error + 100
5 libsystem_malloc.dylib 0x199b732e0 nanov2_allocate_from_block$VARIANT$mp.cold.1 + 36
6 libsystem_malloc.dylib 0x199b58498 nanov2_find_block_and_allocate$VARIANT$mp + 510
7 libsystem_malloc.dylib 0x199b57710 nanov2_allocate$VARIANT$mp + 124
8 libsystem_malloc.dylib 0x199b57644 nanov2_malloc$VARIANT$mp + 60
9 libsystem_malloc.dylib 0x199b689ac _malloc_zone_malloc + 144
10 CoreFoundation 0x18a6b7c14 -[__NSArrayM insertObject:atIndex:] + 264
11 CoreFoundation 0x18a756fdc __CFSetApplyFunction_block_invoke + 24
12 CoreFoundation 0x18a7f86f0 CFBasicHashApply + 136
13 CoreFoundation 0x18a756f9c CFSetApplyFunction + 192
14 CoreFoundation 0x18a747e50 CFRunLoopCopyAllModes + 136
15 CoreFoundation 0x18a74c4ec __CFRunLoopSourceRemoveFromRunLoop + 64
16 CoreFoundation 0x18a6ebab4 __CFBagApplyFunction_block_invoke + 48
17 CoreFoundation 0x18a7f86f0 CFBasicHashApply + 136
18 CoreFoundation 0x18a6eba5c CFBagApplyFunction + 84
19 CoreFoundation 0x18a74c450 CFRunLoopSourceInvalidate + 208
20 Realm 0x102993634 realm::util::EventLoopSignal<realm::_impl::WeakRealmNotifier::Callback>::~EventLoopSignal() + 24
21 Realm 0x102888c70 realm::_impl::RealmCoordinator::unregister_realm(realm::Realm*) + 388
22 Realm 0x10295a858 realm::Realm::~Realm() + 40
23 Realm 0x10284c210 std::__1::shared_ptr<realm::_impl::CollectionNotifier>::~shared_ptr() + 64
24 libobjc.A.dylib 0x19eb37ae0 object_cxxDestructFromClass(objc_object*, objc_class*) + 112
25 libobjc.A.dylib 0x19eb4d8a4 objc_destructInstance + 88
26 libobjc.A.dylib 0x19eb546ec _objc_rootDealloc + 52
27 Realm 0x10292bcac -[RLMRealm dealloc] + 92
28 libobjc.A.dylib 0x19eb57574 AutoreleasePoolPage::releaseUntil(objc_object**) + 200
29 libobjc.A.dylib 0x19eb57450 objc_autoreleasePoolPop + 208
30 libswiftObjectiveC.dylib 0x1aea1bf4c autoreleasepool<A>(invoking:) + 68
31 Foresight 0x100eaad74 specialized BloodPressureDataManager.getUnSyncedReadings(getHistoricData:fromAppleHealth:) + 441 (BloodPressure.swift:441)
32 Foresight 0x100fccd14 specialized CloudDataManager.syncAllVitalData(withType:syncHistoricalData:fromAppleHealth:_:) + 408 (VitalDataManager.swift:408)
33 Foresight 0x100dba408 SyncAllVitalOperation.main() + 4310885384 (<compiler-generated>:4310885384)
34 Foresight 0x100dba560 #objc SyncAllVitalOperation.main() + 4310885728 (<compiler-generated>:4310885728)
35 Foresight 0x101340af4 #objc SynchronizationOperation.start() + 4316678900 (<compiler-generated>:4316678900)
36 Foundation 0x18ba84f98 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 20
37 Foundation 0x18ba84a64 __NSOQSchedule_f + 180
38 libdispatch.dylib 0x18a3b775c _dispatch_block_async_invoke2 + 104
39 libdispatch.dylib 0x18a408280 _dispatch_client_callout + 16
40 libdispatch.dylib 0x18a3ad390 _dispatch_continuation_pop$VARIANT$mp + 412
41 libdispatch.dylib 0x18a3acad4 _dispatch_async_redirect_invoke + 596
42 libdispatch.dylib 0x18a3b9f3c _dispatch_root_queue_drain + 376
43 libdispatch.dylib 0x18a3ba704 _dispatch_worker_thread2 + 124
44 libsystem_pthread.dylib 0x1d211b568 _pthread_wqthread + 212
45 libsystem_pthread.dylib 0x1d211e874 start_wqthread + 8
Please help me how to reproduce and debug this type of crash and What i need to check in my code related to crash.
Error Message
0 Crashed: com.apple.main-thread EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x0000000c raw
0 libobjc.A.dylib objc_msgSend + 5 performSelector:withObject:
7 UIKit -[UIViewController dealloc] + 1798
8 Cxxxxxx AFQueryStringPairsFromKeyAndValue + 7759031
9 libsystem_blocks.dylib _Block_release + 216
10 libdispatch.dylib _dispatch_after_timer_callback + 66
11 libdispatch.dylib _dispatch_client_callout + 22
12 libdispatch.dylib _dispatch_source_latch_and_call + 2042
13 libdispatch.dylib _dispatch_source_invoke + 738
14 libdispatch.dylib _dispatch_main_queue_callback_4CF + 394
15 CoreFoundation __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
16 CoreFoundation __CFRunLoopRun + 1590
17 CoreFoundation CFRunLoopRunSpecific + 516
18 CoreFoundation CFRunLoopRunInMode + 108
19 GraphicsServices GSEventRunModal + 160
20 UIKit UIApplicationMain + 144
21 Cxxxxxxx main.m line 15 main
22 libdyld.dylib start + 2
I'm trying to analyze a log for what appears to be an intermittent crash.
Here's the stack trace for the thread that throws the exception:
Thread : Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x2ab5f49f __exceptionPreprocess + 126
1 libobjc.A.dylib 0x38315c8b objc_exception_throw + 38
2 CoreFoundation 0x2ab5f3e5 -[NSException initWithCoder:]
3 Foundation 0x2b862389 -[NSProxy doesNotRecognizeSelector:] + 68
4 CoreFoundation 0x2ab627d7 ___forwarding___ + 714
5 CoreFoundation 0x2aa94058 _CF_forwarding_prep_0 + 24
6 UIKit 0x292648cb -[UIScrollViewAccessibility _axCleanupDelegateClearer] + 98
7 UIKit 0x29264965 -[UIScrollViewAccessibility dealloc] + 60
8 UIKit 0x2e19c8b1 -[UITableView dealloc] + 1572
9 UIKit 0x2924dc91 -[UITableViewAccessibility dealloc] + 172
10 libobjc.A.dylib 0x38314da1 object_cxxDestructFromClass(objc_object*, objc_class*) + 116
11 libobjc.A.dylib 0x3831e5f7 objc_destructInstance + 34
12 libobjc.A.dylib 0x3831e61b object_dispose + 14
13 UIKit 0x2e3214d1 -[UIResponder dealloc] + 96
14 UIKit 0x2e18eb55 -[UIViewController dealloc] + 1760
15 CoreFoundation 0x2aa6600d CFRelease + 600
16 CoreFoundation 0x2aa7968f -[__NSArrayI dealloc] + 66
17 libobjc.A.dylib 0x3832fd5f objc_object::sidetable_release(bool) + 166
18 libobjc.A.dylib 0x383301a9 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 404
19 CoreFoundation 0x2aa71149 _CFAutoreleasePoolPop + 16
20 UIKit 0x2e01789f _wrapRunLoopWithAutoreleasePoolHandler + 42
21 CoreFoundation 0x2ab25d95 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
22 CoreFoundation 0x2ab23453 __CFRunLoopDoObservers + 278
23 CoreFoundation 0x2ab2385b __CFRunLoopRun + 914
24 CoreFoundation 0x2aa713c1 CFRunLoopRunSpecific + 476
25 CoreFoundation 0x2aa711d3 CFRunLoopRunInMode + 106
26 GraphicsServices 0x31e6f0a9 GSEventRunModal + 136
27 UIKit 0x2e080fa1 UIApplicationMain + 1440
28 MyApp 0x000938b1 main (main.mm:21)
29 libdyld.dylib 0x38895aaf start + 2
And here's the stack trace for the main thread:
Thread : Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x3895bdfc __pthread_kill + 8
1 libsystem_pthread.dylib 0x389d9d37 pthread_kill + 62
2 libsystem_c.dylib 0x388fb909 abort + 76
3 libc++abi.dylib 0x37c399c9 __cxa_bad_cast
4 libc++abi.dylib 0x37c53671 default_unexpected_handler()
5 libobjc.A.dylib 0x38315f25 _objc_terminate() + 192
6 libc++abi.dylib 0x37c50de3 std::__terminate(void (*)()) + 78
7 libc++abi.dylib 0x37c508af __cxa_rethrow + 102
8 libobjc.A.dylib 0x38315dd3 objc_exception_rethrow + 42
9 CoreFoundation 0x2aa7145d CFRunLoopRunSpecific + 632
10 CoreFoundation 0x2aa711d3 CFRunLoopRunInMode + 106
11 GraphicsServices 0x31e6f0a9 GSEventRunModal + 136
12 UIKit 0x2e080fa1 UIApplicationMain + 1440
13 MyApp 0x000938b1 main (main.mm:21)
Looking through the trace with the exception, I see a CF_forwarding_prep_0 message, which is followed by an [NSProxy doesNotRecognizeSelector] exception. Reading that, is it a safe assumption that the cause of the issue is that there's a pointer to a tableview delegate that isn't being set to nil? That's about the only discernible thing I see here.
Any help would be most appreciated. Thanks!
My app started crashing after long time in background right when I launch it again.
The problem of course is when it wasn't killed - only when it was in the background.
the log is:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x32858a1c __pthread_kill + 8
1 libsystem_c.dylib 0x337013b4 pthread_kill + 52
2 libsystem_c.dylib 0x336f9bf8 abort + 72
3 libstdc++.6.dylib 0x30504a64 __gnu_cxx::__verbose_terminate_handler() + 376
4 libobjc.A.dylib 0x3068f06c _objc_terminate + 104
5 libstdc++.6.dylib 0x30502e36 __cxxabiv1::__terminate(void (*)()) + 46
6 libstdc++.6.dylib 0x30502e8a std::terminate() + 10
7 libstdc++.6.dylib 0x30502f5a __cxa_throw + 78
8 libobjc.A.dylib 0x3068dc84 objc_exception_throw + 64
9 CoreFoundation 0x3351048a +[NSException raise:format:arguments:] + 62
10 Foundation 0x326ea56c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 56
11 UIKit 0x31bc3a82 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 666
12 UIKit 0x31bc3764 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 28
13 UIKit 0x31bbc0c6 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 930
14 UIKit 0x31bbb276 -[UITableView layoutSubviews] + 134
15 UIKit 0x31b675f4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 20
16 CoreFoundation 0x3347defc -[NSObject(NSObject) performSelector:withObject:] + 16
17 QuartzCore 0x33351bae -[CALayer layoutSublayers] + 114
18 QuartzCore 0x33351966 CALayerLayoutIfNeeded + 178
19 QuartzCore 0x333571be CA::Context::commit_transaction(CA::Transaction*) + 206
20 QuartzCore 0x33356fd0 CA::Transaction::commit() + 184
21 QuartzCore 0x3335004e CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 50
22 CoreFoundation 0x334e7a2e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 10
23 CoreFoundation 0x334e945e __CFRunLoopDoObservers + 406
24 CoreFoundation 0x334ea754 __CFRunLoopRun + 848
25 CoreFoundation 0x3347aebc CFRunLoopRunSpecific + 224
26 CoreFoundation 0x3347adc4 CFRunLoopRunInMode + 52
27 GraphicsServices 0x311a5418 GSEventRunModal + 108
28 GraphicsServices 0x311a54c4 GSEventRun + 56
29 UIKit 0x31b90d62 -[UIApplication _run] + 398
30 UIKit 0x31b8e800 UIApplicationMain + 664
31 Vento 0x00002c64 main (main.m:14)
32 Vento 0x00002c0c start + 32
Any idea where to start digging?
Thank you!
Look at the log to see the exception detail.
Run the static code analyzer over your code. It may find the bug for you.