NSUserDefaults:setObject crash
<p>I trying to save app state on processing event applicationWillTerminate. But NSUserDefaults:setObject crashes in 30% cases if  UIAlertView with UITextField present on screen. Call stack looks like</p>

<pre><code>[NSUserDefaults setObject]
[NSNotificationCenter postNotificationName]
_CFXNotificationPostNotification
__CFXNotificationPost
_nsnote_callback
[UIKeyboardImpl defaultsDidChange]
[UIKeyboardImpl takeTextInputTraitsFrom]
[NSObjectCopy]
[UITextInputTraits copyWithZone]
[UITextInputTraits takeTraitsFrom]
[UITextInputTraits setInsertionPointColor]
objc_setProperty
objc_msgSend
</code></pre>

<p>Then CBR: Program received signal "EXC_BAD_ACCESS". How I can fix it? Thanks.</p>
