Ios NSFireDelayedPerform调用“+[ABContactView PrecachedCells]”,有时会崩溃

Ios NSFireDelayedPerform调用“+[ABContactView PrecachedCells]”,有时会崩溃,ios,objective-c,Ios,Objective C,在ios 7.1.2ios6和ios 8中启动时,我的应用程序有时会崩溃,堆栈跟踪显示调用了“+[ABContactView PrecachedCells]”,但我的应用程序不需要访问通讯簿,我不知道为什么会发生这种情况,有人能给我一些帮助吗 日志: 2月2日15:32:02测试iPad MyAPP[6741]:***无效断言失败_UIPerformResizeofTextContainerSlayoutManager*、UIView*、NSTextContainer*、NSInteger、/S

在ios 7.1.2ios6和ios 8中启动时,我的应用程序有时会崩溃,堆栈跟踪显示调用了“+[ABContactView PrecachedCells]”,但我的应用程序不需要访问通讯簿,我不知道为什么会发生这种情况,有人能给我一些帮助吗

日志:

2月2日15:32:02测试iPad MyAPP[6741]:***无效断言失败_UIPerformResizeofTextContainerSlayoutManager*、UIView*、NSTextContainer*、NSInteger、/SourceCache/UIFoundation/UIFoundation-264.8/UIFoundation/TextSystem/NSLayoutManager\u Private.m:1510

2月2日15:32:03测试iPad MyAPP[6741]:***由于未捕获异常“nsInternalInconsistenceException”而终止应用程序,原因:“仅在主线程上运行!”

*** First throw call stack:
(0x2dc94ecb 0x3875fce7 0x2dc94d9d 0x2e642e8b 0x35b2fe59 0x35b2fba3 0x35b2fc0d 0x35b5d711 0x3056bcc1 0x35b79367 0x35b5b559 0x35b5bb5b 0x35b2fca7 0x35b31823 0x35b324a5 0x35b5f15b 0x305698a1 0x35b35d2f 0x35b35da3 0x35b59fa5 0x35b795b1 0x3056973b 0x3056953b 0x30568df1 0x30699c4f 0x305bbe45 0x304dfaf1 0x305be497 0x2dbd938f 0x2dbd929f 0x304d076b 0x305bcae5 0x304c6555 0x304c62e5 0x3014231b 0x3013db3f 0x304db481 0x305fdfcf 0x2d2e9189 0x2d2cc3e1 0x2d2ee481 0x2e675117 0x2dc5ff0f 0x2dc5fb2b 0x2dc5deb3 0x2dbc8729 0x2dbc850b 0x2e5bc497 0x2e60d259 0x3053ef 0x2e5c9875 0x2e66d745 0x38c4d25f 0x38c4e689 0x38c4e8dd 0x38d79c17 0x38d79adc)
*** First throw call stack:
(0x2dc94ecb 0x3875fce7 0x2dc94d9d 0x2e642e8b 0x35b2fe59 0x35b2fba3 0x35b2fc0d 0x35b5d711 0x3056bcc1 0x35b79367 0x35b5b559 0x35b5bb5b 0x35b2fca7 0x35b31823 0x35b324a5 0x35b5f15b 0x305698a1 0x35b35d2f 0x35b35da3 0x35b59fa5 0x35b795b1 0x3056973b 0x3056953b 0x30568df1 0x30699c4f 0x305bbe45 0x304dfaf1 0x305be497 0x2dbd938f 0x2dbd929f 0x304d076b 0x305bcae5 0x304c6555 0x304c62e5 0x3014231b 0x3013db3f 0x304db481 0x305fdfcf 0x2d2e9189 0x2d2cc3e1 0x2d2ee481 0x2e675117 0x2dc5ff0f 0x2dc5fb2b 0x2dc5deb3 0x2dbc8729 0x2dbc850b 0x2e5bc497 0x2e60d259 0x3053ef 0x2e5c9875 0x2e66d745 0x38c4d25f 0x38c4e689 0x38c4e8dd 0x38d79c17 0x38d79adc)
2月2日15:32:03测试iPad MyAPP[6741]:***由于未捕获异常“nsInternalInconsistenceException”而终止应用程序,原因:“仅在主线程上运行!”

