Re: Question to Apple: When do GetThemeImage() or GetThemePattern get called
Re: Question to Apple: When do GetThemeImage() or GetThemePattern get called
- Subject: Re: Question to Apple: When do GetThemeImage() or GetThemePattern get called
- From: Jason Harris <email@hidden>
- Date: Wed, 9 Mar 2005 19:57:37 -0700
This doesn't look like an APE issue - if you disabled APE and then
reran your app, APE is gone, period.
Your code is blocking on a semaphore used to synchronize access to
AppKit's theme images for multiple threads. This implies that another
thread in your app is accessing AppKit images at the same time as this
backtrace, or that there's a bug in AppKit that results in the
semaphore not being unlocked properly. I'd guess that the former is
the case. :)
Try doing 'info threads" and looking at the backtraces for your other
threads using "thread 0", "thread 1", etc. and then "bt". You'll
probably find that another thread is doing AppKit UI drawing as well.
A good rule of thumb for Cocoa is to put all UI drawing into the main
thread. There's a list of what's thread-safe in Cocoa somewhere on the
ADC site.
Jason Harris
On Mar 8, 2005, at 6:22 AM, Darkshadow wrote:
NSThemeFrame and NSFrameView in your stack trace have to do with
windows - those are parts of the window used internally. As the
others said, what are the other threads doing? It appears that
something is messing up the display of the items in your window (and
the window itself) from the trace.
Darkshadow (aka Michael Nickerson)
On Mar 07, 2005, at 10:35 AM, schneider wrote:
it seems that
GetThemeImage()
or
GetThemePattern()
and a few others GetThemeXXX functions do notoriously hang my app in
the most inappropriate places
e.g.
when a "do you want to save changes to your document" happens
or when an NSAlertPanel is displayed.
or when a NSTableView is recharged with new data.
or when the preference pane is displayed
or when a file open / file save dialog is displayed.
i know it's not directly my fault (see the backtrace below, there is
no
classes of mine in it!!)
Is it because i had once Ape installed (is deinstalled now again, due
to this stuff). if yes, cool, i'll just wait for tiger and will never
install a them changer again.
if no, i'm in big trouble.
i'm on the latest panther of course, with Xcode 1.5
Thank you!
christian
0x90016f48 in semaphore_wait_signal_trap ()
(gdb) backtrace
#0 0x90016f48 in semaphore_wait_signal_trap ()
#1 0x9000e790 in _pthread_cond_wait ()
#2 0x909f1384 in -[NSRecursiveLock lock] ()
#3 0x92dd1ed8 in _NSAppKitImgLock ()
#4 0x92e0f1c4 in GetThemePattern ()
#5 0x92e74d5c in -[NSScroller drawKnobSlotInRect:highlight:] ()
#6 0x92e23c28 in -[NSScroller drawRect:] ()
#7 0x92dc7c2c in -[NSView _drawRect:clip:] ()
#8 0x92dc40d0 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:
rectIsVisibleRectForView:topView:]
()
#9 0x92dc4360 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:
rectIsVisibleRectForView:topView:]
()
#10 0x92dc4360 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:
rectIsVisibleRectForView:topView:]
()
#11 0x92dc4360 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:
rectIsVisibleRectForView:topView:]
()
#12 0x92dc4360 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:
rectIsVisibleRectForView:topView:]
()
#13 0x92dc4360 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:
rectIsVisibleRectForView:topView:]
()
#14 0x92dc4360 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:
rectIsVisibleRectForView:topView:]
()
#15 0x92e10ef0 in -[NSFrameView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:
rectIsVisibleRectForView:topView:]
()
#16 0x92df808c in -[NSThemeFrame
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:
rectIsVisibleRectForView:topView:]
()
#17 0x92dd5244 in -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
()
#18 0x92dee274 in -[NSView displayIfNeeded] ()
#19 0x92dfef4c in -[NSWindow displayIfNeeded] ()
#20 0x92ddf5ac in _handleWindowNeedsDisplay ()
#21 0x90191ca0 in __CFRunLoopDoObservers ()
#22 0x9019153c in __CFRunLoopRun ()
#23 0x90195e8c in CFRunLoopRunSpecific ()
#24 0x927d5f60 in RunCurrentEventLoopInMode ()
#25 0x927dc640 in ReceiveNextEventCommon ()
#26 0x927fe6a0 in BlockUntilNextEventMatchingListInMode ()
#27 0x92dd2e44 in _DPSNextEvent ()
#28 0x92de98c8 in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#29 0x92dfdc30 in -[NSApplication run] ()
#30 0x92eba2b8 in NSApplicationMain ()
#31 0x0428cf74 in main (argc=1, argv=0xbffffdd0) at
/Users/galzv/Workspace/HMT/Hagakure/src/Hagakure_main.m:17
(gdb)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden