Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Track a zombie object in xcode

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

like image 450
Chlebta Avatar asked Oct 31 '22 20:10

Chlebta


1 Answers

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.

like image 101
DarkDust Avatar answered Nov 15 '22 08:11

DarkDust