detachDrawingThread problem
detachDrawingThread problem
- Subject: detachDrawingThread problem
- From: Benjamin Golinvaux <email@hidden>
- Date: Fri, 30 Aug 2002 12:33:13 +0200
Hello
I would like to know what needs to be done to ensure a separate appkit
thread does not cause problems. because, in our project, we're creating
a drawing thread using detachDrawingThread,
but this often leads to a deadlock....
Here are the back traces :
THREAD 0 (the "normal" appkit thread) :
#0 0x70946388 in semaphore_wait_signal_trap () at
streams_internal.c:247/SourceCache/Libstreams/Libstreams-23/
#1 0x70946150 in _pthread_cond_wait (cond=0x427aff4, mutex=0x427afc8,
abstime=0x3e8, isRelative=1889558224) at
/SourceCache/Libc/Libc-262/pthreads/pthread_cond.c:290/private/var/tmp/
Libc_profile/Libc_profile-262.obj~1/obj.ppc/
#2 0x6fbe1ef0 in -[NSRecursiveLock lock] ()
#3 0x697d550c in _NSAppKitImgLock (line=446, file=0x6985e9e0
"AppKit.subproj/NSImage.m") at
AppKit.subproj/threading.m:94/SourceCache/AppKit/AppKit-663/
#4 0x695bd4e8 in +[NSImage _imageNamed:] (self=0xe, _cmd=0x2e03,
aString=0x698e0ad0) at
AppKit.subproj/NSImage.m:446/SourceCache/AppKit/AppKit-663/
#5 0x695bda54 in +[NSImage imageNamed:] (self=0x698fb4ec, _cmd=0x2e03,
aString=0x698e0ad0) at
AppKit.subproj/NSImage.m:595/SourceCache/AppKit/AppKit-663/
#6 0x696d1930 in -[NSSplitView resetCursorRects] (self=0x50bab10,
_cmd=0x2e03) at
/System/Library/Frameworks/Foundation.framework/Headers/
NSGeometry.h:45/SourceCache/AppKit/AppKit-663/
....
THREAD 1 (the drawing thread) :
#0 0x70946388 in semaphore_wait_signal_trap () at
streams_internal.c:247/SourceCache/Libstreams/Libstreams-23/
#1 0x70946150 in _pthread_cond_wait (cond=0x427af94, mutex=0x427af68,
abstime=0x3e8, isRelative=1889558224) at
/SourceCache/Libc/Libc-262/pthreads/pthread_cond.c:290/private/var/tmp/
Libc_profile/Libc_profile-262.obj~1/obj.ppc/
#2 0x6fbe1ef0 in -[NSRecursiveLock lock] ()
#3 0x697d53f4 in _NSAppKitLock (line=8320, file=0x69893e94
"AppKit.subproj/NSWindow.m") at
AppKit.subproj/threading.m:33/SourceCache/AppKit/AppKit-663/
#4 0x697a8818 in -[NSWindow _threadContext] (self=0x5335900,
_cmd=0x3303) at
AppKit.subproj/NSWindow.m:8320/SourceCache/AppKit/AppKit-663/
#5 0x695c64e4 in -[NSImage _composite:delta:fromRect:toPoint:]
(self=0x5336030, _cmd=0x3303, op=1, delta=0, fromRect=0xf02e4928,
point=0xf02e4920) at
AppKit.subproj/NSImage.m:3831/SourceCache/AppKit/AppKit-663/
#6 0x695c51c8 in -[NSImage compositeToPoint:fromRect:operation:]
(self=0x5335e90, _cmd=0x3303, point={x = 0, y = 0}, rect={origin = {x =
0, y = 0}, size = {width = 10, height = 45}}, op=NSCompositeCopy) at
AppKit.subproj/NSImage.m:3516/SourceCache/AppKit/AppKit-663/
#7 0x000cb6b0 in -[MIVUMeterView drawRect:] (self=0x522dd80,
_cmd=0x718b593c, rect={origin = {x = 0, y = 0}, size = {width = 10,
height = 100}}) at MIVUMeterView.mm:67/Users/benjamin/prj012/Montage/
.........
(sorry for lengthy post)
BTW : weird a deadlock happens because the mutex pointers in the
_pthread_cond_wait calls are not the same... (0x427af68 and 0x427afc8)
????
Is there something we're doing wrong ?
Thanks.
Benjamin Golinvaux
_______________________________________________
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.