emacs-devel
[Top][All Lists]
Advanced

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

Re: UI input unresponsive on macOS


From: Alan Third
Subject: Re: UI input unresponsive on macOS
Date: Sat, 2 Dec 2017 16:51:46 +0000
User-agent: Mutt/1.9.1 (2017-09-22)

On Sat, Nov 18, 2017 at 09:24:17AM +0900, YAMAMOTO Mitsuharu wrote:
> 
> > NS GUI elements need to be handled in the main thread and it’s easy
> > enough to check whether we’re in the main thread before trying to
> > display the dialogue box.
> 
> Not just for creating a dialog box, but also for an ordinary Emacs
> frame (it does not always crash, but it sometimes does).  As I said,
> the Main Thread Checker makes it easier to detect these cases.
> 
> The Main Thread Checker reports even if you try to move/resize an
> existing NSWindow in a non-main thread.  Actually even -[NSView frame]
> seems to be black-listed.

Yes, this looks like it could be a very large job as lots of functions
will need a main thread guard. Even something as innocent looking as
setting a frame parameter causes an error.

I put a guard in the dialog box code and tried the original code again

    (make-thread #'gnus "gnus")

and it threw up a warning in redisplay, so I suppose we’ll have to
prevent redisplay happening in a sub‐thread.

    2017-12-02 16:36:15.551 Emacs[6922:22033201] Warning: Illegal attempt to 
access GUI elements from sub-thread.
    CoreAnimation: warning, deleted thread with uncommitted CATransaction; 
created by:
    <snip backtrace>
-- 
Alan Third



reply via email to

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