Questions tagged [nszombie]

NSZombie is an Apple OS-specific (OSX and iOS) tool for debugging issues with reference-counting.

NSZombie is an Apple OS-specific (OSX and iOS) tool for debugging issues with reference-counted objects. In particular, it helps you track down objects that are over-released by recording a history of all -retain and -release messages sent to all objects created during execution.

When NSZombie is enabled, unbalanced -retain and -release messages cause the application to immediately halt and break into the debugger. This allows you to examine the problematic message to determine if there is an extraneous -release (or -autorelease), or a missing -retain.

Resources

223 questions
4
votes
2 answers

breakpoint to cause iOS app to stop immediately when messaging a zombie object?

I have a memory management bug in my iOS app. I have set NSZombieEnabled, and the "message sent to deallocated object" message duly appears in the console. But execution appears to go past the point of that message before the app crashes. At a…
William Jockusch
  • 26,513
  • 49
  • 182
  • 323
4
votes
2 answers

iphone memory management strange issue

This is a piece of code I had written in xcode Foo * myFoo = [[Foo alloc] init] ; [myFoo release] ; [myFoo printMessage] ; If I am right, it should give a runtime error when printmessage function is called as myFoo gets deallocated by that time.…
abhijit
  • 41
  • 1
4
votes
4 answers

respondsToSelector send to deallocated object

I try to find out why my app crashes (RSS Reader) if I send a wrong URL to NSXML Parser. I got an EXC_BAD_ACCESS. So after some Searching I found out that I have to use Zombies. So I added the following arguments to the environment: CFZombieLevel =…
testing
  • 19,681
  • 50
  • 236
  • 417
4
votes
3 answers

-[CALayer retain]: message sent to deallocated instance

I'm developing an iphone app and when I turn on my NSZombieEnabled I have regularly a crash on error : *** -[CALayer retain]: message sent to deallocated instance 0xe6012e0 It always come when I push or pop a view in my view controller. Sometimes…
Romain Piel
  • 11,017
  • 15
  • 71
  • 106
4
votes
1 answer

What does "Class _NSZombie_OS_voucher is implemented in both ?? and ??" mean?

I got the following message in Xcode when I had both Address Sanitizer and Zombie Objects enabled in my scheme's diagnostics options, and ran the project: objc[656]: Class _NSZombie_OS_voucher is implemented in both ?? and ??. One of the two will be…
Emil Laine
  • 41,598
  • 9
  • 101
  • 157
4
votes
1 answer

Difference between Instruments (Zombies and leaks)

I'm now managing the 'memory' of my new app', but i found a difference that i don't understand. Look at this pic : The allocations curves are not similar at all. It's from Zombie mode, and Leaks analyzer. But why is it different because the curves…
user2057209
  • 345
  • 1
  • 6
  • 19
4
votes
0 answers

XCode: with lldb, how would I call po on zombie object?

I have a crash in some code that happens only when the app is busy running several NSOperations at once. With Zombies enabled (I am on ARC with a OS X app), I get a nice message like: -[__NSDictionaryM release]: message sent to deallocated…
Tom Andersen
  • 7,132
  • 3
  • 38
  • 55
3
votes
3 answers

ASIHTTPRequest and Zombies...

SOLVED (I think): Set ASIHTTPRequest delegate/NSOperationQueue delegate to nil after the vc is popped (in the dealloc). Before I start, this question is similar but not the same. My app is very near release, however this is the only persistent bug…
Alex Coplan
  • 13,211
  • 19
  • 77
  • 138
3
votes
1 answer

~500 NSZombie warnings on Xcode memory graph from iOS 13 application

When I build a memory graph of my app I see ~500 memory warnings. When I look these are all in the Malloc Blocks category and are all (mostly) prefixed with NSZombie. I'm assuming this is what it normally looks like when running on device but I want…
mac38478
  • 169
  • 5
3
votes
1 answer

iOS 4.2 OS is calling viewDidUnload of a Zombie (unallocated class)

I have a set of UIViewControllers that I pile up with a NavigationController. When I get to the last element of this pile, I do a popToRootViewController. If I try to create this pile again (and yes, I do use some load of memory in my views) the…
3
votes
2 answers

error for object 0xb50dd20: double free

Is anyone familiar with the problem. I have read this post however its hard for me to provide code when I don't have any idea where in the code the error originates. Any one have any ideas? Name(9369,0xa09cd500) malloc: * error for object…
TheLearner
  • 19,387
  • 35
  • 95
  • 163
3
votes
2 answers

How to use Zombie while debugging iPhone application?

How to use Zombie while debugging iPhone application?
Matrix
  • 7,477
  • 14
  • 66
  • 97
3
votes
0 answers

Can not enable NSZombieEnabled

I am using xcode_3.2.3_and_ios_sdk_4.0.1 and I setup everything the below. To enable it (in xcode) 1. Double-click an executable in the Executables group of your Xcode project. 2. Click the Arguments tab. 3. In the “Variables to be set in the…
mooongcle
  • 3,987
  • 5
  • 33
  • 42
3
votes
1 answer

UITextField textInputView message sent to deallocated instance

I have crashes which occur when I tap on UITextField. I have two controllers, let's say A and B. When I show controller B modally in controller A, and tap on UITextField everything is OK. Then I dismiss controller B, and present it again. This time…
Shyngys Kassymov
  • 718
  • 11
  • 21
3
votes
1 answer

Zombie in Game Center's [addPlayersToMatch] inside a 20-liner project

I'm out of my depth with a zombie. findMatchForRequest: is inadequate for consistent matchmaking, hence the use of [addPlayersToMatch:matchRequest:completionHandler:] where it presumably crashes: -[__NSMallocBlock__ intValue]: unrecognized selector…
Blaz
  • 3,548
  • 5
  • 26
  • 40
1 2
3
14 15