Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 490864 - x11-terms/xterm-297: incorrect display of box drawing characters and, possibly, other non-ASCII characters
Summary: x11-terms/xterm-297: incorrect display of box drawing characters and, possibl...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-09 17:06 UTC by Alexey Mishustin
Modified: 2018-06-19 07:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Screenshot 1, make menuconfig in xterm-297 (screenshot-1.jpg,88.69 KB, image/jpeg)
2013-11-09 17:08 UTC, Alexey Mishustin
Details
Screenshot 2, alsamixer in xterm-297 (screenshot-2.jpg,103.92 KB, image/jpeg)
2013-11-09 17:09 UTC, Alexey Mishustin
Details
Screenshot 3, make menuconfig in xterm-285 (screenshot-3.jpg,71.66 KB, image/jpeg)
2013-11-09 17:09 UTC, Alexey Mishustin
Details
Screenshot 4, alsamixer in xterm-285 (screenshot-4.jpg,164.83 KB, image/jpeg)
2013-11-09 17:10 UTC, Alexey Mishustin
Details
emerge --info (info_2013_11_09,4.60 KB, text/plain)
2013-11-09 17:11 UTC, Alexey Mishustin
Details
typescript alsamixer in xterm-285 (typescript_alsamixer_285,14.19 KB, text/plain)
2013-11-09 18:23 UTC, Alexey Mishustin
Details
typescript make menuconfig in xterm-285 (typescript_menuconfig_285,30.12 KB, text/plain)
2013-11-09 18:24 UTC, Alexey Mishustin
Details
typescript alsamixer in xterm-297 (typescript_alsamixer_297,14.19 KB, text/plain)
2013-11-09 18:25 UTC, Alexey Mishustin
Details
typescript make menuconfig in xterm-297 (typescript_menuconfig_297,30.12 KB, text/plain)
2013-11-09 18:26 UTC, Alexey Mishustin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Mishustin 2013-11-09 17:06:48 UTC
After upgrading xterm from 285 to 297 I found incorrect displaying of box drawing characters with make menuconfig, alsamixer and other ncurses-based programs.

Downgrading xterm back to 285 has resolved the problem.

All cases of incorrect displaying are related to box drawing characters and, possibly, other non-ASCII characters.

Screenshots attached.

Reproducible: Always

Steps to Reproduce:
1. in xterm: `cd /usr/bin/linux && make menuconfig' 
2. enter in "General Setup", then enter in "Local version"

or 

1. `/usr/bin/alsamixer'
2. press F6
3. press Esc
Actual Results:  
Screenshots 1 and 2
On screenshot 1: there are shown excess characters from previous window
On screenshot 2: there is no colour graphs; there are shown excess characters from previous window

Expected Results:  
Screenshots 3 and 4

Usually I launch xterm with LANG ru_RU.UTF-8. For this bug, I tested it with LANG en_US.UTF-8 and got the same results.

The used font is:
XTerm*font: -*-andale mono-medium-r-normal-*-15-*-*-*-*-*-iso10646-1
Comment 1 Alexey Mishustin 2013-11-09 17:08:45 UTC
Created attachment 362890 [details]
Screenshot 1, make menuconfig in xterm-297
Comment 2 Alexey Mishustin 2013-11-09 17:09:21 UTC
Created attachment 362892 [details]
Screenshot 2, alsamixer in xterm-297
Comment 3 Alexey Mishustin 2013-11-09 17:09:58 UTC
Created attachment 362894 [details]
Screenshot 3, make menuconfig in xterm-285
Comment 4 Alexey Mishustin 2013-11-09 17:10:25 UTC
Created attachment 362896 [details]
Screenshot 4, alsamixer in xterm-285
Comment 5 Alexey Mishustin 2013-11-09 17:11:40 UTC
Created attachment 362898 [details]
emerge --info
Comment 6 Alexey Mishustin 2013-11-09 17:21:32 UTC
Sorry. Errata:

Steps to Reproduce:
1. in xterm: `cd /usr/bin/linux && make menuconfig' 

->

Steps to Reproduce:
1. in xterm: `cd /usr/src/linux && make menuconfig'
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2013-11-09 17:25:57 UTC
Assignee: 	dickey@radix.net did not match anything
Comment 8 Thomas Dickey 2013-11-09 17:59:22 UTC
radix.net's gone (dickey@his.com is still my primary email)
Comment 9 Thomas Dickey 2013-11-09 18:02:43 UTC
Just looking at the screenshots, I don't see the cause.
It would help to see exactly what characters are sent,
e.g., using "script" to capture a typescript file for
the two cases.
Comment 10 Alexey Mishustin 2013-11-09 18:23:48 UTC
Created attachment 362906 [details]
typescript alsamixer in xterm-285
Comment 11 Alexey Mishustin 2013-11-09 18:24:47 UTC
Created attachment 362908 [details]
typescript make menuconfig in xterm-285
Comment 12 Alexey Mishustin 2013-11-09 18:25:29 UTC
Created attachment 362910 [details]
typescript alsamixer in xterm-297
Comment 13 Alexey Mishustin 2013-11-09 18:26:13 UTC
Created attachment 362912 [details]
typescript make menuconfig in xterm-297
Comment 14 Alexey Mishustin 2013-11-09 18:28:01 UTC
Just a note: I have noticed the change of default USE flags for xterm-297: openpty. Not related?
Comment 15 Thomas Dickey 2013-11-09 18:33:21 UTC
I wouldn't expect openpty to be related (though without knowing the
cause, that's an educated guess only).  I'll look at the typescripts
(thanks)
Comment 16 Thomas Dickey 2013-11-09 19:04:05 UTC
The typescripts replay either way for me - using Mac OS X.

