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

6
  • I catch Zombies using profiler, profiler show me class name of zombie when my app crashes. Aug 27, 2015 at 14:53
  • I know the class I need to know which object
    – Chlebta
    Aug 27, 2015 at 14:59
  • Try putting a breakpoint on all exceptions
    – Jasper
    Aug 27, 2015 at 15:11
  • I don't have any exception blocks
    – Chlebta
    Aug 27, 2015 at 15:24
  • how do you know that it is zombie related error? Aug 27, 2015 at 16:13

1 Answer 1

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.

3
  • 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, 2015 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, 2015 at 6:54
  • Oh, that's bad… and I couldn't find anything about the top symbols?! Very wild guess, maybe this answer is related.
    – DarkDust
    Aug 28, 2015 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.