简体   繁体   English

iOS:从Crashlytics了解SIGABRT崩溃

[英]iOS: Understanding SIGABRT crash from Crashlytics

So I am receiving Crashlytics crash report for my iOS App. 因此,我收到了iOS应用程序的Crashlytics崩溃报告。 For some of the users the app has been crashing giving SIGABRT in the crash log. 对于某些用户,该应用已崩溃,在崩溃日志中提供了SIGABRT。

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. 我已经尝试了无数小时的时间来查找此错误的原因,但是由于该错误的稀有性(大约1-2%用户),我无法重现该错误,并且由于Crashlytics提供的信息量有限,无法找到此错误的根本原因。

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+) 该应用程序的部署目标是iOS 7,并且所有具有iOS 10+的各种尺寸的设备都发生崩溃(我不确定iOS 9、8或7是否也遇到错误-Crashlytics仅在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. 如果我能得到任何重现Crashlytics错误的指针,我也将不胜感激。

Updating the Question with Code 用代码更新问题

In the controllerDidChangeContent: mainly the table view is ending updates. controllerDidChangeContent:主要是表视图正在结束更新。

- (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. 鉴于您程序的最后喘息机会是在_endCellAnimationsWithContext中,并且这些类型的动画通常在单元格编辑完成时发生,因此当该特定表完成单元格编辑操作时,我会研究一些问题。 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]; [self.tableView endUpdates];

I would suggest you to make sure the logic of -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView is correct. 我建议您确保-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView的逻辑正确。 For example, it doesn't return 0 while the array is empty. 例如,当数组为空时,它不会返回0。 Good luck. 祝好运。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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