iOS Keyboard Extension crash before any of my code runs - ios

I have been getting crash reports like this for a keyboard extension I have developed and am either confused about how to read the stack trace or why it is occurring or both and I was hoping someone could help me clear this up.
Below is the stack trace:
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0xd15db9df
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x37949f66 objc_msgSend + 5
1 UIKit 0x2cd57f05 -[_UIViewControllerTransitionContext completeTransition:] + 52
2 UIKit 0x2d10ac1f __95-[_UIWindowAnimationController _performLayoutAnimationWithContext:windowGeometryUpdatingBlock:]_block_invoke88 + 26
3 UIKit 0x2cc7b8e1 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 308
4 UIKit 0x2cc7b4f9 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 184
5 UIKit 0x2cc7b40f -[UIViewAnimationState animationDidStop:finished:] + 70
6 QuartzCore 0x2c660fe7 CA::Layer::run_animation_callbacks(void*) + 234
7 libdispatch.dylib 0x37ecdc6f _dispatch_client_callout + 22
8 libdispatch.dylib 0x37ed9553 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1322
9 CoreFoundation 0x295ac889 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
10 CoreFoundation 0x295aafa9 __CFRunLoopRun + 1512
11 CoreFoundation 0x294f69a1 CFRunLoopRunSpecific + 476
12 CoreFoundation 0x294f67b3 CFRunLoopRunInMode + 106
13 GraphicsServices 0x30e911a9 GSEventRunModal + 136
14 UIKit 0x2cca7635 UIApplicationMain + 1440
15 libxpc.dylib 0x3806f9e3 _xpc_objc_main + 706
16 libxpc.dylib 0x38071009 xpc_main + 168
17 Foundation 0x2a3ec289 service_connection_handler + 162
18 PlugInKit 0x32c5ff75 -[PKService run] + 508
19 PlugInKit 0x32c5fc4b +[PKService main] + 58
20 PlugInKit 0x32c5ffa9 +[PKService _defaultRun:arguments:] + 20
21 libextension.dylib 0x371b60c5 NSExtensionMain + 48
22 libdyld.dylib 0x37f0baaf start + 2
In the left column where it lists the libraries (correct term?) I don't see any reference to my code. In other crash logs there is always some reference to a class in my app or something but I don't see that in this one. What does that mean? Is the crash occurring before my code executes and this is an Apple issue I can ignore?

It's an Apple Bug. The keyboard extension I work on has a nearly identical crash report. Fortunately, this only seems to happen on iOS 8, though I have seen a similar one that affects iOS 9.
I would file a bug report with Apple, and include a copy of the stack trace.

Related

How to fix WebKit crash on objective-c

