• 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
Undocumented Foundation selector not recognized?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Undocumented Foundation selector not recognized?


  • Subject: Undocumented Foundation selector not recognized?
  • From: Tom Harrington <email@hidden>
  • Date: Mon, 31 Jan 2005 13:16:55 -0700

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

  • Follow-Ups:
    • Re: Undocumented Foundation selector not recognized?
      • From: Prachi Gauriar <email@hidden>
    • Re: Undocumented Foundation selector not recognized?
      • From: Evan Schoenberg <email@hidden>
  • Prev by Date: writing to a file...
  • Next by Date: Re: writing to a file...
  • Previous by thread: Re: writing to a file...
  • Next by thread: Re: Undocumented Foundation selector not recognized?
  • Index(es):
    • Date
    • Thread