• 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
SOLVED: HELP! NSUserDefaults crashing on me
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SOLVED: HELP! NSUserDefaults crashing on me


  • Subject: SOLVED: HELP! NSUserDefaults crashing on me
  • From: Joseph Jones <email@hidden>
  • Date: Sun, 8 Jun 2003 00:50:19 -0700

It appears I was using the NSShortDateFormat user default string without retaining it, and at a later time releasing it. Sigh...

joe

On Saturday, June 7, 2003, at 02:01 PM, Joseph Jones wrote:

For some reason, recently I have started to see NSUserDefualts crashing on me. CUrrently, I get the following exception:

2003-06-07 13:55:43.284 PMX[1840] Exception raised during posting of notification. Ignored. exception: [NSPlaceholderMutableString initWithString:]: nil string (or other) argument

When I try to call:

[[NSUserDefaults standardUserDefualt] stringForKey@"NSShortDateFormat"]

It appears that the call to NSUserDefualts is passing back a null string for this key, but I don't know why.

Other times, I get the following stack when my app crashes at another access to NSUserDefaulta:

#0 0x9068ba50 in objc_msgSend
#1 0x90131d18 in CFRetain
#2 0x9014d3fc in _CFApplicationPreferencesCreateValueForKey
#3 0x907ef580 in -[NSUserDefaults objectForKey:]
#4 0x908288d8 in -[NSUserDefaults stringForKey:]
#5 0x0000e6f8 in -[MainWndowController changeDateFormat:] at MainWndowController.m:895


#5 is calling the same type of NSUSerDateFormat access call as the one throwing the exception. It looks like the pref is being destroyed somehow, but I can't figure out how. I have commented out ALL writes to my preferences, and this pref call is calling into the user system defined prefs.

I hope SOMEONE can help me here as I am at wits end with this.

Thanx,
joe
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >HELP! NSUserDefaults crashing on me (From: Joseph Jones <email@hidden>)

  • Prev by Date: Re: Writing ID3 Tags
  • Next by Date: Re: NSWindow resizing hack?
  • Previous by thread: Re: HELP! NSUserDefaults crashing on me
  • Next by thread: Application Icons ....uh....nevermind.
  • Index(es):
    • Date
    • Thread