Re: hanging on NSUserDefaults setValue:forKey
Re: hanging on NSUserDefaults setValue:forKey
- Subject: Re: hanging on NSUserDefaults setValue:forKey
- From: "Mark A. Stratman" <email@hidden>
- Date: Mon, 2 Aug 2004 16:02:26 -0500
On Aug 2, 2004, at 12:31 PM, John Stiles wrote:
You should try getting a Shark or Sampler report when it's hung. It
might not be immediately useful info for you, but an Apple engineer
could probably make sense of it right away, and it's possible that it
might give you a clue as well.
On Aug 1, 2004, at 9:20 PM, Mark A. Stratman wrote:
My application seems to sporadically hang on the following call to
setValues:forKey, where 'date' is an NSDate
if (date != nil) {
[[NSUserDefaults standardUserDefaults] setValue:date
forKey:@"dateLastChecked"];
}
I've also sent this to an individual Apple developer, but in case
anyone else might see a problem here, included inline below is the
`sample` report.
- mark
Analysis of sampling pid 26916 every 10.000000 milliseconds
Call graph:
904 Thread_110b
904 start
904 start
904 main
904 NSApplicationMain
904 -[NSApplication run]
904 -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:]
904 _DPSNextEvent
904 BlockUntilNextEventMatchingListInMode
904 ReceiveNextEventCommon
904 RunCurrentEventLoopInMode
904 CFRunLoopRunSpecific
904 __CFRunLoopRun
904 __CFRunLoopDoSources0
904 _CFStreamSignalEventSynch
904 ReadStreamClientCallBack
904 -[DAClient handleNetworkEvent:]
904 -[DAClient
handleStreamComplete]
904 -[DAClient
informDelegateRequestFinished:]
904 -[DAWebMsgCheck
requestDidFinish:]
904 -[AppController
checkMessagesComplete:httpError:messages:dateLastChecked:]
904 -[NSUserDefaults
setObject:forKey:]
904
_CFApplicationPreferencesSet
904 updateDictRep
904 CFRelease
904
__CFDictionaryDeallocate
904
CFDictionaryRemoveAllValues
904 CFRelease
904
__CFDictionaryDeallocate
904
CFDictionaryRemoveAllValues
904
-[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:]
904
-[NSController observeValueForKeyPath:ofObject:change:context:]
904
-[NSController _notifyObserversForKeyPath:change:]
904 -[NSObject(NSKeyValueObservingPrivate)
_notifyObserversForKeyPath:change:]
904 -[NSTextValueBinder _observeValueForKeyPath:ofObject:context:]
904 -[NSValueBinder _observeValueForKeyPath:ofObject:context:]
904 -[NSValueBinder
_adjustObject:atIndex:observedController:observedKeyPath:context:
editableState:adjustState:]
904 -[NSBinder valueForBinding:resolveMarkersToPlaceholders:]
904 -[NSBinder
_valueForKeyPath:ofObject:atIndex:raisesForNotApplicableKeys:]
904 -[NSObject(NSKeyValueCoding) valueForKeyPath:]
904 -[NSUserDefaultsController _singleValueForKey:]
904 -[NSUserDefaults objectForKey:]
904 _CFApplicationPreferencesCreateValueForKey
901 __spin_lock_relinquish
901 __spin_lock_relinquish
3 __spin_lock
3 __spin_lock
904 Thread_1203
904 _pthread_body
904 forkThreadForFunction
904 -[NSUIHeartBeat _heartBeatThread:]
904 -[NSConditionLock lockWhenCondition:]
904 _pthread_cond_wait
904 semaphore_wait_signal_trap
904 semaphore_wait_signal_trap
904 Thread_1303
904 _pthread_body
904 __CFSocketManager
904 select
904 select
904 Thread_1403
904 _pthread_body
904 forkThreadForFunction
904 +[NSURLConnection(NSURLConnectionInternal)
_resourceLoadLoop:]
904 -[NSRunLoop run]
904 -[NSRunLoop runMode:beforeDate:]
904 CFRunLoopRunSpecific
904 __CFRunLoopRun
904 mach_msg
904 mach_msg_trap
904 mach_msg_trap
904 Thread_1503
904 _pthread_body
904 _loadRunLoop
904 select
904 select
904 Thread_1603
904 _pthread_body
904 forkThreadForFunction
904 +[NSURLCache _diskCacheSyncLoop:]
904 -[NSRunLoop run]
904 -[NSRunLoop runMode:beforeDate:]
904 CFRunLoopRunSpecific
904 __CFRunLoopRun
904 mach_msg
904 mach_msg_trap
904 mach_msg_trap
Total number in stack (recursive counted multiple, when >=5):
5 _pthread_body
Sort by top of stack, same collapsed (when >= 5):
mach_msg_trap 1808
select 1808
semaphore_wait_signal_trap 904
__spin_lock_relinquish 901
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.