2011-09-21 5 views
6

하나의 충돌에 대한 많은 충돌 보고서를 받았지만 직접 수정하지 못하고 오류 보고서를 익명으로 보냈기 때문에 오류를 수정하기 시작해야 할 곳이 없습니다.응용 프로그램이 NSRangeException _PFBatchFaultingArray를 사용하여 NSFetchedResultsController를 사용하여 충돌합니다.

당신이 보시다시피, 내가 사용하고있는 NSFetchedResultsController과 관련이 있습니다.

다음은 충돌 보고서에서 발췌 한 것입니다. 보고서의 유일한 차이점은 인덱스 범위 [...]index (someLargeIndex) beyond bounds (1)[...]입니다. 나머지는 모든 단일 보고서에서 동일하게 유지됩니다.

Application Specific Information: 
*** Terminating app due to uncaught exception \\\'NSRangeException\\\', reason: \\\'*** -[_PFBatchFaultingArray objectAtIndex:]: index (262144) beyond bounds (1)\\\' 

Thread 0 Crashed: 
0 libsystem_kernel.dylib    0x31d1e00c __kill + 8 
1 libsystem_c.dylib     0x32ac4f95 raise + 17 
2 AppName        0x0003d961 uncaught_exception_handler (PLCrashReporter.m:137) 
3 CoreFoundation      0x349b57d3 __handleUncaughtException + 239 
4 libobjc.A.dylib      0x33f9506b _objc_terminate + 103 
5 libstdc++.6.dylib     0x3338ae3d __cxxabiv1::__terminate(void (*)()) + 53 
6 libstdc++.6.dylib     0x3338ae91 std::terminate() + 17 
7 libstdc++.6.dylib     0x3338af61 __cxa_throw + 85 
8 libobjc.A.dylib      0x33f93c8b objc_exception_throw + 71 
9 CoreFoundation      0x349b5491 +[NSException raise:format:arguments:] + 69 
10 CoreFoundation      0x349b54cb +[NSException raise:format:] + 35 
11 CoreData       0x34820fc5 -[_PFBatchFaultingArray objectAtIndex:] + 133 
12 CoreData       0x3485e5fb -[_PFMutableProxyArray objectAtIndex:] + 55 
13 CoreData       0x348e00f7 +[NSFetchedResultsController(PrivateMethods) _insertIndexForObject:inArray:lowIdx:highIdx:sortDescriptors:] + 99 
14 CoreData       0x348e0605 -[NSFetchedResultsController(PrivateMethods) _postprocessInsertedObjects:] + 353 
15 CoreData       0x348e0ecf -[NSFetchedResultsController(PrivateMethods) _postprocessUpdatedObjects:] + 507 
16 CoreData       0x348e29c7 -[NSFetchedResultsController(PrivateMethods) _managedObjectContextDidChange:] + 1239 
17 Foundation       0x35f46183 _nsnote_callback + 143 
18 CoreFoundation      0x3498420f __CFXNotificationPost_old + 403 
19 CoreFoundation      0x3491eeeb _CFXNotificationPostNotification + 119 
20 Foundation       0x35f435d3 -[NSNotificationCenter postNotificationName:object:userInfo:] + 71 
21 CoreData       0x34884c07 -[NSManagedObjectContext(_NSInternalNotificationHandling) _postObjectsDidChangeNotificationWithUserInfo:] + 55 
22 CoreData       0x34884fcd -[NSManagedObjectContext(_NSInternalChangeProcessing) _createAndPostChangeNotification:withDeletions:withUpdates:withRefreshes:] + 141 
23 CoreData       0x34845251 -[NSManagedObjectContext(_NSInternalChangeProcessing) _postRefreshedObjectsNotificationAndClearList] + 77 
24 CoreData       0x34844f7f -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 1815 
25 CoreData       0x348863a5 -[NSManagedObjectContext processPendingChanges] + 17 
26 CoreData       0x3482027f _performRunLoopAction + 127 
27 CoreFoundation      0x3498ca35 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 17 
28 CoreFoundation      0x3498e465 __CFRunLoopDoObservers + 413 
29 CoreFoundation      0x3498f75b __CFRunLoopRun + 855 
30 CoreFoundation      0x3491fec3 CFRunLoopRunSpecific + 231 
31 CoreFoundation      0x3491fdcb CFRunLoopRunInMode + 59 
32 GraphicsServices     0x3354641f GSEventRunModal + 115 
33 GraphicsServices     0x335464cb GSEventRun + 63 
34 UIKit        0x3357dd69 -[UIApplication _run] + 405 
35 UIKit        0x3357b807 UIApplicationMain + 671 
36 AppName        0x00002b69 main (main.m:15) 

죄송합니다. 더 많은 정보를 제공해 드릴 수 없습니다. 어떤 제안을 시작하는 방법?

+0

[_PFBatchFaultingArray objectAtIndex :] : 인덱스 (262144) 넘어 경계 (1) 262144 배열의 인덱스에 액세스하는 _PFBatchFaultingArray는 2 개의 요소 (경계 1)를 사용합니다.). 충돌 보고서의 다른 스레드를 살펴 보겠습니다. – ARC

+0

아직 알지 못 했습니까? 나는 어디에서나 대답을 찾을 수 없다. –

답변

1

cellForRowAtIndexPath : 또는 NSFetchedResultsController의 결과를 사용하여 어디에서든지 찾으십시오. 이 경우 사용할 수 있습니다 얼마나 많은 결과를 확인하기 위해 다음 코드를 사용

NSArray *sections = fetchController.sections; 
int someSection = 0; 
id <NSFetchedResultsSectionInfo> sectionInfo = [sections objectAtIndex:someSection]; 
numberOfObjects = [sectionInfo numberOfObjects]; 

한 다음, 정보를 얻으려고 장소로 이동 아마 당신은 전화 여기서

[fetchedResultsController objectAtIndexPath:indexPath]; 

과 당신이 건너 무엇을 참조하십시오 결국

NSLog(@"row to be retrieved: %d", indexPath.row); 
[fetchedResultsController objectAtIndexPath:indexPath]; //here comes the crash 

, 확인할 수

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 
반환되는 행 수를 보려면

관련 문제