I have a problem when my app quits on 10.9 (OK on 10.11):

0       __pthread_kill  10
1       abort   125
2       -[CFPrefsPlistSource alreadylocked_setValue:forKey:]    174
3       -[CFPrefsSource setValue:forKey:]       69
4       +[CFPrefsSource withSourceForIdentifier:user:byHost:container:perform:] 
839
5       _CFPreferencesSetValueWithContainer     215
6       -[NSUserDefaults setObject:forKey:]     38


I set a value in NSUserDefaults on receiving the ‘app will quit’ notification. 
As you can see, there’s an issue where some internal check aborts because… 
well, not sure: ‘already locked’???

Is there some reason that a prefs value can’t be written at quit time? This 
only seems to cause this problem on 10.9, 10.11 is fine, haven’t tested on 
10.10 yet. I also don’t think this was ever an issue on older OS either - this 
particular code is pretty old.

If it’s NOT legal to write a prefs value at quit time, how is one supposed to 
record persistent state that is only final by that time?

—Graham



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to