Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: How to debug *** -[NSCFString count]: unrecognized selector sent to instance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to debug *** -[NSCFString count]: unrecognized selector sent to instance



You might want to couple use of NSZombie with malloc_history. You can then find out the callstack when the memory was allocated for your undead object. See its man page to find what environment variables you must set to have it record info. When you get the message sent an autoreleased object message, run malloc_history <your app's pid> <the memory address> and look at the output.

—Jeremy

On Fri, Apr 17, 2009 at 10:25 AM, Joar Wingfors <email@hidden> wrote:

On 17 apr 2009, at 07.16, Marc Stibane wrote:

Any tips how I could find out which object the system wanted to send the message to in the first place?

Are there any debugging tools which e.g. mark (auto-)released objects as dead, but do not free their memory so that new allocations cannot take the same space? Then I could identify the original object...


Yes, and that facility is known as NSZombieEnabled:

       <http://www.google.com/search?q=site:developer.apple.com+NSZombieEnabled>

j o a r


_______________________________________________
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

 _______________________________________________
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

References: 
 >How to debug *** -[NSCFString count]: unrecognized selector sent to instance (From: Marc Stibane <email@hidden>)
 >Re: How to debug *** -[NSCFString count]: unrecognized selector sent to instance (From: Joar Wingfors <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.