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-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to