Ios libobjc.A.dylib`objc\u msgSend:EXC\u BAD\u访问

Ios libobjc.A.dylib`objc\u msgSend:EXC\u BAD\u访问,ios,exc-bad-access,Ios,Exc Bad Access,当我在iphone 5s iOS 7.1或7.1.1上运行程序时,我得到了这个错误代码。它在iOS模拟器上运行正常 libobjc.A.dylib`objc_msgSend: 0x1903a01c0: cmp x0, #0 0x1903a01c4: b.le 0x1903a0230 ; objc_msgSend + 112 0x1903a01c8: ldr x13, [x0, 0] 0x1903a01cc: and x9, x13, #0

当我在iphone 5s iOS 7.1或7.1.1上运行程序时,我得到了这个错误代码。它在iOS模拟器上运行正常

libobjc.A.dylib`objc_msgSend:
0x1903a01c0:  cmp    x0, #0
0x1903a01c4:  b.le   0x1903a0230               ; objc_msgSend + 112
0x1903a01c8:  ldr    x13, [x0, 0]
0x1903a01cc:  and    x9, x13, #0x1fffffff8
0x1903a01d0:  ldp    x10, x11, [x9, #16] // this line gives an error
0x1903a01d4:  and    w12, w1, w11
0x1903a01d8:  add    x12, x10, x12, lsl #4
错误是:线程10:EXC\u错误\u访问(代码=1,地址=0x1a15cbeb8)

这是只在脱机时返回错误的代码。我使用coredata来保存值

 if([[purchased objectAtIndex:locator]boolValue])
        {
            NSAttributedString *theAttributedString;
            theAttributedString = [[NSAttributedString alloc] initWithString:cellLabel.text
                                                                  attributes:@{NSStrikethroughStyleAttributeName:
                                                                                   [NSNumber numberWithInteger:NSUnderlineStyleSingle]}];
            cellLabel.attributedText = theAttributedString;
            [cellLabel setTextColor:[UIColor colorWithRed:163/255.0f green:135/255.0f blue:138/255.0f alpha:1.0f]];
            [cellLabel1 setTextColor:[UIColor colorWithRed:189/255.0f green:167/255.0f blue:169/255.0f alpha:1.0f]];
            imgView.image = [UIImage imageNamed: @"checkbox-checked.png"];

        }
        else
        {
            [cellLabel setTextColor:[UIColor colorWithRed:60/255.0f green:0/255.0f blue:0/255.0f alpha:1.0f]];
            [cellLabel1 setTextColor:[UIColor colorWithRed:80/255.0f green:37/255.0f blue:37/255.0f alpha:1.0f]];
            imgView.image = [UIImage imageNamed: @"checkbox.png"];
        }
我发现是什么使程序崩溃了。就是这个小家伙

cellLabel.attributedText = theAttributedString;
为什么它能在网上工作,但当你离线时,我就无能为力了。有人能解释吗

这就是我启用僵尸时得到的结果

[NSStringDrawingTextStorage textContainerForAttributedString:containerSize:lineFragmentPadding:]: message sent to deallocated instance 0x170303690
(lldb) 

显示发生崩溃时运行的代码?-请记住,模拟器不是模拟器。请创建一个异常断点,然后查看问题发生的位置。。要创建断点,请参考以下链接:我已更新了问题。我发现是什么使应用程序崩溃了,但我不知道为什么?问题:是
celllable.text
nil
?由于您设置了它的
属性文本
,但从它的
文本
设置了它的原始文本,我想知道这是否是错误。启用僵尸: