GNU bug report logs - #63187
30.0.50; Tail of longer lines painted after end of nearby lines on macOS

Previous Next

Package: emacs;

Reported by: Aaron Jensen <aaronjensen <at> gmail.com>

Date: Sun, 30 Apr 2023 10:11:01 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #112 received at 63187 <at> debbugs.gnu.org (full text, mbox):

From: Kai Ma <justksqsf <at> gmail.com>
To: 63187 <at> debbugs.gnu.org
Cc: Po Lu <luangruo <at> yahoo.com>, Eli Zaretskii <eliz <at> gnu.org>,
 Aaron Jensen <aaronjensen <at> gmail.com>, alan <at> idiocy.org,
 63187-done <at> debbugs.gnu.org
Subject: Re: bug#63187: 30.0.50; Tail of longer lines painted after end of
 nearby lines on macOS
Date: Thu, 8 Jun 2023 15:33:41 +0800

> On Jun 8, 2023, at 13:40, Kai Ma <justksqsf <at> gmail.com> wrote:
> 
> 
> Hi everyone, I'm also bothered by this bug recently.  And it is
> happening quite frequently for me.
> 
> Unfortunately, the proposed patch and putting
>  [[NSGraphicsContext currentContext] flushGraphics];
> in copyRect didn't work for me.
> 
> See the screencast at https://www.youtube.com/watch?v=uLYPqsUFK5A .

Upon further debugging, the following change seems to fix the problem for me.

--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -10433,7 +10433,7 @@ @implementation EmacsLayer
    cache.  If no free surfaces are found in the cache then a new one
    is created.  */
 
-#define CACHE_MAX_SIZE 2
+#define CACHE_MAX_SIZE 1
 
 - (id) initWithColorSpace: (CGColorSpaceRef)cs
 {


This probably implies that there is another bug somewhere else in the management of IOSurface caches.


> 
> I find that this bug happens more frequently if
> 1) the frame's alpha < 1.0, and
> 2) the frame is in the full screen mode, and
> 3) emacs is built with native compilation enabled.
> 
> (Not doing one or two of these does not prevent the bug from happening,
> but seems to reduce the likelihood.)
> 
> FWIW, some version numbers:
> - emacs 30.0.50 master branch
> - macOS 13.4 (22F66), Intel
> 
> 
> Aaron Jensen <aaronjensen <at> gmail.com> writes:
> 
>> Thank you. I'll report back if I start seeing it again, but so far so good.
>> 
>> Aaron
>> 
>> On Thu, May 18, 2023 at 7:21 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> 
>> From: Aaron Jensen <aaronjensen <at> gmail.com> 
>> Date: Sat, 13 May 2023 10:23:28 -0400 
>> Cc: luangruo <at> yahoo.com, alan <at> idiocy.org, 63187 <at> debbugs.gnu.org 
>> 
>> On Sat, May 13, 2023 at 9:54 AM Eli Zaretskii <eliz <at> gnu.org> wrote: 
>> 
>> Ping! Should the patch be installed now on the emacs-29 branch? 
>> 
>> I think it's worth it. I may have seen 1 glitch (but it was different 
>> -- it looked like an entire blank line was duplicated. Other than that, it's been solid, which is quite a bit better than it had been
>> before. 
>> 
>> Now installed on the emacs-29 branch, and closing the bug.
>> 





This bug report was last modified 1 year and 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.