17

i need your help i've got this frustrating "random" error.

The app is compose of one Mapviewcontroller and a collectionview on the second controller.

Sometimes when I return to the map from the second controller the app suddenly crash with this error on the the "trap" line. The crash report doesn't point to any of my lines of code.

EXC_BREAKPOINT (code=EXC_ARM_BREAKPOINT, subcode=0xdefe)

enter image description here

I said "random error" because the same version of the same app could be build and run smooth for days, then suddenly it stuck. The only way to regain control of the app is to delete manually from the iPad and rebuild.

For your information the app uses Coredata.

Any ideas? Some method to figure out where the error come from?

Any help is appreciated, thanks!

Dko
  • 820
  • 6
  • 12
Dodgson86
  • 333
  • 1
  • 4
  • 15
  • Also happened to me, xcode did not point to any lines in my code. I tried enabling nszombies and it told me that I sent a message to a deallocated instance. – Keale Aug 29 '13 at 02:23
  • 1
    enable zombies then try profiling your app. press cmd+i and select zombies. in my case i added a "self." to an attribute and it was fixed. – Keale Aug 29 '13 at 07:31
  • @Keale thanks for the reply, I have enabled NSZombie and Core Data Debug activating `com.apple.CoreData.SQLDebug-1` but nothing came out… I still can't get logs or other indications of the origin of the exception – Dodgson86 Aug 29 '13 at 13:28
  • I'm afraid I can not help any further, I'm actually a newb iOS programmer so my knowledge is quite limited. But I think it has something to do with an attribute that is not used properly, i.e. no "self.", try looking for these it might fix the problem – Keale Aug 30 '13 at 07:58
  • 5
    Has anything come from this? I am frustrated trying to fix it, and if you solved it, it would be helpful to me and future programmers looking for the answer. – erdekhayser Sep 22 '13 at 13:40
  • I got this error because I had deleted a button in the .m file (the button's \@property and \@synthesize lines) but had forgotten to delete it from the .XIB file. Seems like a lot of things can cause this error however, not just my mistake. – Olivia Stork Apr 07 '15 at 16:37

2 Answers2

1

I had this error on line like that

NSLog(@"%@: tutorial view retain count = %ld",self.class,CFGetRetainCount(CFTypeRef(tutorialView)));

where tutorialView equals nil

fnc12
  • 2,241
  • 1
  • 21
  • 27
  • What kind of error? Can you show the complete code and also the error? – Ricky Jun 09 '14 at 03:58
  • 1
    Ricky, the same as on the screenshot. I cannot show you the complete code cause it is somewhere in one of thousands git's commits. I can explain you: the variable "tutorialView" was equal nil and the reason of the error is that you call CFGetRetainCount with nil argument – fnc12 Jun 09 '14 at 13:50
1

Restart your iOS device - that worked for me. You can also try restarting Xcode.

I was getting the crash where I had a breakpoint set, but I had breakpoints turned off. I think that there are glitches in how Xcode handles breakpoints that can cause this issue even if there aren't issues in the code itself.

jeremywhuff
  • 2,911
  • 3
  • 29
  • 33