I try to fix an error on firebase.
My sources are based on objective-c, and "webkit" is a problem in my code
I try and try to find what is cause of it, but I can't. Because these errors appears in a different places but same error.
stack trace : com.apple.main-thread
**EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000028**
keyboard_arrow_up
arrow_right 0
WebKit
WebKit::ProcessThrottler::setAssertionType(WebKit::ProcessAssertionType) + 544
I know it has only few clues for finding. Sorry.
My codes have a lot of request datas to Server and response from Server on mainthread.
I expect it occurs this problem but I'm not sure.
Thanks.
full call stack
Crashed: com.apple.main-thread
0 WebKit 0x199361fcc WebKit::ProcessThrottler::setAssertionType(WebKit::ProcessAssertionType) + 544
1 WebKit 0x199361fb4 WebKit::ProcessThrottler::setAssertionType(WebKit::ProcessAssertionType) + 520
2 WebKit 0x199362484 WebKit::ProcessThrottler::sendPrepareToSuspendIPC(WebKit::IsSuspensionImminent) + 596
3 WebKit 0x199367620 WTF::Detail::CallableWrapper<WebKit::ProcessThrottler::setAssertionType(WebKit::ProcessAssertionType)::$_1, void>::call() + 144
4 WebKit 0x199435e40 -[WKProcessAssertionBackgroundTaskManager _notifyAssertionsOfImminentSuspension] + 436
5 WebKit 0x1994364b0 -[WKProcessAssertionBackgroundTaskManager _handleBackgroundTaskExpirationOnMainThread] + 312
6 JavaScriptCore 0x197034278 WTF::Detail::CallableWrapper<WTF::callOnMainAndWait(WTF::Function<void ()>&&, WTF::MainStyle)::$_0, void>::call() + 48
7 JavaScriptCore 0x197049324 WTF::RunLoop::performWork() + 484
8 JavaScriptCore 0x197049f24 WTF::RunLoop::performWork(void*) + 36
9 CoreFoundation 0x18cfdb81c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
10 CoreFoundation 0x18cfdb718 __CFRunLoopDoSource0 + 208
11 CoreFoundation 0x18cfdaa28 __CFRunLoopDoSources0 + 268
12 CoreFoundation 0x18cfd4d20 __CFRunLoopRun + 824
13 CoreFoundation 0x18cfd44bc CFRunLoopRunSpecific + 600
14 GraphicsServices 0x1a3ae6820 GSEventRunModal + 164
15 UIKitCore 0x18f981164 -[UIApplication _run] + 1072
16 UIKitCore 0x18f986840 UIApplicationMain + 168
17 MyApp 0x10235f3d0 main + 29 (main.m:29)
18 libdyld.dylib 0x18cc9be40 start + 4

App is getting crashed on app launch in iOS 13 beta version

Here is the crash report and the crash is only happening on iOS 13 beta version :-
Crashed: com.apple.main-thread
0 libsystem_pthread.dylib 0x1ae056484 pthread_get_qos_class_np + 8
1 Foundation 0x1ae664340 -[NSThread qualityOfService] + 80
2 Foundation 0x1ae626ebc -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 280
3 Foundation 0x1ae628df8 -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:] + 116
4 libAXSpeechManager.dylib 0x1d0176884 -[AXSpeechManager isSpeaking] + 112
5 libAXSpeechManager.dylib 0x1d0171b60 -[AXSpeechManager _didBeginInterruption] + 52
6 libAXSpeechManager.dylib 0x1d0171f1c -[AXSpeechManager _handleAudioInterruption:] + 504
7 CoreFoundation 0x1ae2929ac __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
8 CoreFoundation 0x1ae2929f4 ___CFXRegistrationPost1_block_invoke + 64
9 CoreFoundation 0x1ae291d54 _CFXRegistrationPost1 + 368
10 CoreFoundation 0x1ae291a20 ___CFXNotificationPost_block_invoke + 104
11 CoreFoundation 0x1ae20dd38 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1416
12 CoreFoundation 0x1ae291370 _CFXNotificationPost + 1244
13 Foundation 0x1ae5edcf8 -[NSNotificationCenter postNotificationName:object:userInfo:] + 60
14 AVFAudio 0x1bac4603c -[AVAudioSession privateInterruptionWithInfo:] + 988
15 AVFAudio 0x1bac4880c (anonymous namespace)::HandlePropertyListenerCallback(unsigned int, objc_selector*, NSObject*) + 68
16 libdispatch.dylib 0x1ae004658 _dispatch_call_block_and_release + 24
17 libdispatch.dylib 0x1ae0051cc _dispatch_client_callout + 16
18 libdispatch.dylib 0x1adfe83e0 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 996
19 CoreFoundation 0x1ae2b4c74 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
20 CoreFoundation 0x1ae2afc68 __CFRunLoopRun + 2004
21 CoreFoundation 0x1ae2af16c CFRunLoopRunSpecific + 464
22 GraphicsServices 0x1b80d9328 GSEventRunModal + 104
23 UIKitCore 0x1b2317f6c UIApplicationMain + 1936
24 Quickride 0x10086803c main + 37 (AppDelegate.swift:37)
25 libdyld.dylib 0x1ae13a424 start + 4
I have checked on various platforms for this issue. But have not found any solution related to it.Please provide any solution related to it.
It is crashing on app launch itself and this is the report it shows on fabric
I've the same issue on iOS 13 and it's my most serious crash on Crashlytics.
It occurs only in iOS 13 and above. Unfortunately also in the latest 13.1.2.
Starting by the iOS 13 release I've detected a strange warning when I put my app in background the debug console print Can't end BackgroundTask: no background task exists with identifier x, or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.
Maybe the issues are related.

