这是内部绘图矩形 :
NSString *generated = [Entry generateString];
const char *cString = (const char*)[generated UTF8String];
dispatch_queue_t queue = dispatch_queue_create(cString, NULL);*/
dispatch_async(queue, ^{
Media *media = [self.entry.media objectAtIndex:i];
UIImage *image = [media getThumbnail];
dispatch_async(dispatch_get_main_queue(), ^{
int bottom = [JHomeViewCell yOfMessageBottomWithMessageHeight:self.cellInfo.messageHeight
withMonth:self.cellInfo.hasMonth];
CGRect frame = CGRectMake(87 + (68 * i),
bottom,
THUMBNAIL_SIZE.width,
THUMBNAIL_SIZE.height);
[image drawInRect:frame];
});
});
现在,它正在崩溃到对象AtIndex 线上。 它不是一个无效的索引。 代码在这里外面工作正常 。
我有一个错误:
Terminating app due to uncaught exception NSInternalInconsistencyException , reason: statement is still active
EDIT2:我输入了NSLogs, 最先得到媒体的. count。 它以同样的错误坠毁 。