Looking at the screenshots (menuconfig is simpler), I see
three issues:

  a) at the top, some of the background is not cleared
  b) on the lower-left, some of the cells have inconsistent widths
  c) overall, some of the text is either misplaced or not cleared.

The alsamixer screenshots I agree show a problem in the middle where
the line-drawing is, but taking the menuconfig screenshots into account
I'm seeing it as a problem in not completing erasures.

The inconsistent cell-widths sounds like a problem reported in Debian
which was said to be an X server problem:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=640464

Why xterm #285 and xterm #297 might behave different isn't apparent to me,
but if this is relevant, then learning more about it might suggest a workaround.
Comment 17 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-11-09 19:18:43 UTC
This could be an EXA issue which is only exposed by the newer xterm. Can you try booting with nouveau.noaccel=1 kernel parameter, or use xf86-video-modesetting instead of nouveau?
Comment 18 Alexey Mishustin 2013-11-09 19:36:11 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #17)
> This could be an EXA issue which is only exposed by the newer xterm. Can you
> try booting with nouveau.noaccel=1 kernel parameter, or use
> xf86-video-modesetting instead of nouveau?

I have tried nouveau.noaccel=1. Noticed broken conky... And all the same behaviour of xterm-297.
Comment 19 Thomas Dickey 2013-11-09 19:42:11 UTC
Well... going from #285 to #297 is about a year's worth of changes.
Is it feasible to test the versions in between, and for instance
narrow the difference down to one version of xterm?
Comment 20 Alexey Mishustin 2013-11-09 19:53:57 UTC
Bisection? Why not?
Comment 21 Alexey Mishustin 2013-11-09 19:59:55 UTC
Please could you give me instructions - where to download, etc. Something similar to http://wiki.winehq.org/RegressionTesting .
Comment 22 Thomas Dickey 2013-11-09 20:08:54 UTC
I'm not certain, but am assuming that you can modify the ebuild script.
All of the tarballs for xterm source are here:

    ftp://invisible-island.net/xterm/
    http://isbd.net/ted/xterm/
Comment 23 Thomas Dickey 2013-11-09 20:11:39 UTC
Also, this shows some possibilities:

    http://packages.gentoo.org/package/x11-terms/xterm
Comment 24 Alexey Mishustin 2013-11-09 20:16:14 UTC
Okay, I'll try.
Comment 25 Thomas Dickey 2013-11-09 20:16:45 UTC
thanks
Comment 26 Alexey Mishustin 2013-11-09 21:53:31 UTC
Results of testing are unexpected.

All versions of xterm from 292 to 296 worked well for me from the image folder (/var/tmp/portage/x11-terms/xterm-<version>/image/). I didn't qmerge them.

(292 and 293 were compiled according to its own ebuilds; others, which don't have own ebuilds - according to renamed 293 ebuilds)

Then I compiled 297 and launched it from the image folder, without qmerging, too. And it worked well for me too.

Then I understood that the problem could be in my file ~/XTerm.

It didn't take long to determine that all bugs described here disappear after deleting one line from ~/XTerm:
XTerm*font: -*-andale mono-medium-r-normal-*-15-*-*-*-*-*-iso10646-1

How didn't I guess to try this before :) At one moment I was really close to this ;)

But isn't it a bug anyway? What's the reason of... aversion to this font?
Comment 27 Thomas Dickey 2013-11-09 22:14:21 UTC
I'm guessing again.  But recall my comment about the cells which
have inconsistent widths (you can see this in attachment 362890 [details]).
Supposing that the andale-mono font has been converted from some
other format, and that the metrics (data which says how wide each
glyph is) is inaccurate (for instance, due to scaling, etc).  xterm
sees one of two cases:

   a) the font says some characters have different widths than the
      font's nominal width.
   b) the font says that all of the characters have the same width.

If the font is wrong, then xterm will place one cell after another,
not noticing that the position is wrong.  This can (I think) affect
the clearing operations since xterm does those based on its assumption.
Comment 28 Alexey Mishustin 2013-11-09 22:20:34 UTC
So, it's (rather) a bug in andale mono.
Comment 29 Thomas Dickey 2013-11-09 22:30:21 UTC
Yes, I think so.  I've run into problems with a few fonts
(one of the changes in #297 was to attempt a better compromise
working around a problem in the Terminus font encoded for 10646).
Comment 30 Thomas Dickey 2013-11-09 22:32:50 UTC
In principle, xterm could be altered to assume that the font metrics
are incorrect (and write each character separately rather than relying
on the string-writing functions in Xlib).  I _think_ that would make
it slower, however.  If this is not a rare occurrence, then I should
investigate doing that.
Comment 31 Alexey Mishustin 2013-11-09 22:35:59 UTC
Interesting. Thank you.
Comment 32 Thomas Dickey 2013-11-09 22:41:59 UTC
no problem (report bugs)
Comment 33 Thomas Dickey 2013-11-20 23:40:40 UTC
The problem described here is different from 491334,
because the line-drawing characters are unambiguously
single-width.
Comment 34 Pacho Ramos gentoo-dev 2018-06-19 07:08:29 UTC
please retry with 331 version, it seems to work ok for me (with alsamixer for example)