I have source code as following:
+ (NSDictionary *)incrementalUpdateTask
{
__block NSDictionary *result = nil;
__block BOOL isFinish = NO;
[EQPlatformManager getIncrementTaskWithSuccess:^(NSArray *deletedList, NSArray *updateList) {
result = @{@"delete":deletedList, @"update":updateList};
isFinish = YES;
} failed:^(NSError *error) {
isFinish = YES;
}];
while (!isFinish) {
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
beforeDate:[NSDate distantFuture]];
}
return result;
}
This code segment leads to exception as following:
0 CoreFoundation ___exceptionPreprocess + 124
1 libobjc.A.dylib objc_exception_throw + 56
2 CoreFoundation +[NSException raise:format:]
3 Foundation -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 88
4 UIKit __prepareForCAFlush + 500
5 UIKit __beforeCACommitHandler + 24
6 CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
7 CoreFoundation ___CFRunLoopDoObservers + 372
8 CoreFoundation CFRunLoopRunSpecific + 476
9 Foundation -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
10 MyAPPName +[EQUtil incrementalUpdateTask] (EQUtil.m:2317)
11 MyAPPName -[EQMainTaskViewController appDidBecomeActive] (EQMainTaskViewController.m:331)
This exception happens occasionally,and very hard to reproduce. Can some one help me?