Subject: bug#52085: 29.0.50; Frame occasionally fails to paint while screen sharing on macOS

From: Aaron Jensen <[email-masked]>
Date: Wed, 8 Dec 2021 16:33:06 -0500

On Wed, Dec 8, 2021 at 4:23 PM Alan Third <[email-masked]> wrote:
>
> On Tue, Dec 07, 2021 at 10:14:07PM -0500, Aaron Jensen wrote:
> > On Sat, Dec 4, 2021 at 5:48 AM Alan Third <[email-masked]> wrote:
> > >
> > > On Fri, Dec 03, 2021 at 12:14:10AM -0500, Aaron Jensen wrote:
> > > > On Thu, Dec 2, 2021 at 5:22 PM Alan Third <[email-masked]> wrote:
> > > > >
> > > > > Probably the first thing you could do is check that [EmacsLayer
> > > > > display] is being called at the right time.
> > > > >
> > > > > But I can't really think of any particular reason for this to happen.
> > > >
> > > > How do I enable and observe NSTRACE?
> > >
> > > Uncomment the line at nsterm.h:65, and probably the one at line 78
> > > too, which refers to NSTRACE_GROUP_FOCUS.
> > >
> > > It logs to the terminal or to the system logs.
> >
> > Hmm, I see logging but typically every keypress is met with:
> >
> > nsterm.m  : 6100: [11784]  [EmacsView keyDown:]
> > nsterm.m  : 6393: [11785]  | [EmacsView hasMarkedText]
> > nsterm.m  : 6284: [11786]  | [EmacsView insertText:]
> >
> >
> > I see some [EmacsLayer display] but very few. I'm not sure how to
> > trigger them. Is that what is expected?
> >
> > I have a fairly hard time reproducing this whole thing so even though
> > I'm screensharing right now and running a test build...
>
> To be honest, if I just want to see when one function is called I
> stick in 'NSLog (@"Moo")' or whatever. There's too much output in
> NSTRACE and I'm sure that sometimes it doesn't print out results from
> things that are called deep in the toolkit code.

Well, I can say with some certainty that those messages are the only
ones appearing under typical operations like key presses. I can insert
newlines into the terminal and observe that only those are emitted
when I press keys or even scroll. So the display function is not being
called unless there is some other wildness going on with the tracing.
Do you expect it to be called every render? (It is also not called
when I run M-: (redisplay))

Aaron