> On Mar 26, 2017, at 10:04 PM, Gerriet M. Denkmann <[email protected]> wrote:
> 
> Yes, you are right. And I have to apologise for not spotting this:
> 
> *** Terminating app due to uncaught exception 'NSInvalidArgumentException', 
> reason: '*** setObjectForKey: object cannot be nil (key: SortedKeys.plist)'

I recommend always having an exception breakpoint set, to catch things like 
this.

> I suspect that this might be a rare timing issue, i.e. SortedKeys.plist has 
> not been fully written when serializedRepresentation is called.

Is the snippet you posted all code running in the same thread/queue? If so, 
there couldn’t be a race condition between writing the plist and reading it. If 
not, you need some synchronization between the two operations (the specifics 
would depend on the details of your program.)

—Jens
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to