I get this error code when I ran the program on my iphone 5s iOS 7.1 or 7.1.1 it works just fine on the iOS simulator.
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
Error is : Thread 10:EXC_BAD_ACCESS( code =1,address=0x1a15cbeb8)
This is the code that return the error but only if offline. I use a coredata to save the values.
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"];
}
I found out what crashes the program. Its this little fella.
cellLabel.attributedText = theAttributedString;
Why does it work onnline but when u go offline is beyond me. Can any one explain ?
This is what i get when i enable zombies.
[NSStringDrawingTextStorage textContainerForAttributedString:containerSize:lineFragmentPadding:]: message sent to deallocated instance 0x170303690
(lldb)