5

I'm getting this error exc_bad_access code=1 address= xcodein my IOS app so I've tried to use the zombie tool like this :

Product->Profile->Zombies then I click on start recording (the red dot)

Also I've check the Enable Zombie Objects in

Product->Scheme->Edit scheme->Run->Diagnostics

The problem is when I'm using the zombie mode and I try to simulate the error, the error is not simulated, not detected. When I run my project in normal mode, debug, the error occurs and the app crash.

So what I've missed here ?
Note this is the first time I use the zombie tools. Thanks.

Update Error : enter image description here

Chlebta
  • 3,090
  • 15
  • 50
  • 99

1 Answers1

3

The problem with NSZombie here is that it keeps objects alive instead of deallocating them, but turns them into special objects that complain as soon as you try to call a method on them.

However, if you have some code like a block that just tries to access an instance variable (without calling a method on that object), this will now succeed as the object's memory region is now still available.

If you haven't done so already, simply try running your code in the normal debugger without NSZombie as that should tell you where the crash happens in the stack trace.

DarkDust
  • 90,870
  • 19
  • 190
  • 224
  • 2
    Normal debugger give me which thread but I can't guess which object is causing the issue. Also this bugs occurs only in iphone 5C for other device iphone 6, 5s and the different simulators this bug doesn't occurs – Chlebta Aug 27 '15 at 17:05
  • Do you mean that when the crash occurs, the stack trace in the debugger doesn't have a frame in your app? Maybe it would help if you took a screenshot of the stack trace and posted it to your question. – DarkDust Aug 28 '15 at 06:54
  • Oh, that's bad… and I couldn't find anything about the top symbols?! Very wild guess, maybe [this answer](http://stackoverflow.com/a/31483927/400056) is related. – DarkDust Aug 28 '15 at 09:56