[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #20453] netbsd gui thread safety
From: |
Fred Kiefer |
Subject: |
[bug #20453] netbsd gui thread safety |
Date: |
Mon, 03 Mar 2008 23:13:54 +0000 |
User-agent: |
Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.7 (like Gecko) SUSE |
Update of bug #20453 (project gnustep):
Status: None => Confirmed
_______________________________________________________
Follow-up Comment #8:
Yes, this looks like a background thread is trying to draw. The error message
that you did not attach should be something like "Trying to add nil to an
array", is this correct?
Now we have the convention in GNUstep that only the main thread is allowed to
do any drawing. We would need more then just a few locks to work around this
restriction. What a background process should do is call [NSView
setNeedsDisplay:] instead of [NSWindow displayIfNeeded].
I just checked with the Cocoa specification and they are doing things
differently there:
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/GraphicsContexts/chapter_3_section_5.html
They even recomment not to use setNeedsDisplay: on a secondardy thread, but
in GNUstep we have special code in there to get this working.
The simplest way I see to work around the traceback will be to make
NSGraphicsContext's class methods save against not having a current context.
But of course we will then run into issues with one thread adding a context to
the stack and another removing it. Better keep the drawing just in one thread
for now.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?20453>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/
- [bug #20453] netbsd gui thread safety,
Fred Kiefer <=