Re: Stupid Instruments - how do I get NSZombies?
Re: Stupid Instruments - how do I get NSZombies?
- Subject: Re: Stupid Instruments - how do I get NSZombies?
- From: Keary Suska <email@hidden>
- Date: Thu, 22 May 2014 16:55:06 -0600
On May 22, 2014, at 4:13 PM, William Squires wrote:
> Okay, I've got a command-line app that keeps crashing (EXC_BAD_ACCESS) on [pool drain] (older non-GC, non-ARC code). To me, this means either; 1) an object created with init, new, or copy has somehow ended up in the pool, or 2) an object in the pool was send the release message before the pool got drained. I'm guessing #2.
> Is this what NSZombies are for? And if so, how do I get them to tell me what object is getting sent the release message twice? I've checked to make sure "Instrument code" is set to YES, and I went into the target's scheme on the left side and selected the "profile". This brought up a pane on the right, where I set "Build Configuration" to "Debug" and "Instrument" to "Zombies". I then select "Build for Profiling". This succeeds, but does nothing further. If I click the "Run" button, it runs it, but Instruments doesn't launch, and it still crashes on [pool drain]. If I click, and hold down, the "Run" button, I can select "Profile". This runs, and Instruments launches. Unfortunately, now the app no longer crashes, and it uses the "Allocations" instrument instead of the "Zombie" instrument, and I still can't tell what object is being released, and then sent a message... :(
> This is all with Xcode 4.2, BTW.
The easiest way is either to (new style Xcode) hold the option key and selected "Run..." under the "Products" menu and go t the "Diagnostics" tab or (old style Xcode) select the product and one of the tabs will show you environment variables that you can set. I think the variable is NSZombieEnabled o something like that. It shouldn't be hard to google.
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden