• 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: CFCopyLocalizedString crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFCopyLocalizedString crash


  • Subject: Re: CFCopyLocalizedString crash
  • From: Kevin Grant <email@hidden>
  • Date: Mon, 2 Feb 2004 20:54:50 -0600

I use CFCopyLocalizedString all over the place to load strings. Works great. One beta tester said my app crashes as soon as he launches it. I tried running my app on my old G3 with 10.3.3 installed and it crashes when the pref loading code calls CFCopyLocalizedString(CFSTR("PrefsFileName"), nil); What could be wrong with that? . . . . .
Hmm, thinking that my passing nil as the 2nd parm might be causing the crash, I changed it to "", then to "PrefsFileName". Neither make it work. If I debug on the G3, the stack looks like this when I get the bad access: . . .

It would appear that the 2nd parameter to CFCopyLocalizedString() is not even used to make the call (by examining what the #defines actually do), which means it is only there for the benefit of the "genstrings" tool. Do you use that?


Another suggestion might be to examine preprocessor output from the compiler, just to be absolutely sure of what you're getting when all the #defines are resolved.

FWIW I always use the CFCopyLocalizedStringFromTable() variant...

Kevin G.
http://homepage.mac.com/kmg/
mail to kevin at ieee dot org
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.

References: 
 >CFCopyLocalizedString crash (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Code collapse/expand
  • Next by Date: Re: Code collapse/expand
  • Previous by thread: CFCopyLocalizedString crash
  • Next by thread: STLport, boost & undefined symbols in Xcode
  • Index(es):
    • Date
    • Thread