由於無法滿足核心數據錯誤(引發NSObjectInaccessibleException
),測試人員遇到(iOS)應用程序在啓動時崩潰的情況。由於應用程序的第一件事是用託管對象填充表視圖,應用程序在啓動時會繼續崩潰。由於核心數據故障導致啓動時應用程序崩潰
問題很簡單。 我該如何解決這個問題,使測試人員至少可以繼續使用應用程序而不會丟失數據?
要爲這個問題提供更多的上下文,當表視圖單元格配置如下所示時,應用程序崩潰。該方法從tableView:cellForRowAtIndexPath:
調用。
- (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath {
// Fetch Store
CCDStore *store = [self.fetchedResultsController objectAtIndexPath:indexPath];
// Configure Cell
[cell.textLabel setText:[store name]]; // Exception is thrown due to Core Data fault
[cell.detailTextLabel setText:[store numberOfLists]];
}
因爲我沒有訪問該設備或(SQLite的)數據庫,我的猜測是數據庫的一部分包含導致故障損壞的數據。
我已經執行了這些檢查,但在這種情況下似乎不是問題。 – 2013-05-07 06:58:49