*** First throw call stack:
(0x2dc94ecb 0x3875fce7 0x2dc94d9d 0x2e642e8b 0x35b2fe59 0x35b2fba3 0x35b2fc0d 0x35b5d711 0x3056bcc1 0x35b79367 0x35b5b559 0x35b5bb5b 0x35b2fca7 0x35b31823 0x35b324a5 0x35b5f15b 0x305698a1 0x35b35d2f 0x35b35da3 0x35b59fa5 0x35b795b1 0x3056973b 0x3056953b 0x30568df1 0x30699c4f 0x305bbe45 0x304dfaf1 0x305be497 0x2dbd938f 0x2dbd929f 0x304d076b 0x305bcae5 0x304c6555 0x304c62e5 0x3014231b 0x3013db3f 0x304db481 0x305fdfcf 0x2d2e9189 0x2d2cc3e1 0x2d2ee481 0x2e675117 0x2dc5ff0f 0x2dc5fb2b 0x2dc5deb3 0x2dbc8729 0x2dbc850b 0x2e5bc497 0x2e60d259 0x3053ef 0x2e5c9875 0x2e66d745 0x38c4d25f 0x38c4e689 0x38c4e8dd 0x38d79c17 0x38d79adc)
*** First throw call stack:
(0x2dc94ecb 0x3875fce7 0x2dc94d9d 0x2e642e8b 0x35b2fe59 0x35b2fba3 0x35b2fc0d 0x35b5d711 0x3056bcc1 0x35b79367 0x35b5b559 0x35b5bb5b 0x35b2fca7 0x35b31823 0x35b324a5 0x35b5f15b 0x305698a1 0x35b35d2f 0x35b35da3 0x35b59fa5 0x35b795b1 0x3056973b 0x3056953b 0x30568df1 0x30699c4f 0x305bbe45 0x304dfaf1 0x305be497 0x2dbd938f 0x2dbd929f 0x304d076b 0x305bcae5 0x304c6555 0x304c62e5 0x3014231b 0x3013db3f 0x304db481 0x305fdfcf 0x2d2e9189 0x2d2cc3e1 0x2d2ee481 0x2e675117 0x2dc5ff0f 0x2dc5fb2b 0x2dc5deb3 0x2dbc8729 0x2dbc850b 0x2e5bc497 0x2e60d259 0x3053ef 0x2e5c9875 0x2e66d745 0x38c4d25f 0x38c4e689 0x38c4e8dd 0x38d79c17 0x38d79adc)
。。。

崩溃:

。。。。。

我的部分代码:

@implementation HttpOperation

- (void)main
{  
    [[NSThread currentThread] setName:@"com.xyz.abc"];

    // loop timer
    NSTimeInterval reportPeriod = 120;
    NSTimer *loopTimer = [NSTimer scheduledTimerWithTimeInterval:reportPeriod
                                                          target:self
                                                        selector:@selector(periodReport)
                                                        userInfo:nil
                                                         repeats:YES];

    [[NSRunLoop currentRunLoop] addTimer:loopTimer forMode:NSDefaultRunLoopMode];

    while (TRUE) {
        if ([self isCancelled]) {

            break;
        }

        [[NSRunLoop currentRunLoop] run];

    }

}

...

@end

根据您的崩溃报告,您似乎试图在后台线程上调整文本视图的大小…在后台线程上更新ui的原因是“NSFireDelayedPerform calls+[ABContactView PrecacheditCells]”,但我的代码没有这样做,为什么会发生这种情况?没有看到任何代码,很难说。@rebello95 hi,代码已添加,请看一看。谢谢这是你的定期报告代码?