iOS: Understanding SIGABRT crash from Crashlytics

So I am receiving Crashlytics crash report for my iOS App. For some of the users the app has been crashing giving SIGABRT in the crash log.
I have been trying to find the cause of this error for countless hours but due to rarity of the error (around 1-2% users) I have been unable to reproduce the error and, due to limited amount of information from Crashlytics, I have been unable to find the root cause of this error.
The deployment target is iOS 7 for the app and devices of all sizes with iOS 10+ are experiencing the crash (I am not sure if iOS 9, 8 or 7 are also experiencing the error — Crashlytics is only showing crashes on iOS 10+)
Here is the stack trace:
CRASH_INFO_ENTRY_1
*** error for object 0x17127f4c0: Invalid pointer dequeued from free list
CRASH_INFO_ENTRY_0
abort() called
Crashed: com.apple.main-thread
SIGABRT ABORT 0x000000018e2ea014
#0. Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x18f6ca014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x18f791460 pthread_kill + 112
2 libsystem_c.dylib 0x18f63e3f4 abort + 140
3 libsystem_malloc.dylib 0x18f70ea38
_nano_vet_and_size_of_live + 330
4 libsystem_malloc.dylib 0x18f710bf0
_nano_malloc_check_clear + 392
5 libsystem_malloc.dylib 0x18f70fbb4 nano_calloc + 80
6 libsystem_malloc.dylib 0x18f701180 malloc_zone_calloc + 152
7 libsystem_malloc.dylib 0x18f7010c4 calloc + 40
8 libobjc.A.dylib 0x18f131cfc cache_t::reallocate(unsigned int, unsigned int) + 52
9 libobjc.A.dylib 0x18f1321fc cache_fill + 216
10 libobjc.A.dylib 0x18f13cd00 lookUpImpOrForward + 412
11 libobjc.A.dylib 0x18f147258 _objc_msgSend_uncached + 56
12 UIKit 0x1967274e8 -[UITableView _endCellAnimationsWithContext:] + 13964
13 Champion 0x100097bf4 -[MatchdayComposeController controllerDidChangeContent:] (MatchdayComposeController.m:427)
14 CoreData 0x192abfe28 __82-[NSFetchedResultsController(PrivateMethods) _core_managedObjectContextDidChange:]_block_invoke + 4760
15 CoreData 0x192abeb80 -[NSFetchedResultsController(PrivateMethods) _core_managedObjectContextDidChange:] + 124
16 CoreFoundation 0x19069622c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
17 CoreFoundation 0x190695930 _CFXRegistrationPost + 400
18 CoreFoundation 0x1906956ac ___CFXNotificationPost_block_invoke + 60
19 CoreFoundation 0x190704b9c -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1504
20 CoreFoundation 0x1905d7bf4 _CFXNotificationPost + 376
21 Foundation 0x1910de6bc -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
22 CoreData 0x1929eed1c -[NSManagedObjectContext(_NSInternalNotificationHandling) _postObjectsDidChangeNotificationWithUserInfo:] + 724
23 CoreData 0x192a75170 -[NSManagedObjectContext(_NSInternalChangeProcessing) _createAndPostChangeNotification:deletions:updates:refreshes:deferrals:wasMerge:] + 1336
24 CoreData 0x1929ed338 -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 2116
25 CoreData 0x1929ebe3c -[NSManagedObjectContext save:] + 416
26 Champion 0x10008e2ac -[AppDelegate saveContext] (AppDelegate.m:263)
27 Champion 0x10009d1d4 +[Globals saveManagedObjectContext] (Globals.m:157)
28 Champion 0x10006ee4c -[EntitySyncClient saveUpdates:] (EntitySyncClient.m:232)
29 Champion 0x1000690a0 -[MatchController datepickerDidChangeValue:] (MatchController.m:994)
30 UIKit 0x1965799a0 -[UIApplication sendAction:to:from:forEvent:] + 96
31 UIKit 0x196579920 -[UIControl sendAction:to:forEvent:] + 80
32 UIKit 0x196563dd0 -[UIControl _sendActionsForEvents:withEvent:] + 452
33 UIKit 0x196e62c44 -[_UIDatePickerView pickerView:didSelectRow:inComponent:] + 540
34 UIKit 0x1967b965c -[UIPickerView _sendSelectionChangedForComponent:notify:] + 116
35 UIKit 0x1967b9894 -[UIPickerView _sendSelectionChangedFromTable:notify:] + 344
36 UIKit 0x196ce6878 -[UIPickerTableView _scrollingFinished] + 188
37 UIKit 0x196ce6a50 -[UIPickerTableView scrollViewDidEndDecelerating:] + 28
38 UIKit 0x196857abc -[UIScrollView(UIScrollViewInternal) _scrollViewDidEndDeceleratingForDelegate] + 132
39 UIKit 0x1966ed2cc -[UIScrollView(UIScrollViewInternal) _stopScrollDecelerationNotify:] + 332
40 UIKit 0x1966ece08 -[UIScrollView _smoothScrollWithUpdateTime:] + 2356
41 QuartzCore 0x1938ff640 CA::Display::DisplayLinkItem::dispatch(unsigned long long) + 44
42 QuartzCore 0x1938ff4ec CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 444
43 IOKit 0x190968570 IODispatchCalloutFromCFMessage + 372
44 CoreFoundation 0x19069256c __CFMachPortPerform + 180
45 CoreFoundation 0x1906aa934 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
46 CoreFoundation 0x1906aa0e8 __CFRunLoopDoSource1 + 436
47 CoreFoundation 0x1906a7bcc __CFRunLoopRun + 1840
48 CoreFoundation 0x1905d6048 CFRunLoopRunSpecific + 444
49 GraphicsServices 0x192059198 GSEventRunModal + 180
50 UIKit 0x1965af818 -[UIApplication _run] + 684
51 UIKit 0x1965aa550 UIApplicationMain + 208
52 Champion 0x1000b082c main (main.m:14)
53 libdispatch.dylib 0x18f5b85b8 (Missing)
I would be extremely grateful for any kind of assistance. I would also be grateful if I can get any kind of pointers for reproducing Crashlytics errors.
Updating the Question with Code
In the controllerDidChangeContent: mainly the table view is ending updates.
- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller {
[self.tableView endUpdates];
if(controller.fetchedObjects.count == 0){
self.showsNoMatchesHint = YES;
}
else{
self.showsNoMatchesHint = NO;
}
}
Given the last gasp of your program was in _endCellAnimationsWithContext, and these types of animations usually occur on completion of cell editing, I'd look into problems when that particular table is completing a cell edit operation. There's a picker view and a notification also going on in there, so that should narrow it down some. Good luck.
It looks like caused by this line of code
[self.tableView endUpdates];
I would suggest you to make sure the logic of -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView is correct. For example, it doesn't return 0 while the array is empty. Good luck.

