[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recent drawing optimizations

From: Benhur Stein
Subject: Re: Recent drawing optimizations
Date: Wed, 26 Mar 2003 22:04:05 -0300
User-agent: Internet Messaging Program (IMP) 3.0

Citando Ludovic Marcotte <address@hidden>:

> Hi,
> It seems like recent optimizations seriously broke some things. I have 
> absolutely no time to look at this issue right now but, most of the time, 
> just after finishing downloading messages in POP3, GNUMail segfaults.

I think I found it.
It seems that a thread (not the main one) is calling (maybe indirectly)
-[NSView setNeedsDisplay]. This method asks the run loop to call
The problem is that this is put in the runloop for the non-displaying
thread, and when _handleWindowNeedsDisplay is called, the running
thread has no graphics context associated with it.

I'm not sure of what's the best solution to the problem.

Attached is a workaround that does not ask the runloop if the running
thread does not have a context and that does the display (if needed) in 
-[NSWindow update], that is called by NSApp in the main thread.

Could you try it and see if it solves the problem?


Attachment: update.diff
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]