GNU bug report logs - #33864
27.0.50; Display corruption with "small" font size when something is in the fringe

Previous Next

Package: emacs;

Reported by: Dale Sedivec <dale <at> codefu.org>

Date: Tue, 25 Dec 2018 06:03:03 UTC

Severity: normal

Tags: fixed

Found in version 27.0.50

Fixed in version 26.2

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33864 in the body.
You can then email your comments to 33864 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#33864; Package emacs. (Tue, 25 Dec 2018 06:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dale Sedivec <dale <at> codefu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 25 Dec 2018 06:03:03 GMT) Full text and rfc822 format available.

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

From: Dale Sedivec <dale <at> codefu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Display corruption with "small" font size when something is
 in the fringe
Date: Tue, 25 Dec 2018 00:01:58 -0600
[Message part 1 (text/plain, inline)]
Using Emacs master with the NeXTStep interface on macOS, I get display
corruption on lines where features such as Flymake, Flycheck, or diff-hl
display something in the fringe.  This is a bit hard to describe, so I'm
attaching a screen shot, and I've also made a short movie of this happening:

https://www.dropbox.com/s/h9eqixqxst4wg37/emacs_27_small_font_fringe_problem.mp4?dl=0

Steps to reproduce:

1. Build or obtain Emacs from master (I did both, report data below is with
nightly build from emacsformacosx.com[1])

2. ~/Applications/Emacs.app/Contents/MacOS/Emacs -Q

3. Change font to Menlo 9 pt (default font here is Menlo 12 pt)

4. M-x find-library RET flymake RET (or open any file where Flymake will
produce anything in the fringe)

5. Turn on Flymake: M-x flymake-mode RET

6. M-x flymake-goto-next-error RET so that point moves to a line where
Flymake has indicated an error/warning/whatever in the left fringe

7. Move left and right on the line (using arrow keys or C-f/C-b)

Expected results: point moves but the line is otherwise unchanged

Observed results: parts/most/all of the line starts turning grey-on-grey as
you move left/right

[1]:
https://emacsformacosx.com/emacs-builds/Emacs-2018-12-24_01-40-33-fd244507c5ea1e7e425f09585fcf15cc90598e9b-universal.dmg

Just to be clear, this makes Emacs GUI unusable for me on macOS as long as
I want to use anything that utilizes the fringe.

Additional information:

* The display corruption will linger on lines if you have multiple lines
with something in the fringe in the viewport and you move vertically
between them

* This problem does not happen with Flymake and the default 12 pt Menlo font

* I have not seen this problem occur on lines without something in the
fringe, even when using the smaller-than-default Menlo 9 pt font

* This doesn't happen for me on the emacs-26 branch at any font size

* I have also reproduced this with the Fira Mono font at 8 pt (which is my
normal font)

I am using macOS 10.13.6 on a late 2013 MacBook Pro 15" that has a Retina
("high DPI") display.

Happy to provide more information or do more troubleshooting, just let me
know.  Thanks!  Dale


In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17
Version 10.10.5 (Build 14F2511))
 of 2018-12-24 built on builder10-10.porkrind.org
Windowing system distributor 'Apple', version 10.3.1561
System Description:  Mac OS X 10.13.6

Recent messages:

For information about GNU Emacs and the GNU system, type C-h C-a.
Quit
Entering debugger...
Back to top level
nil
Flymake mode enabled in current buffer
Mark set
Mark saved where search started [2 times]
Making completion list...

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  flymake-mode: t
  diff-auto-refine-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt bytecomp
byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec
password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs
time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils misearch multi-isearch autoload lisp-mnt checkdoc
cl-macs gv cl-seq flymake-proc flymake compile comint ansi-color ring
warnings thingatpt help-fns radix-tree cl-print debug backtrace
help-mode find-func cl-loaddefs cl-lib vc-git diff-mode easymenu
easy-mmode elec-pair tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 228548 14897)
 (symbols 48 22728 1)
 (strings 32 36845 2246)
 (string-bytes 1 1015461)
 (vectors 16 44960)
 (vector-slots 8 1500556 164302)
 (floats 8 56 213)
 (intervals 56 719 269)
 (buffers 992 17))