weird SIGSEGV crash in iOS

About 10+ crash reported by crittercism.
Name: SIGSEGV
Reason: SEGV_MAPERR
Seems it is a UIScrollView/UITableView animating or scrolling issue.
How can I find the root cause?
Stack:
0
libobjc.A.dylib 0x0000000195fafbd0 objc_msgSend + 12
1
UIKit 0x00000001892b1db8 -[UIScrollView(UIScrollViewInternal) _delegateScrollViewAnimationEnded] + 64
2
UIKit 0x00000001892b1d30 -[UIScrollView(UIScrollViewInternal) _scrollViewAnimationEnded:finished:] + 204
3
UIKit 0x0000000189366814 -[UIAnimator stopAnimation:] + 500
4
UIKit 0x0000000189366248 -[UIAnimator(Static) _advanceAnimationsOfType:withTimestamp:] + 332
5
QuartzCore 0x0000000188b4629c CA::Display::DisplayLinkItem::dispatch() + 28
6
QuartzCore 0x0000000188b46134 CA::Display::DisplayLink::dispatch_items() + 320
7
IOKit 0x0000000185921470 IODispatchCalloutFromCFMessage + 372
8
CoreFoundation 0x0000000184712dc4 __CFMachPortPerform + 176
9
CoreFoundation 0x0000000184727a54 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
10
CoreFoundation 0x00000001847279b4 __CFRunLoopDoSource1 + 432
11
CoreFoundation 0x0000000184725934 __CFRunLoopRun + 1636
12
CoreFoundation 0x00000001846512d4 CFRunLoopRunSpecific + 392
13
GraphicsServices 0x000000018de676fc GSEventRunModal + 164
14
UIKit 0x0000000189216fac UIApplicationMain + 1484
15
MyApp 0x000000010001d280 main (main.m:14)
16
libdyld.dylib 0x000000019661aa08 start + 0
I've seen this happen when a controller and/or its table is deallocated during an animation. The OS still triggers delegate methods (e.g., -scrollViewDidEndScrollingAnimation: or -scrollViewDidEndDecelerating:) when it finishes with the animation, but because the objects no longer exist things get weird.
The best fix is to nil the delegate in the controller's dealloc method.

