NSString propertyList crash
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