2014-10-08 10 views
0

내 CoreData에서로드 된 일부 정보가 포함 된보기가 있습니다. 일반적으로 작동하지만이 오류로 인해 응용 프로그램이 충돌합니다.응용 프로그램이 NSInternalInconsistencyException과 충돌합니다.

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '<DocumentCollectionViewCell: 0x7fb3bd0201b0; baseClass = UICollectionViewCell; frame = (0 0; 107 147); clipsToBounds = YES; opaque = NO; layer = <CALayer: 0x7fb3bd01eb10>>: An -observeValueForKeyPath:ofObject:change:context: message was received but not handled. 
Key path: syncStatus 
Observed object: <Document: 0x7fb3bd124570> (entity: Document; id: 0xd000000000500006 <x-coredata://CC1300FC-9C3A-4E58-8CCE-3F90C1E64718/Document/p20> ; data: { 
    createdAt = nil; 
    deleted = 0; 
    event = "0xd000000000040008 <x-coredata://CC1300FC-9C3A-4E58-8CCE-3F90C1E64718/Note/p1>"; 
    localFilePath = "/Users/AliCheriaa/Library/Developer/CoreSimulator/Devices/CEBD0938-6989-4173-9E94-6676B0D45BB5/data/Applications/0D94B2FA-D71D-434F-9082-E26E2FBF0893/Documents/1D43AE28-E7DB-4828-8A98-DB7BF159C273/IMG"; 
    mimeType = "image/jpeg"; 
    syncProgress = 0; 
    syncStatus = 0; 
    user = "0xd000000000040004 <x-coredata://CC1300FC-9C3A-4E58-8CCE-3F90C1E64718/User/p1>"; 
    uuid = "1D43AE28-E7DB-4828-8A98-DB7BF159C273"; 
}) 
Change: { 
    kind = 1; 
    new = 0; 
} 

이것이 코어 데이터 예외인지 UIViewCollection 예외인지, 그리고 결국 어떻게 해결할 수 있는지 알 수 없습니다.

감사합니다.

답변

0

나는 가능한 오류를 줄이기 위해 먼저 시도 할 것이다. 첫 번째 제안은 셀에서 "DocumentCollectionViewCell"클래스를 제거하고 충돌이 여전히 발생하는지 확인하는 것입니다. 그렇다면 DocumentCollectionViewCell 클래스와 관련이 있으며 오류 초기화는 셀 초기화와 관련이 있습니다. 그렇다면 스택 위로 그리고 아마도 CollectionView의 대리인에있을 것입니다.

KVO에서 오류가 발생 했으므로 DocumentCollectionViewCell 및 대리인의 핵심 데이터 호출을 제거하는 것이 좋습니다.

관련 문제