• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Undocumented Foundation selector not recognized?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undocumented Foundation selector not recognized?


  • Subject: Re: Undocumented Foundation selector not recognized?
  • From: Evan Schoenberg <email@hidden>
  • Date: Mon, 31 Jan 2005 15:48:29 -0600

My best guess if that you're messaging a released object; this will cause unexpected behavior which often manifests as a selector being sent in an instance of the wrong class (which I believe is because that memory space is now containing something else entirely, though the actual problem may be something else entirely).

Check if you are using an autoreleased object which would no longer be present, or if you have released an object more than you have retained it, etc.

-Evan

On Jan 31, 2005, at 2:16 PM, Tom Harrington wrote:

A user sent me the following error from their system (or console?) log:

*** -[NSCFData _fastCharacterContents]: selector not recognized

I'm having a hard time pinning this down, because
_fastCharacterContents is not a documented part of Foundation, is not
one of my own methods, and does not appear anywhere in my code.

Some Googling indicates that the method is probably an undocumented
part of NSString. In Darwin code it's called from
CFStringGetCharactersPtr(), which is part of CFString(). (Found this
out at <http://gobsd.com/code/darwin/CoreFoundation/String.subproj/ CFString.c>).


So it would seem this is a case of mistakenly storing an NSData in a
pointer to NSString, but how can I get this error message if I'm not
calling the method in question?

My theory is that this must come from calling some public method that
exists on both NSData and on NSString, and calling it on the NSData
stored as pointer-to-NSString.  As I understand it, the ObjC runtime
would call the NSString version of the method, which in turn might
call undocumented internal NSString methods on the NSData.

Does that theory seem to make sense?  Are there any other likely
causes of this error?

--
Tom Harrington
email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev 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. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Undocumented Foundation selector not recognized? (From: Tom Harrington <email@hidden>)

  • Prev by Date: Re: writing to a file...
  • Next by Date: Re: Undocumented Foundation selector not recognized?
  • Previous by thread: Undocumented Foundation selector not recognized?
  • Next by thread: Re: Undocumented Foundation selector not recognized?
  • Index(es):
    • Date
    • Thread