carlbrown/PDKeychainBindingsController

Crash, if request data very often

digitalergonom opened this issue · 1 comments

bildschirmfoto 2013-10-29 um 20 20 37

On app start, we really often ask the controller for data from the keychain. We then ran into EXC_BAD_ACESS. Do you have a clue how to solve this?

I expect that _valueBuffer is created two times in two threads and then it's tried to saving the data in the old _valueBuffer.

Do you have a clue? :)

At the time this library was written, iOS4 was the current version of iOS and NSUserDefaults under iOS4 wasn't documented to be thread-safe (NSUserDefaults became thread-safe in (I think) iOS 5.0 or iOS5.1).

In any case, this library wasn't written to be thread-safe, so you'll need to use an external synchronization mechanism if you're calling it from multiple threads.