macos – 核心数据崩溃报告:加载数组控制器中的sqlite3VdbeHalt

macos – 核心数据崩溃报告:加载数组控制器中的sqlite3VdbeHalt,第1张

概述我需要一些帮助来弄清楚崩溃报告中可能发生的事情.这对我来说是一个不可重现的问题,但有些用户在发布时会反复遇到这种情况. 当应用程序启动时,我将一个包含NSObjectController的nib加载到ContactsListDisplaySource对象,并将一个NSArrayController加载为了peopleArrayController(它是ContactsListDisplaySour 我需要一些帮助来弄清楚崩溃报告中可能发生的事情.这对我来说是一个不可重现的问题,但有些用户在发布时会反复遇到这种情况.

当应用程序启动时,我将一个包含NSObjectController的nib加载到ContactsListdisplaySource对象,并将一个NSArrayController加载为了peopleArrayController(它是ContactsListdisplaySource对象中的一个出口). peopleArrayController是从ContactsListdisplaySource refetchArrayController中的数据库中获取联系人列表的内容:

- (voID) refetchArrayController {    NSError *error = nil;    [_peopleArrayController fetchWithRequest:nil merge:NO error:&error];    if (error) {        NSLog(@"error in peopleArrayController fetch = %@",error);    }}

编辑:请注意,这是从awakeFromNib调用的,并且使用fetch:而不是fetchWithRequest:merge:error返回0行

这有99%的时间可以工作,但我想弄清楚这个崩溃报告中发生了什么.崩溃报告中是否有任何可以解释问题的线索?

Date/Time:       2015-04-22 12:17:17 +0000OS Version:      Mac OS X 10.10.3 (14D136)Report Version:  104Exception Type:  SIGSEGVException Codes: SEGV_NOOP at 0x0Crashed Thread:  0Thread 0 Crashed:0   libsqlite3.dylib                     0x00007fff8e3770ad sqlite3VdbeHalt + 77411   libsqlite3.dylib                     0x00007fff8e3bd9c7 sqlite3VdbeExec + 932062   libsqlite3.dylib                     0x00007fff8e3a53df sqlite3_step + 7343   CoreData                             0x00007fff91126710 _execute + 1124   CoreData                             0x00007fff911389b8 -[NSsqliteConnection fetchResultSet:usingFetchPlan:] + 18805   CoreData                             0x00007fff91140719 newFetchedRowsForFetchPlan_MT + 22176   CoreData                             0x00007fff9112cea8 -[NSsqlCore objectsForFetchRequest:inContext:] + 5207   CoreData                             0x00007fff9112c90b -[NSsqlCore executeRequest:withContext:error:] + 2998   CoreData                             0x00007fff911e1389 __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke + 39459   CoreData                             0x00007fff911eb5ab gutsOfBlockToNSPersistentStoreCoordinatorPerform + 17110  libdispatch.dylib                    0x00007fff8eb62c13 _dispatch_clIEnt_callout + 711  libdispatch.dylib                    0x00007fff8eb63e5e _dispatch_barrIEr_sync_f_invoke + 5612  CoreData                             0x00007fff911da5a2 _perform + 19413  CoreData                             0x00007fff9112c5a5 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 53314  CoreData                             0x00007fff9112adfb -[NSManagedobjectContext executeFetchRequest:error:] + 58715  AppKit                               0x00007fff91ddd745 -[_NSManagedProxy fetchObjectsWithFetchRequest:error:] + 6916  AppKit                               0x00007fff91c1aacc -[NSArrayController(NSManagedController) _performFetchWithRequest:merge:error:] + 6217  AppKit                               0x00007fff91ddcdc3 -[NSObjectController(NSManagedController) fetchWithRequest:merge:error:] + 17618  Contacts Journal CRM                 0x000000010d0d8eb2 -[ContactsListdisplaySource refetchArrayController] (ContactsListdisplaySource.m:57)19  Contacts Journal CRM                 0x000000010d0d8e6e -[ContactsListdisplaySource awakeFromNib] (ContactsListdisplaySource.m:47)20  CoreFoundation                       0x00007fff8c736bdf -[NSSet makeObjectsPerformSelector:] + 22321  AppKit                               0x00007fff917b214d -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 121622  AppKit                               0x00007fff9198ca0e -[NSNib _instantiateNibWithExternalnametable:options:] + 67723  AppKit                               0x00007fff9198c65e -[NSNib _instantiateWithOwner:options:topLevelObjects:] + 14324  AppKit                               0x00007fff9198b957 -[NSVIEwController loadVIEw] + 27225  AppKit                               0x00007fff9190af03 -[NSVIEwController _loadVIEwIfrequired] + 7526  AppKit                               0x00007fff9190ae6d -[NSVIEwController vIEw] + 3027  Contacts Journal CRM                 0x000000010d021078 -[AppDelegate displayVC:] (AppDelegate.m:496)28  Contacts Journal CRM                 0x000000010d020ff8 -[AppDelegate changeVIEwControllersWithIndex:] (AppDelegate.m:414)29  Contacts Journal CRM                 0x000000010d01edb6 -[AppDelegate postApplicationDIDFinishLaunchingWithNotification:] (AppDelegate.m:130)30  Contacts Journal CRM                 0x000000010d01ec00 -[AppDelegate applicationWillFinishLaunching:] (AppDelegate.m:114)31  CoreFoundation                       0x00007fff8c7e645c __CFNOTIFICATIONCENTER_IS_CALliNG_OUT_TO_AN_OBSERVER__ + 1232  CoreFoundation                       0x00007fff8c6d6634 _CFXNotificationPost + 314033  Foundation                           0x00007fff8f33d9d1 -[NSNotificationCenter postNotificationname:object:userInfo:] + 6634  AppKit                               0x00007fff9180cf57 -[NSApplication finishLaunching] + 44035  AppKit                               0x00007fff9180ca21 -[NSApplication run] + 12836  AppKit                               0x00007fff91789354 NSApplicationMain + 183237  libdyld.dylib                        0x00007fff8d0cd5c9 start + 1
你可能认为这是非常基本的,但也许你可以试试这个:
[_peopleArrayController.managedobjectContext performBlockAnDWait:^{    [_peopleArrayController fetchWithRequest:nil merge:NO error:&error];}];

我发现在使用核心数据时使用managedobjectContext的performBlock:和performBlockAnDWait:方法可以防止我的应用程序挂起.只需查看NSManagedobjectContext类引用https://developer.apple.com/library/ios/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSManagedObjectContext_Class/即可

总结

以上是内存溢出为你收集整理的macos – 核心数据崩溃报告:加载数组控制器中的sqlite3VdbeHalt全部内容,希望文章能够帮你解决macos – 核心数据崩溃报告:加载数组控制器中的sqlite3VdbeHalt所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/1160097.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-01
下一篇 2022-06-01

发表评论

登录后才能评论

评论列表(0条)

保存