4

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) 
rmaddy
  • 314,917
  • 42
  • 532
  • 579
WildWorld
  • 517
  • 1
  • 5
  • 18
  • show the code that's run when you have the crash? - remember the simulator is not an emulator. – Woodstock Apr 28 '14 at 09:17
  • Create an exception breakpoint and see where the problem occurs.. To create a breakpoint, refer this link: http://stackoverflow.com/questions/17802662/exception-breakpoint-in-xcode – GenieWanted Apr 28 '14 at 09:18
  • i have updated the question. I found out what crashes the app but i dont know why ? – WildWorld Apr 28 '14 at 09:41
  • Question: is `cellLabel.text` `nil`? Since you set its `attributedText`, but set its original text from its `text`, I'm wondering if this could be the error. – Larme Apr 28 '14 at 09:53
  • saddly its not. I set a dummy text @"text" and it still crashes. The funny thing is it works fine if online, but offline it crashes. I cant figure out. – WildWorld Apr 28 '14 at 09:55
  • 1
    Enable Zombies: http://stackoverflow.com/questions/10895871/ios-objc-msgsend-crash-with-no-report-or-warning-given – Larme Apr 28 '14 at 10:09

0 Answers0