[Message part 2 (text/html, inline)]
[Screen Shot 2018-12-24 at 23.39.15.png (image/png, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33864; Package emacs. (Tue, 25 Dec 2018 13:35:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dale Sedivec <dale <at> codefu.org>
Cc: 33864 <at> debbugs.gnu.org
Subject: Re: bug#33864: 27.0.50;
 Display corruption with "small" font size when something is in the
 fringe
Date: Tue, 25 Dec 2018 15:33:42 +0200
> From: Dale Sedivec <dale <at> codefu.org>
> Date: Tue, 25 Dec 2018 00:01:58 -0600
> 
> Using Emacs master with the NeXTStep interface on macOS, I get display corruption on lines where features
> such as Flymake, Flycheck, or diff-hl display something in the fringe.  This is a bit hard to describe, so I'm
> attaching a screen shot, and I've also made a short movie of this happening:
> 
> https://www.dropbox.com/s/h9eqixqxst4wg37/emacs_27_small_font_fringe_problem.mp4?dl=0

Looks like the cursor's line is being cleared without telling Emacs
about that.

Does it help to decrease the size of the Flymake's fringe indicators
when you switch to a smaller font?  From the screenshot it looks like
the indicator keeps its original size although the font becomes a lot
smaller.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33864; Package emacs. (Tue, 25 Dec 2018 18:31:02 GMT) Full text and rfc822 format available.

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

From: Dale Sedivec <dale <at> codefu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 33864 <at> debbugs.gnu.org
Subject: Re: bug#33864: 27.0.50; Display corruption with "small" font size
 when something is in the fringe
Date: Tue, 25 Dec 2018 12:30:01 -0600
On Tue, Dec 25, 2018 at 7:34 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Dale Sedivec <dale <at> codefu.org>
> > Date: Tue, 25 Dec 2018 00:01:58 -0600
> >
> > Using Emacs master with the NeXTStep interface on macOS, I get display corruption on lines where features
> > such as Flymake, Flycheck, or diff-hl display something in the fringe.  This is a bit hard to describe, so I'm
> > attaching a screen shot, and I've also made a short movie of this happening:
> >
> > https://www.dropbox.com/s/h9eqixqxst4wg37/emacs_27_small_font_fringe_problem.mp4?dl=0
>
> Looks like the cursor's line is being cleared without telling Emacs
> about that.
>
> Does it help to decrease the size of the Flymake's fringe indicators
> when you switch to a smaller font?  From the screenshot it looks like
> the indicator keeps its original size although the font becomes a lot
> smaller.

I think I did what you ask by making a bitmap with just a single pixel
turned on:

(define-fringe-bitmap 'smallest
    (vector #b00000000
            #b00000000
            #b00000000
            #b00000000
            #b00000000
            #b00000000
            #b00000000
            #b00000000
            #b00010000
            #b00000000
            #b00000000
            #b00000000
            #b00000000
            #b00000000
            #b00000000
            #b00000000
            #b00000000))

(setq flymake-note-bitmap '(smallest compilation-info))

Followed by M-x flymake-start RET to re-run Flymake and update the
fringe.  This did not fix the problem: I do see my single pixel fringe
bitmap, but the line still gets corrupted as described in my original
report.

(But please do let me know if you were asking something different.)

Dale




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33864; Package emacs. (Tue, 25 Dec 2018 18:40:03 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dale Sedivec <dale <at> codefu.org>
Cc: 33864 <at> debbugs.gnu.org
Subject: Re: bug#33864: 27.0.50; Display corruption with "small" font size
 when something is in the fringe
Date: Tue, 25 Dec 2018 20:39:05 +0200
> From: Dale Sedivec <dale <at> codefu.org>
> Date: Tue, 25 Dec 2018 12:30:01 -0600
> Cc: 33864 <at> debbugs.gnu.org
> 
> > Does it help to decrease the size of the Flymake's fringe indicators
> > when you switch to a smaller font?  From the screenshot it looks like
> > the indicator keeps its original size although the font becomes a lot
> > smaller.
> 
> I think I did what you ask by making a bitmap with just a single pixel
> turned on:
> 
> (define-fringe-bitmap 'smallest
>     (vector #b00000000
>             #b00000000
>             #b00000000
>             #b00000000
>             #b00000000
>             #b00000000
>             #b00000000
>             #b00000000
>             #b00010000
>             #b00000000
>             #b00000000
>             #b00000000
>             #b00000000
>             #b00000000
>             #b00000000
>             #b00000000
>             #b00000000))
> 
> (setq flymake-note-bitmap '(smallest compilation-info))
> 
> Followed by M-x flymake-start RET to re-run Flymake and update the
> fringe.  This did not fix the problem: I do see my single pixel fringe
> bitmap, but the line still gets corrupted as described in my original
> report.
> 
> (But please do let me know if you were asking something different.)

I think I meant to make the indicator bitmap smaller, i.e. have fewer
members in the above vector.  Since you switch to a size-9 font, which
is 3/4 of the default size, how about making the above bitmap have 12
or 13 lines, instead of 17 now?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33864; Package emacs. (Tue, 25 Dec 2018 19:07:01 GMT) Full text and rfc822 format available.

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

From: Dale Sedivec <dale <at> codefu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 33864 <at> debbugs.gnu.org
Subject: Re: bug#33864: 27.0.50; Display corruption with "small" font size
 when something is in the fringe
Date: Tue, 25 Dec 2018 13:06:04 -0600
On Tue, Dec 25, 2018 at 12:39 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Dale Sedivec <dale <at> codefu.org>
> > Date: Tue, 25 Dec 2018 12:30:01 -0600
> > Cc: 33864 <at> debbugs.gnu.org
> >
> > > Does it help to decrease the size of the Flymake's fringe indicators
> > > when you switch to a smaller font?  From the screenshot it looks like
> > > the indicator keeps its original size although the font becomes a lot
> > > smaller.
> >
> > I think I did what you ask by making a bitmap with just a single pixel
> > turned on:
> >
> > (define-fringe-bitmap 'smallest
> >     (vector #b00000000
> >             #b00000000
> >             #b00000000
> >             #b00000000
> >             #b00000000
> >             #b00000000
> >             #b00000000
> >             #b00000000
> >             #b00010000
> >             #b00000000
> >             #b00000000
> >             #b00000000
> >             #b00000000
> >             #b00000000
> >             #b00000000
> >             #b00000000
> >             #b00000000))
> >
> > (setq flymake-note-bitmap '(smallest compilation-info))
[...]
> I think I meant to make the indicator bitmap smaller, i.e. have fewer
> members in the above vector.  Since you switch to a size-9 font, which
> is 3/4 of the default size, how about making the above bitmap have 12
> or 13 lines, instead of 17 now?

I reduced the above vector to just 12 lines and the problem still
occurred, same with 10 lines.  Reducing the bitmap to 9 lines,
however, DID FIX the problem.  I saw no corruption on the line when
the bitmap was only 9 lines high.

To be clear, this was the 9 line bitmap that fixed the problem under
Menlo 9 pt font:

(define-fringe-bitmap 'smallest
    (vector #b00000000
            #b00000000
            #b00000000
            #b00010000
            #b00000000
            #b00000000
            #b00000000
            #b00000000
            #b00000000))

(I didn't even realize I could reduce the height of the bitmap in this
way—sorry I misunderstood your original request, I have never used the
fringe APIs before.)

Dale




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33864; Package emacs. (Tue, 25 Dec 2018 19:17:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dale Sedivec <dale <at> codefu.org>
Cc: 33864 <at> debbugs.gnu.org
Subject: Re: bug#33864: 27.0.50; Display corruption with "small" font size
 when something is in the fringe
Date: Tue, 25 Dec 2018 21:16:11 +0200
> From: Dale Sedivec <dale <at> codefu.org>
> Date: Tue, 25 Dec 2018 13:06:04 -0600
> Cc: 33864 <at> debbugs.gnu.org
> 
> I reduced the above vector to just 12 lines and the problem still
> occurred, same with 10 lines.  Reducing the bitmap to 9 lines,
> however, DID FIX the problem.  I saw no corruption on the line when
> the bitmap was only 9 lines high.
> 
> To be clear, this was the 9 line bitmap that fixed the problem under
> Menlo 9 pt font:
> 
> (define-fringe-bitmap 'smallest
>     (vector #b00000000
>             #b00000000
>             #b00000000
>             #b00010000
>             #b00000000
>             #b00000000
>             #b00000000
>             #b00000000
>             #b00000000))

OK, so I think this has to do with the situation where the fringe
bitmap's height is greater than the vertical size of the default font.

I think this is macOS-specific.

> (I didn't even realize I could reduce the height of the bitmap in this
> way—sorry I misunderstood your original request, I have never used the
> fringe APIs before.)

No need to apologize.  Thanks for taking time to try this.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33864; Package emacs. (Thu, 27 Dec 2018 04:36:02 GMT) Full text and rfc822 format available.

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

From: Dale Sedivec <dale <at> codefu.org>
To: 33864 <at> debbugs.gnu.org
Subject: Re: bug#33864: Acknowledgement (27.0.50; Display corruption with
 "small" font size when something is in the fringe)
Date: Wed, 26 Dec 2018 22:34:32 -0600
I did a "git bisect" on master and I think I traced this to:

commit b58e8b82ededfb314e385d97df1efed2ce84f4db
Merge: febdedfa8d 094fcf62d2
Author: Glenn Morris <rgm <at> gnu.org>
Date:   Wed Nov 28 07:51:11 2018 -0800

    Merge from origin/emacs-26

    094fcf6 Fix more drawing bugs in NS port (bug#32932)

Strange that I haven't been seeing this in the emacs-26 branch, I will
try and build that again tomorrow to make sure I'm using an Emacs 26
build with the above commit.

Dale

On Tue, Dec 25, 2018 at 12:03 AM GNU bug Tracking System
<help-debbugs <at> gnu.org> wrote:
>
> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>  bug-gnu-emacs <at> gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 33864 <at> debbugs.gnu.org.
>
> Please do not send mail to help-debbugs <at> gnu.org unless you wish
> to report a problem with the Bug-tracking system.
>
> --
> 33864: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33864
> GNU Bug Tracking System
> Contact help-debbugs <at> gnu.org with problems




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33864; Package emacs. (Thu, 27 Dec 2018 12:00:01 GMT) Full text and rfc822 format available.

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

From: Alan Third <alan <at> idiocy.org>
To: Dale Sedivec <dale <at> codefu.org>
Cc: 33864 <at> debbugs.gnu.org
Subject: Re: bug#33864: Acknowledgement (27.0.50; Display corruption with
 "small" font size when something is in the fringe)
Date: Thu, 27 Dec 2018 11:59:25 +0000
On Wed, Dec 26, 2018 at 10:34:32PM -0600, Dale Sedivec wrote:
> I did a "git bisect" on master and I think I traced this to:
> 
> commit b58e8b82ededfb314e385d97df1efed2ce84f4db
> Merge: febdedfa8d 094fcf62d2
> Author: Glenn Morris <rgm <at> gnu.org>
> Date:   Wed Nov 28 07:51:11 2018 -0800
> 
>     Merge from origin/emacs-26
> 
>     094fcf6 Fix more drawing bugs in NS port (bug#32932)

Ironically I’d expect that commit to fix any issue like this, not
cause it. The previous code would cause the entire line to be redrawn
if there was a fringe bitmap, but the new code should cause just the
bitmap itself to be redrawn.

Although I suppose it might not be the fringe bitmap code that’s
causing this.

> Strange that I haven't been seeing this in the emacs-26 branch, I will
> try and build that again tomorrow to make sure I'm using an Emacs 26
> build with the above commit.

I can’t replicate the issue on either master or emacs-26.

Can you replicate this on any line that has a ‘large’ fringe bitmap,
or is it only certain ones?
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33864; Package emacs. (Thu, 27 Dec 2018 15:47:02 GMT) Full text and rfc822 format available.

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

From: Dale Sedivec <dale <at> codefu.org>
To: Alan Third <alan <at> idiocy.org>
Cc: 33864 <at> debbugs.gnu.org
Subject: Re: bug#33864: Acknowledgement (27.0.50; Display corruption with
 "small" font size when something is in the fringe)
Date: Thu, 27 Dec 2018 09:45:57 -0600
[Message part 1 (text/plain, inline)]
On Thu, Dec 27, 2018 at 5:59 AM Alan Third <alan <at> idiocy.org> wrote:
> On Wed, Dec 26, 2018 at 10:34:32PM -0600, Dale Sedivec wrote:
> > I did a "git bisect" on master and I think I traced this to:
> >
> > commit b58e8b82ededfb314e385d97df1efed2ce84f4db
> > Merge: febdedfa8d 094fcf62d2
> > Author: Glenn Morris <rgm <at> gnu.org>
> > Date:   Wed Nov 28 07:51:11 2018 -0800
> >
> >     Merge from origin/emacs-26
> >
> >     094fcf6 Fix more drawing bugs in NS port (bug#32932)
>
> Ironically I’d expect that commit to fix any issue like this, not
> cause it. The previous code would cause the entire line to be redrawn
> if there was a fringe bitmap, but the new code should cause just the
> bitmap itself to be redrawn.
>
> Although I suppose it might not be the fringe bitmap code that’s
> causing this.
>
> > Strange that I haven't been seeing this in the emacs-26 branch, I will
> > try and build that again tomorrow to make sure I'm using an Emacs 26
> > build with the above commit.
>
> I can’t replicate the issue on either master or emacs-26.

You would probably know better than I would, but the only possible
relevant differences I can think of are:

* I'm using a smaller font size
* I'm using a Retina (i.e. scaled) display
* I'm using macOS 10.13.6

I tried emacs-26 (9578c2aa2) this morning and I was able to recreate
this problem, though it presents a bit differently than it did on
master: on emacs-26 branch, most any line with a fringe bitmap would
have some portion of the line (I *think* always a prefix of the line)
turning grey-on-grey, as in my original screen shot, but the
grey-on-grey would not change as I scrolled or moved around on the
line.  The corruption was immediately visible when scrolling to the
next error, and it didn't change.

> Can you replicate this on any line that has a ‘large’ fringe bitmap,
> or is it only certain ones?

On emacs-26, I reproduced this on *most* lines with fringe bitmaps
while moving around flymake.el with flymake-mode turned on.  I found
one line that didn't exhibit this problem while on the emacs-26
branch, which was a line with a flymake warning that was something
starting like "  (if ..." as one of the first statements inside a
defun.  (Sorry but I didn't note the line number, and I've rebuilt on
master since then.)

On master, every line with a fringe bitmap seems to exhibit this problem.

I am attaching the Elisp script I used to reproduce this problem while
bisecting, loaded like:

      nextstep/Emacs.app/Contents/MacOS/Emacs -Q --load repro.el

On a bad build, I would see this corruption as soon as I moved the
cursor left/right after running the above script.

Also, here is how I ran configure:

./configure --with-ns \
            --with-modules --with-rsvg --with-imagemagick \
            --with-xml2 --with-gnutls --without-x

Please let me know if I can provide any more information.

Dale
[repro.el (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33864; Package emacs. (Thu, 27 Dec 2018 16:31:01 GMT) Full text and rfc822 format available.

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

From: Alan Third <alan <at> idiocy.org>
To: Dale Sedivec <dale <at> codefu.org>
Cc: 33864 <at> debbugs.gnu.org
Subject: Re: bug#33864: Acknowledgement (27.0.50; Display corruption with
 "small" font size when something is in the fringe)
Date: Thu, 27 Dec 2018 16:30:11 +0000
[Message part 1 (text/plain, inline)]
On Thu, Dec 27, 2018 at 09:45:57AM -0600, Dale Sedivec wrote:
> You would probably know better than I would, but the only possible
> relevant differences I can think of are:
> 
> * I'm using a smaller font size
> * I'm using a Retina (i.e. scaled) display
> * I'm using macOS 10.13.6

These are all the same, but...

> I am attaching the Elisp script I used to reproduce this problem while
> bisecting, loaded like:
> 
>       nextstep/Emacs.app/Contents/MacOS/Emacs -Q --load repro.el

This reproduces instantly, like you say. Thank you! It looks to me
like the fringe background colour is being drawn right across the
line, which makes me think that the calculation to work out what to
blank in the fringe is going wrong.

I think that what’s happened is I’ve misunderstood one of the NS
rectangle function’s descriptions and assumed it did more error
checking than it does. It looks like the fix is simply to check that
the area that’s to be cleared is actually a legitimate rectangle.

Patch attached.
-- 
Alan Third
[0001-Fix-NS-fringe-bitmap-drawing-bug-bug-33864.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33864; Package emacs. (Thu, 27 Dec 2018 17:09:01 GMT) Full text and rfc822 format available.

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

From: Dale Sedivec <dale <at> codefu.org>
To: Alan Third <alan <at> idiocy.org>
Cc: 33864 <at> debbugs.gnu.org
Subject: Re: bug#33864: Acknowledgement (27.0.50; Display corruption with
 "small" font size when something is in the fringe)
Date: Thu, 27 Dec 2018 11:07:46 -0600
On Thu, Dec 27, 2018 at 10:30 AM Alan Third <alan <at> idiocy.org> wrote:
> On Thu, Dec 27, 2018 at 09:45:57AM -0600, Dale Sedivec wrote:
[...]
> > I am attaching the Elisp script I used to reproduce this problem while
> > bisecting, loaded like:
> >
> >       nextstep/Emacs.app/Contents/MacOS/Emacs -Q --load repro.el
>
> This reproduces instantly, like you say. Thank you! It looks to me
> like the fringe background colour is being drawn right across the
> line, which makes me think that the calculation to work out what to
> blank in the fringe is going wrong.
>
> I think that what’s happened is I’ve misunderstood one of the NS
> rectangle function’s descriptions and assumed it did more error
> checking than it does. It looks like the fix is simply to check that
> the area that’s to be cleared is actually a legitimate rectangle.
>
> Patch attached.

I applied your patch to my master and I can no longer reproduce this
bug.  I'm now able to run master as my daily driver again.  Thank you
very much!

Dale




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33864; Package emacs. (Fri, 28 Dec 2018 21:45:02 GMT) Full text and rfc822 format available.

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

From: Alan Third <alan <at> idiocy.org>
To: Dale Sedivec <dale <at> codefu.org>
Cc: 33864 <at> debbugs.gnu.org
Subject: Re: bug#33864: Acknowledgement (27.0.50; Display corruption with
 "small" font size when something is in the fringe)
Date: Fri, 28 Dec 2018 21:43:57 +0000
On Thu, Dec 27, 2018 at 11:07:46AM -0600, Dale Sedivec wrote:
> I applied your patch to my master and I can no longer reproduce this
> bug.  I'm now able to run master as my daily driver again.  Thank you
> very much!

I’ve pushed the fix to emacs-26. It should appear on master next time
someone does a merge.

Thank you for reporting this and working out how to reproduce it. I’ve
had some trouble tracking down these drawing issues since they’ve been
so hard to reproduce.
-- 
Alan Third




Added tag(s) fixed. Request was from Alan Third <alan <at> idiocy.org> to control <at> debbugs.gnu.org. (Fri, 28 Dec 2018 21:45:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.2, send any further explanations to 33864 <at> debbugs.gnu.org and Dale Sedivec <dale <at> codefu.org> Request was from Alan Third <alan <at> idiocy.org> to control <at> debbugs.gnu.org. (Fri, 28 Dec 2018 21:45:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33864; Package emacs. (Sun, 30 Dec 2018 12:26:01 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 33864 <at> debbugs.gnu.org, Dale Sedivec <dale <at> codefu.org>
Subject: Re: bug#33864: 27.0.50;
 Display corruption with "small" font size when something is in the
 fringe
Date: Sun, 30 Dec 2018 13:25:15 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> OK, so I think this has to do with the situation where the fringe
> bitmap's height is greater than the vertical size of the default font.
>
> I think this is macOS-specific.
>

What do other platforms do? Truncate the fringe bitmap?

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33864; Package emacs. (Sun, 30 Dec 2018 15:28:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 33864 <at> debbugs.gnu.org, dale <at> codefu.org
Subject: Re: bug#33864: 27.0.50;
 Display corruption with "small" font size when something is in the
 fringe
Date: Sun, 30 Dec 2018 17:26:57 +0200
> From: Robert Pluim <rpluim <at> gmail.com>
> Cc: Dale Sedivec <dale <at> codefu.org>,  33864 <at> debbugs.gnu.org
> Date: Sun, 30 Dec 2018 13:25:15 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > OK, so I think this has to do with the situation where the fringe
> > bitmap's height is greater than the vertical size of the default font.
> >
> > I think this is macOS-specific.
> >
> 
> What do other platforms do? Truncate the fringe bitmap?

Yes, I think so.  At least that's what I see on MS-Windows.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 28 Jan 2019 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 87 days ago.

Previous Next


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