iOS Crash with name SIGSEGV, reason main

I'm using Crittercism (SDK 4.1.2) crash reporting service to catch reports on my iOS app. i've been getting this crash many times and i've no idea why it's happening.
Name: SIGSEGV - Reason: Main
Crashed Thread
0 libobjc.A.dylib 0x397c4b26 objc_msgSend + 6
1 UIKit 0x31965a2d -[UIScrollView(UIScrollViewInternal) _scrollViewAnimationEnded:finished:] + 177
2 UIKit 0x31a0e4b3 -[UIAnimator stopAnimation:] + 471
3 UIKit 0x31a0de9d -[UIAnimator(Static) _advanceAnimationsOfType:withTimestamp:] + 285
4 UIKit 0x31a0dd7d -[UIAnimator(Static) _LCDHeartbeatCallback:] + 53
5 QuartzCore 0x315419cf _ZN2CA7Display15DisplayLinkItem8dispatchEv + 99
6 QuartzCore 0x31541779 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 345
7 IOMobileFramebuffer 0x3411b76d IOMobileFramebufferVsyncNotifyFunc + 105
8 IOKit 0x2fdd9a75 IODispatchCalloutFromCFMessage + 249
9 CoreFoundation 0x2f0b7e21 __CFMachPortPerform + 137
10 CoreFoundation 0x2f0c29df __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35
11 CoreFoundation 0x2f0c297b __CFRunLoopDoSource1 + 347
12 CoreFoundation 0x2f0c114f __CFRunLoopRun + 1399
13 CoreFoundation 0x2f02bc27 CFRunLoopRunSpecific + 523
14 CoreFoundation 0x2f02ba0b CFRunLoopRunInMode + 107
15 GraphicsServices 0x33cff283 GSEventRunModal + 139
16 UIKit 0x318cf049 UIApplicationMain + 1137
17 AppName 0x000b1fef main + 67
Not sure if this is the case for you, but I've had a similar crash caused by a button in an UIView trying to invoke a callback method on a already released object. The UI was displayed, and then the object was released.

Resources