Thread Safety and Cocoa
Thread Safety and Cocoa
- Subject: Thread Safety and Cocoa
- From: Steve Gehrman <email@hidden>
- Date: Wed, 22 Jan 2003 19:06:14 -0800
When is Cocoa going to be thread safe? I don't know about the rest of
you, but simple stuff in Cocoa that is suppose to be thread safe is not.
NSImage is one big problem. Since NSImage is so slow, I'm trying to
render the image in a thread by using
NSImage* image = [[[NSImage alloc] initWithContentsOfFile:[[param
desc] path]] autorelease];
[image lockFocus];
[image unlockFocus];
This will randomly crash/deadlock/etc. In this case, it was a simple
3k tiff file. I've been reporting bugs since Rhapsody beta's and this
stuff is still super buggy.
500 Thread_1203
500 start
500 _start
500 main
500 NSApplicationMain
500 -[OAApplication run]
500 -[NSApplication run]
500 -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:]
500 _DPSNextEvent
500 BlockUntilNextEventMatchingListInMode
500 ReceiveNextEventCommon
500 RunCurrentEventLoopInMode
500 CFRunLoopRunSpecific
500 __CFRunLoopRun
500 __CFRunLoopDoObservers
500 _handleInvalidCursorRectsNote
500 -[NSWindow resetCursorRects]
500 -[NSView _resetCursorRects]
500 -[NSArray
makeObjectsPerformSelector:withObject:]
500 -[NSView
_resetCursorRects]
500 -[NSArray
makeObjectsPerformSelector:withObject:]
500 -[NSView
_resetCursorRects]
500 -[NSSplitView
resetCursorRects]
500 +[NSImage
imageNamed:]
500 +[NSImage
_imageNamed:]
500
_NSAppKitImgLock
500
-[NSRecursiveLock lock]
500
_pthread_cond_wait
500
semaphore_wait_signal_trap
500
semaphore_wait_signal_trap [STACK TOP]
500 Thread_1303
500 _pthread_body
500 CMMConvTask(void*)
500 pthreadSemaphoreWait(t_pthreadSemaphore*)
500 _pthread_cond_wait
500 semaphore_wait_signal_trap
500 semaphore_wait_signal_trap [STACK TOP]
500 Thread_1403
500 _pthread_body
500 forkThreadForFunction
500 -[NSUIHeartBeat _heartBeatThread:]
500 -[NSConditionLock lockWhenCondition:]
500 _pthread_cond_wait
500 semaphore_wait_signal_trap
500 semaphore_wait_signal_trap [STACK TOP]
500 Thread_1503
500 _pthread_body
500 forkThreadForFunction
500 -[NTThreadWorker workerMethod:]
500 -[PreviewProcessorThread doWorkerMethod:]
500 -[NSImage lockFocus]
500 -[NSImage _lockFocusOnRep:]
500 -[NSImage _cacheRepresentation:stayFocused:]
500 -[NSImage _focusOnCache:]
500 _NXAllocateImageCache
500 GetSharedSpaceFor
500 GrowCacheWindow
500 -[NSWindow
_setFrameCommon:display:stashSize:]
500 -[NSWindow _oldPlaceWindow:]
500 -[NSNextStepFrame setFrameSize:]
500 -[NSView setFrameSize:]
500 -[NSView _invalidateFocus]
500 -[NSView
_invalidateGStatesForTree]
500 -[NSArray
makeObjectsPerformSelector:withObject:]
500 -[NSView
_invalidateGStatesForTree]
500 -[NSView(NSSurface)
_surface]
500 _NSAppKitLock
500 -[NSRecursiveLock
lock]
500 _pthread_cond_wait
500
semaphore_wait_signal_trap
500
semaphore_wait_signal_trap [STACK TOP]
_______________________________________________
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.