2016-11-22 5 views
1

내 캘린더 기반 앱에서 앱 스토어 빌드로 인해 많은 양의 충돌이 발생했습니다. 그러나 나는 재현 할 수없고 개발에이 충돌을 직면하지 못했다. 패브릭에서'NSOperationQueue` 충돌을 디버그하고 재현하는 방법

충돌 로그 :

나는이 충돌을 해결하려면
-[EKEventStore(Utils) calendarByRetrievingSafelyWithIdentifier:forEntityType:] 

    Crashed: NSOperationQueue 0x17403fd60 :: NSOperation 0x17425bfc0 (QOS: DEFAULT) 
0 CoreFoundation     0x19179b5d8 -[__NSDictionaryM setObject:forKey:] + 476 
1 EventKit      0x19ab2a0d8 -[EKObject relationForKey:] + 216 
2 EventKit      0x19ab859d4 -[EKCalendar source] + 24 
3 EventKit      0x19ab9d718 -[EKEventStore calendarsForEntityType:] + 512 
4 SampleApp      0x100112554 -[EKEventStore(Utils) calendarByRetrievingSafelyWithIdentifier:forEntityType:] (MySampleCalendarStore.m:4767) 
5 SampleApp      0x1001d3f88 -[MyCalendarDataStore syncCalendarItems:startDate:endDate:completion:] (MyCalendarDataStore.m:84) 
6 SampleApp      0x1000f4e58 __62-[MySampleAppStore syncDeviceCalendarsAndItems:withCompletion:]_block_invoke.1043 (MySampleCalendarStore.m:2499) 
7 Foundation      0x19237e754 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16 
8 Foundation      0x1922c32c8 -[NSBlockOperation main] + 96 
9 Foundation      0x1922b38c4 -[__NSOperationInternal _start:] + 620 
10 Foundation      0x192380b00 __NSOQSchedule_f + 228 
11 libdispatch.dylib    0x1907451c0 _dispatch_client_callout + 16 
12 libdispatch.dylib    0x190753444 _dispatch_queue_serial_drain + 928 
13 libdispatch.dylib    0x1907489a8 _dispatch_queue_invoke + 652 
14 libdispatch.dylib    0x19075538c _dispatch_root_queue_drain + 572 
15 libdispatch.dylib    0x1907550ec _dispatch_worker_thread3 + 124 
16 libsystem_pthread.dylib  0x19094e2b8 _pthread_wqthread + 1288 
17 libsystem_pthread.dylib  0x19094dda4 start_wqthread + 4 

, 나는 모든 포럼과 함께 지난 주 시도했다. 내 문제를 해결하는 데 유용한 단서를 얻을 수 없습니다. 이 유형의 크래시를 수동으로 재현하고 해결하는 데 도움이되도록 안내해주세요.

내 코드 :

NSOperationQueue *calendarDataStoresQueue = [[NSOperationQueue alloc] init]; 
for (EKCalendar *calendar in calendars) { 
     [calendarDataStoresQueue addOperationWithBlock:^{ 
      MyCalendarDataStore *calendarDataStore = [[MyCalendarDataStore alloc] initWithCalendar:[[MYCalendar alloc] initWithInfoOfEventKitCalendar:calendar] eventStore:weakSelf.eventStore]; 
      [calendarDataStore syncCalendarItems:items startDate:syncFrom endDate:syncTo completion:^{ 
       complition() 
      }]; 
     }]; 
} 

내의 Utils :

@implementation EKEventStore (Utils) 

- (EKCalendar*)calendarByRetrievingSafelyWithIdentifier:(NSString *)identifier forEntityType:(EKEntityType)entityType { 
    EKCalendar *calendar; 
    NSArray *calendars = [self calendarsForEntityType:entityType]; 
    for (EKCalendar *aCalendar in calendars) { 
     if([aCalendar.calendarIdentifier isEqualToString:identifier]) { 
      calendar = aCalendar; 
      break; 
     } 

    } 
    return calendar; 
} 
@end 

사전 감사

+0

당신이 시도했던 딕셔너리'예외로 무기 호를 삽입하려고 중단 점'? –

+0

네, 아직 확인했습니다. 운이 없습니다. – Ammaiappan

답변

0
당신은 충분한 정보를 게시되지 않은

; 당신은 당신의 충돌을 어딘가에 가지고 있습니다 - [EKObject relationForKey :] method; 더군다나, 당신은 당신의 충돌의 정확한 원인을 게시하지 않았습니다;

가이 방법은 [EKObject relationForKey이 : 즉, 날 것으로 보인다 될 수있다, 어딘가 자체에서 딕셔너리를 생성하고, [__NSDictionaryM의 setObject : forKey는 : 여기 당신은

+0

"3 EventKit 0x19ab9d718 - [EKEventStore calendarsForEntityType :] + 512"오류 로그를 확인하십시오. 내 질문에,이 모든 후 eventKit 프레임 워크 함수는이 코드를 줬어. – Ammaiappan

+0

예, 이미 해봤지만 필요한 정보가 없습니다. 이 충돌로 패브릭 페이지의 스크린 샷을 게시 할 수 있습니까? –

+0

충돌 로그를 확인하십시오 "3 EventKit 0x19ab9d718 - [EKEventStore calendarsForEntityType :] + 512". 내 질문에,이 모든 후 eventKit 프레임 워크 함수입니다 – Ammaiappan