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

NSString propertyList crash


  • Subject: NSString propertyList crash
  • From: Tito Ciuro <email@hidden>
  • Date: Sun, 19 Mar 2006 18:10:35 -0800

Hello again,

Consider the following code:

NSString *dirPath = [@"~/Library/Preferences/ com.apple.Bluetooth.plist" stringByExpandingTildeInPath];
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile: dirPath];
NSString *desc = [dict description];
NSDictionary *newDict = [desc propertyList];


It seems that the Bluetooth plist is wrongly formatted (needs a missing semicolon) which crashes NSString's propertyList. Here's the backtrace:

#0 0x92902228 in -[NSException raise] ()
#1 0x9290207c in +[NSException raise:format:] ()
#2 0x92966f54 in -[NSString(NSExtendedStringPropertyListParsing) propertyList] ()
#3 0x0003cbc8 in -[MainController testBluetoothPlist:] (self=0x3450d0, _cmd=0x3450e0, sender=0x33ec80) at /Users/tciuro/ Desktop/OCTester/MainController.m:126


Since 'dict' is a valid dictionary and gets converted to a string, there is no reason why the opposite should not work, correct? I guess I should consider this as a bug, no?

Thanks,

-- Tito
_______________________________________________
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: NSString propertyList crash
      • From: Andy Lee <email@hidden>
    • Re: NSString propertyList crash
      • From: Keith Wilson <email@hidden>
  • Prev by Date: Non-Active Window Interaction
  • Next by Date: NSUserDefaults
  • Previous by thread: Re: Non-Active Window Interaction
  • Next by thread: Re: NSString propertyList crash
  • Index(es):
    • Date
    • Thread