On Jun 13, 2009, at 1:25 PM, Martin Wierschin wrote:
I'm trying to set the NSZombieEnabled variable from the debugger, but it fails with a weird error:

        (gdb) set (BOOL)NSZombieEnabled=1
        Could not find OSO file: ""

I've done a clean build, made sure ZeroLink is off, and turned off all stripping. I'm not doing any remote debugging, which is the only thing the archives turns up. This is a simple 10.4 universal binary.

You can't set NSZombieEnabled after a program has started running. You need to set it as an environment variable and restart your app.

You can do this from Xcode's executable inspector's environment variables tab.

Or you can do it in gdb:

set env NSZombieEnabled=1
run

You might also want to enable stack logging:

set env MallocStackLoggingNoCompact=1

Thus, when your zombie is messaged, you can 'info malloc 0xDEADBEEF' (replace the address, obviously) and see where the bugger was allocated.

Or you can also do all of the above in Instruments, using the Zombies template. Though, frankly, Instruments has improved so much since the Leopard release, I'd highly recommend doing your dev work on Snow Leopard, if you have access.

Actually, all of the tools have improved so much, I do all of my dev work in Snow Leopard, booting back to Leopard for final testing / QA prior to release (for the very tiny handful of things I still do on Leopard, anyway :).

b.bum

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to