Re: Strange crash with multithreading and -[NSUserDefaults synchronize]
Re: Strange crash with multithreading and -[NSUserDefaults synchronize]
- Subject: Re: Strange crash with multithreading and -[NSUserDefaults synchronize]
- From: Bill Bumgarner <email@hidden>
- Date: Sun, 12 Nov 2006 13:51:56 -0800
On Nov 12, 2006, at 9:10 AM, Martin Redington wrote:
I've seen various previous threads which discuss the thread-safety,
or not, of NSUserDefaults - I'm not so sure that they're directly
relevant here, given that we still get the crashes when the
NSUserDefaults calls are synchronized, or performed on the main
thread.
NSUserDefaults is documented as thread safe. If it isn't, it is a
bug. All things considered it is unlikely that NSUserDefaults has
such a bug that prevents thread safety in such a normal usage pattern.
If anyone has seen something like this before, or has any tips on
working out, from the debugger, what object its trying to access,
that would be wonderful.
-synchronize causes the user defaults object to likely walk all of
the user default's data in your app. As such, if you are over-
releasing some object passed into the user defaults, it is likely
that -synchronize might trip over it.
So, check your retain/release usage. Try running with NSZombies.
b.bum
_______________________________________________
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