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
8
votes
2 answers

iOS libsystem_c.dylib strdup memory leak NSZombie not working

Please help me track down an iOS memory leak. Thanks! I'm using xCode 4.0.1 and I tried to activate NSZombie to track a memory leak, but it doesn't seems to work as before, with xCode 3.x I can't find out where the memory leak is coming from, as…
neowinston
  • 7,584
  • 10
  • 52
  • 83
7
votes
3 answers

How to set environment variables in iPhone executable using XCode 4?

Since switching to XCode 4, I have been having issues finding how to set environment variables (such a NSZombies) in iPhone executables. In XCode 3, you could right-click on your .app file, select "Get Info" and set environment variables. But it…
Jason
  • 14,517
  • 25
  • 92
  • 153
7
votes
3 answers

Having a zombie issue on UISearchDisplayController

I am having a zombie while using a UISearchDisplayController with a UITableView. The UISearchDisplayController (and the rest of the view) is set via interface builder (storyboard on xcode 5 and using ARC and iOS 7 only). The searchDisplayController…
7
votes
1 answer

How do I debug EXC_BAD_ACCESS code=2 while using ARC

I see alot of threads on here about how to solve the EXC_BAD_ACCESS code=2, and the consensus seems to be that I am trying to access my array, or an object in my array after I have already released it. I see that most of the time the solutions…
jonathan3087
  • 313
  • 1
  • 4
  • 18
6
votes
4 answers

How can I demonstrate a zombie object in Swift?

I've read How to demonstrate memory leak and zombie objects in Xcode Instruments? but that's for objective-c. The steps don't apply. From reading here I've understood zombies are objects which are: deallocated but something pointer is still trying…
mfaani
  • 33,269
  • 19
  • 164
  • 293
6
votes
1 answer

GPPSignIn sharedInstance -> EXC_BAD_ACCESS (code = EXC_I386_GPFLT)

It seems that everything was fine for a long time and yesterday without any visible reasons I started to get error EXC_BAD_ACCESS (code = EXC_I386_GPFLT) on the next line on emulator (everything is ok on real device): GPPSignIn *signIn =…
Dmitry Sikorsky
  • 1,374
  • 14
  • 23
6
votes
2 answers

An Objective-C message was sent to a deallocated object (zombie) at address: 0x75d52a0

I am relatively new to iOS development so appreciate your help in finding out the root cause for the error that I encountered. I tried to debug the error using Instruments (i.e. Allocations-Zombie Profiler) but I could not make sense of the call…
user1881383
  • 61
  • 1
  • 4
5
votes
1 answer

ios Zombie detection

I'm having (in my opinion) a very difficult problem in my code. It crashes randomly at different places in the code. The project is a ARC project. So my program crashes occaisonally with this messages: malloc: *** error for object 0xd2dd8b0:…
toom
  • 12,864
  • 27
  • 89
  • 128
5
votes
1 answer

_NSZombie_NSKeyValueUndefinedGetter - What is this?

Hey everyone, I'm getting a senseless error when I load an application I'm writing for the first time. Class _NSZombie_NSKeyValueUndefinedGetter is implemented in both ?? and ??. One of the two will be used. Which one is undefined. Anyone's had…
Olsi
  • 929
  • 2
  • 12
  • 26
5
votes
2 answers

Objective-c example code that intentionally messages a deallocated object

I'm new to objective-c and xcode and an app I'm currently writing is receiving the infamous EXC_BAD_ACCESS error. Almost everybody recommends starting to solve the problem using NSZombies. I think I have NSZombies working but xcode isn't giving me…
Alex Crist
  • 1,059
  • 2
  • 12
  • 22
5
votes
2 answers

Alternative to NSZombie

I'm trying to debug an EXC_BAD_ACCESS crash using NSZombie. My app creates lots of large objects though and with NSZombie enabled they aren't getting released causing the app to crash in seconds. This means I can't even cause the EXC_BAD_ACCESS…
user470763
4
votes
3 answers

How do you enable NSZombie in Instruments of Xcode 4.1 under Lion?

This is ONLY regarding the new Xcode 4.1, specifically running on Lion. How do you enable NSZombie in Instruments ? It is no longer in Allocations in the (i) icon under Launch Configuration as in Xcode 4.0. Nor is there a Library entry called…
Ric
  • 796
  • 12
  • 28
4
votes
2 answers

Why does object become NSZombie only when inherit from NSObject?

I created a new project, enabled Zombie Objects (Edit Scheme -> Diagnostics). I initialized two objects: ZombieTest and ZombieTest2(inherit from NSObject). After running the app, I opened debug memory graph and only the object that inherit from…
Hen Shabat
  • 519
  • 1
  • 6
  • 19
4
votes
2 answers

XCode Zombies shows CFArray increasing Live Bytes

I've not used Zombies before, and must admit I'm not that sure what it's doing. However, one thing concerns me: CFArray seems to be continually increasing its Live Bytes and # Living columns, along with a couple of mallocs, which I presume are…
Dave
  • 3,438
  • 20
  • 13
4
votes
1 answer

Debugging over-released objects, problem with NSZombie

EDIT: I have found the cause of this crash! bbum pointed out that buffer overflows are a very common cause for this, so I looked at the only buffer type malloc I had: closedList = (AINavigationCell **)malloc(baseCells.count * sizeof(AINavigationCell…
Morrowless
  • 6,856
  • 11
  • 51
  • 81
1
2
3
14 15