Debian Bug report logs -
#816887
libncursesw5: background color of mutt's message is black
Reported by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Date: Sun, 6 Mar 2016 09:51:01 UTC
Severity: normal
Tags: fixed-upstream
Found in version ncurses/6.0+20151017-1
Fixed in version ncurses/6.0+20160625-1
Done: Sven Joachim <svenjoac@gmx.de>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Craig Small <csmall@debian.org>:
Bug#816887; Package libncursesw5.
(Sun, 06 Mar 2016 09:51:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Kusanagi Kouichi <slash@ac.auone-net.jp>:
New Bug report received and forwarded. Copy sent to Craig Small <csmall@debian.org>.
(Sun, 06 Mar 2016 09:51:06 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Package: libncursesw5
Version: 6.0+20151017-1
Severity: normal
Since ncurses 6.0+20151017-1, background color of mutt's message is
black. Downgrading libncursesw5 to 6.0+20150810-1 fixes the issue.
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 4.4.3 (SMP w/4 CPU cores)
Locale: LANG=ja_JP.eucJP, LC_CTYPE=ja_JP.eucJP (charmap=EUC-JP)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages libncursesw5 depends on:
ii libc6 2.21-9
ii libtinfo5 6.0+20160213-1
Versions of packages libncursesw5 recommends:
pn libgpm2 <none>
libncursesw5 suggests no packages.
-- no debconf information
[6.0+20150810-1.png (image/png, attachment)]
[6.0+20151017-1.png (image/png, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Craig Small <csmall@debian.org>:
Bug#816887; Package libncursesw5.
(Wed, 16 Mar 2016 17:39:13 GMT) (full text, mbox, link).
Acknowledgement sent
to Sven Joachim <svenjoac@gmx.de>:
Extra info received and forwarded to list. Copy sent to Craig Small <csmall@debian.org>.
(Wed, 16 Mar 2016 17:39:13 GMT) (full text, mbox, link).
Message #10 received at 816887@bugs.debian.org (full text, mbox, reply):
On 2016-03-06 18:35 +0900, Kusanagi Kouichi wrote:
> Package: libncursesw5
> Version: 6.0+20151017-1
> Severity: normal
>
> Since ncurses 6.0+20151017-1, background color of mutt's message is
> black. Downgrading libncursesw5 to 6.0+20150810-1 fixes the issue.
I'm afraid I can't follow you here. Starting mutt without any arguments
displays the user's mailbox in the mailspool by default, but apparently
you have configured it do do something else. So I cannot reproduce the
problem for now.
Cheers,
Sven
Information forwarded
to debian-bugs-dist@lists.debian.org, Craig Small <csmall@debian.org>:
Bug#816887; Package libncursesw5.
(Thu, 17 Mar 2016 00:39:04 GMT) (full text, mbox, link).
Acknowledgement sent
to dickey@his.com:
Extra info received and forwarded to list. Copy sent to Craig Small <csmall@debian.org>.
(Thu, 17 Mar 2016 00:39:04 GMT) (full text, mbox, link).
Message #15 received at 816887@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On Wed, Mar 16, 2016 at 06:35:28PM +0100, Sven Joachim wrote:
> On 2016-03-06 18:35 +0900, Kusanagi Kouichi wrote:
>
> > Package: libncursesw5
> > Version: 6.0+20151017-1
> > Severity: normal
> >
> > Since ncurses 6.0+20151017-1, background color of mutt's message is
> > black. Downgrading libncursesw5 to 6.0+20150810-1 fixes the issue.
>
> I'm afraid I can't follow you here. Starting mutt without any arguments
> displays the user's mailbox in the mailspool by default, but apparently
> you have configured it do do something else. So I cannot reproduce the
> problem for now.
agreed - actually I noticed this one, and in my to-do list had overlooked
the other...
--
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
[signature.asc (application/pgp-signature, inline)]
Added tag(s) moreinfo.
Request was from Sven Joachim <svenjoac@gmx.de>
to control@bugs.debian.org.
(Thu, 17 Mar 2016 19:57:08 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Craig Small <csmall@debian.org>:
Bug#816887; Package libncursesw5.
(Tue, 31 May 2016 09:39:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Javier Cantero <jcantero@escomposlinux.org>:
Extra info received and forwarded to list. Copy sent to Craig Small <csmall@debian.org>.
(Tue, 31 May 2016 09:39:03 GMT) (full text, mbox, link).
Message #22 received at 816887@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Related bug report (against mutt):
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803405
Note that this behaviour is happening since the upgrade to ncurses5
6.0+20151024-1 (the previous one was 6.0+20150810-1), for all the
recent versions of mutt including 1.6.1-1 (experimental).
For an in-depth analysis of the bug see this message:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825054#15
--
Saludos de Javier <jcantero@escomposlinux.org>
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Craig Small <csmall@debian.org>:
Bug#816887; Package libncursesw5.
(Wed, 08 Jun 2016 18:42:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Javier Cantero <jcantero@escomposlinux.org>:
Extra info received and forwarded to list. Copy sent to Craig Small <csmall@debian.org>.
(Wed, 08 Jun 2016 18:42:04 GMT) (full text, mbox, link).
Message #27 received at 816887@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
I've found that the bug has been happening since this change:
http://invisible-island.net/ncurses/NEWS.html#t20151017
+ remove an early-return from _nc_do_color, which can interfere with
data needed by bkgd when ncurses is configured with extended colors
(patch by Denis Tikhomirov).
I've applied this patch (to undo it) and now mutt is working as before:
--------8<--------8<--------8<--------8<--------8<--------8<--------
diff -ru ncurses-6.0+20160319/ncurses/base/lib_color.c ncurses-6.0+20160319.new/ncurses/base/lib_color.c
--- ncurses-6.0+20160319/ncurses/base/lib_color.c 2015-10-17 22:39:18.000000000 +0200
+++ ncurses-6.0+20160319.new/ncurses/base/lib_color.c 2016-06-07 18:21:35.366456528 +0200
@@ -858,6 +858,8 @@
}
} else {
reset_color_pair(NCURSES_SP_ARG);
+ if (old_pair < 0)
+ return;
}
#if NCURSES_EXT_FUNCS
--------8<--------8<--------8<--------8<--------8<--------8<--------
Other ncurses applications don't exhibit the same behaviour, so maybe something
is wrong with mutt (but it's not easy to follow due to the large amount of
calls to refresh() and endwin() present in its code).
--
Saludos de Javier <jcantero@escomposlinux.org>
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Craig Small <csmall@debian.org>:
Bug#816887; Package libncursesw5.
(Wed, 15 Jun 2016 17:33:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Javier Cantero <jcantero@escomposlinux.org>:
Extra info received and forwarded to list. Copy sent to Craig Small <csmall@debian.org>.
(Wed, 15 Jun 2016 17:33:05 GMT) (full text, mbox, link).
Message #32 received at 816887@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Ok, I've been able to isolate the bug that sets the xfce4-term with
ncurses's default COLOR_WHITE/COLOR_BLACK foreground/background colors
after running a program using (colored) ncurses. This small example is
enough to trigger the incorrect behaviour:
#include <curses.h>
int main(int argc, char **argv)
{
initscr();
if ( argc > 1 )
{
start_color();
if ( argc > 2 )
use_default_colors();
}
/*refresh();*/ /* this doesn't affect */
endwin();
/*refresh();*/ /* uncomment to fix */
endwin();
printw("This is a test\n");
getch();
endwin();
return 0;
}
Note: the number of arguments is used as a quickest way to change the
behaviour of the program in this way:
./test-ncurses # doesn't invoke start_color()
./test-ncurses foo # invokes start_color() but not use_default_colors()
./test-ncurses foo bar # invokes start_color() and use_default_colors()
The error is caused by the two consecutive endwin() function calls, but
only if start_color() has been previously called AND
use_default_colors() hasn't. So the bug is only reproducible using the
second of the 3 cases above (./test-ncurses foo). The other two cases
are provided only to prove the difference in behaviour.
One way to solve the problem is to ensure that use_default_colors() is
called after start_color(). Another way is to avoid any consecutive
calls to endwin() by introducing a wrefresh() call between them. In that
regard, the bug can also be fixed in the example above by uncommenting
the second call to refresh() (the one between both endwins).
This behaviour happens specifically in mutt because it doesn't
usually[1] call use_default_colors(), and because it calls endwin() a
lot[2]. The mutt developers have written a mutt_endwin() function,
supposedly to ensure that refresh() is always called before endwin(),
but there are still some locations in the code from where endwin() is
directly called, and unfortunately one of them[3] is the source of this
bug.
I'm explaining all of this because, from my current point of view, the
error is rather on the side of mutt than ncurses (and therefore it
should be fixed in mutt), but others may disagree. Perhaps Mr. Dickey
could bring some light on this, and about the expected behavior of the
endwind() function.
[1]: for some reason use_default_colors() is not called just after
start_color(), but delayed until the color settings have been read
from the configuration files. The function is not even called
except if one of the defined colors the "default" special value.
Considering the default configuration doesn't use this "default"
color, it's easy to see why mutt usually ends up not calling
use_default_colors().
[2]: mainly to execute external command line programs such as gpg or
ispell
[3]: http://sources.debian.net/src/mutt/1.6.0-1/init.c/#L3251
--
Saludos de Javier <jcantero@escomposlinux.org>
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Craig Small <csmall@debian.org>:
Bug#816887; Package libncursesw5.
(Sat, 18 Jun 2016 20:09:04 GMT) (full text, mbox, link).
Acknowledgement sent
to dickey@his.com:
Extra info received and forwarded to list. Copy sent to Craig Small <csmall@debian.org>.
(Sat, 18 Jun 2016 20:09:04 GMT) (full text, mbox, link).
Message #37 received at 816887@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On Wed, Jun 08, 2016 at 08:38:45PM +0200, Javier Cantero wrote:
> I've found that the bug has been happening since this change:
>
> http://invisible-island.net/ncurses/NEWS.html#t20151017
>
> + remove an early-return from _nc_do_color, which can interfere with
> data needed by bkgd when ncurses is configured with extended colors
> (patch by Denis Tikhomirov).
>
> I've applied this patch (to undo it) and now mutt is working as before:
I made that change early in May, before this report - see
http://invisible-island.net/ncurses/NEWS.html#t20160507
20160507
+ amend change to _nc_do_color to restore the early return for the
special case used in _nc_screen_wrap (report by Dick Streefland,
cf: 20151017).
and reported here:
http://lists.gnu.org/archive/html/bug-ncurses/2016-05/msg00002.html
--
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
[signature.asc (application/pgp-signature, inline)]
Message sent on
to Kusanagi Kouichi <slash@ac.auone-net.jp>:
Bug#816887.
(Sat, 18 Jun 2016 20:09:06 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Craig Small <csmall@debian.org>:
Bug#816887; Package libncursesw5.
(Sun, 26 Jun 2016 10:06:12 GMT) (full text, mbox, link).
Acknowledgement sent
to Sven Joachim <svenjoac@gmx.de>:
Extra info received and forwarded to list. Copy sent to Craig Small <csmall@debian.org>.
(Sun, 26 Jun 2016 10:06:12 GMT) (full text, mbox, link).
Message #45 received at 816887@bugs.debian.org (full text, mbox, reply):
Control: tags -1 = fixed-upstream
On 2016-06-18 15:55 -0400, Thomas Dickey wrote:
> On Wed, Jun 08, 2016 at 08:38:45PM +0200, Javier Cantero wrote:
>> I've found that the bug has been happening since this change:
>>
>> http://invisible-island.net/ncurses/NEWS.html#t20151017
>>
>> + remove an early-return from _nc_do_color, which can interfere with
>> data needed by bkgd when ncurses is configured with extended colors
>> (patch by Denis Tikhomirov).
>>
>> I've applied this patch (to undo it) and now mutt is working as before:
>
> I made that change early in May, before this report - see
>
> http://invisible-island.net/ncurses/NEWS.html#t20160507
>
> 20160507
> + amend change to _nc_do_color to restore the early return for the
> special case used in _nc_screen_wrap (report by Dick Streefland,
> cf: 20151017).
>
> and reported here:
>
> http://lists.gnu.org/archive/html/bug-ncurses/2016-05/msg00002.html
Thanks. While I still have trouble reproducing the original report with
mutt, I can confirm that this change restores the behavior before the
20151017 patchlevel in Javier Cantero's example from
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=816887#27.
Cheers,
Sven
Added tag(s) fixed-upstream; removed tag(s) moreinfo.
Request was from Sven Joachim <svenjoac@gmx.de>
to 816887-submit@bugs.debian.org.
(Sun, 26 Jun 2016 10:06:12 GMT) (full text, mbox, link).
Added tag(s) pending.
Request was from Sven Joachim <svenjoac@gmx.de>
to control@bugs.debian.org.
(Sun, 26 Jun 2016 19:39:13 GMT) (full text, mbox, link).
Message sent on
to Kusanagi Kouichi <slash@ac.auone-net.jp>:
Bug#816887.
(Sun, 26 Jun 2016 19:39:33 GMT) (full text, mbox, link).
Message #52 received at 816887-submitter@bugs.debian.org (full text, mbox, reply):
tag 816887 pending
thanks
Hello,
Bug #816887 reported by you has been fixed in the Git repository. You can
see the changelog below, and you can check the diff of the fix at:
http://git.debian.org/?p=collab-maint/ncurses.git;a=commitdiff;h=2b52d2d
---
commit 2b52d2df27b8e555b3ed233c89d31b5c11c97998
Author: Sven Joachim <svenjoac@gmx.de>
Date: Sun Jun 26 20:45:39 2016 +0200
Close bug #816887
It has been fixed in the 20160507 upstream patchlevel.
diff --git a/debian/changelog b/debian/changelog
index bd91363..ea18d8c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,9 @@ ncurses (6.0+20160625-1) UNRELEASED; urgency=low
- Make linux3.0 entry the default linux entry (Closes: #823658, #515609).
- Improve manual pages for wgetch and wget_wch to point out that they
might return values without names in curses.h (Closes: #822426).
+ - Amend change to _nc_do_color to restore the early return for the
+ special case used in _nc_screen_wrap (report by Dick Streefland,
+ Closes: #816887).
-- Sven Joachim <svenjoac@gmx.de> Sun, 26 Jun 2016 20:32:27 +0200
Reply sent
to Sven Joachim <svenjoac@gmx.de>:
You have taken responsibility.
(Wed, 06 Jul 2016 16:51:14 GMT) (full text, mbox, link).
Notification sent
to Kusanagi Kouichi <slash@ac.auone-net.jp>:
Bug acknowledged by developer.
(Wed, 06 Jul 2016 16:51:14 GMT) (full text, mbox, link).
Message #57 received at 816887-close@bugs.debian.org (full text, mbox, reply):
Source: ncurses
Source-Version: 6.0+20160625-1
We believe that the bug you reported is fixed in the latest version of
ncurses, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 816887@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Sven Joachim <svenjoac@gmx.de> (supplier of updated ncurses package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Wed, 06 Jul 2016 18:00:26 +0200
Source: ncurses
Binary: libtinfo5 libtinfo5-udeb libncurses5 libtinfo-dev libtinfo5-dbg libncurses5-dev libncurses5-dbg libncursesw5 libncursesw5-dev libncursesw5-dbg lib64ncurses5 lib64ncurses5-dev lib32ncurses5 lib32ncurses5-dev lib32ncursesw5 lib32ncursesw5-dev lib64tinfo5 lib32tinfo5 lib32tinfo-dev ncurses-bin ncurses-base ncurses-term ncurses-examples ncurses-doc
Architecture: source
Version: 6.0+20160625-1
Distribution: unstable
Urgency: low
Maintainer: Craig Small <csmall@debian.org>
Changed-By: Sven Joachim <svenjoac@gmx.de>
Description:
lib32ncurses5 - shared libraries for terminal handling (32-bit)
lib32ncurses5-dev - developer's libraries for ncurses (32-bit)
lib32ncursesw5 - shared libraries for terminal handling (wide character support) (
lib32ncursesw5-dev - developer's libraries for ncursesw (32-bit)
lib32tinfo-dev - developer's library for the low-level terminfo library (32-bit)
lib32tinfo5 - shared low-level terminfo library for terminal handling (32-bit)
lib64ncurses5 - shared libraries for terminal handling (64-bit)
lib64ncurses5-dev - developer's libraries for ncurses (64-bit)
lib64tinfo5 - shared low-level terminfo library for terminal handling (64-bit)
libncurses5 - shared libraries for terminal handling
libncurses5-dbg - debugging/profiling libraries for ncurses
libncurses5-dev - developer's libraries for ncurses
libncursesw5 - shared libraries for terminal handling (wide character support)
libncursesw5-dbg - debugging/profiling libraries for ncursesw
libncursesw5-dev - developer's libraries for ncursesw
libtinfo-dev - developer's library for the low-level terminfo library
libtinfo5 - shared low-level terminfo library for terminal handling
libtinfo5-dbg - debugging/profiling library for the low-level terminfo library
libtinfo5-udeb - shared low-level terminfo library for terminal handling - udeb (udeb)
ncurses-base - basic terminal type definitions
ncurses-bin - terminal-related programs and man pages
ncurses-doc - developer's guide and documentation for ncurses
ncurses-examples - test programs and examples for ncurses
ncurses-term - additional terminal type definitions
Closes: 515609 816887 822426 823658
Changes:
ncurses (6.0+20160625-1) unstable; urgency=low
.
* New upstream patchlevel.
- Make linux3.0 entry the default linux entry (Closes: #823658, #515609).
- Improve manual pages for wgetch and wget_wch to point out that they
might return values without names in curses.h (Closes: #822426).
- Amend change to _nc_do_color to restore the early return for the
special case used in _nc_screen_wrap (report by Dick Streefland,
Closes: #816887).
* Update xterm.ti from xterm 325.
* Enable the bindnow hardening flag.
* Really install the Debian FAQ into the libtinfo5 package.
* Update links in the Debian FAQ.
Checksums-Sha1:
19100c2ee48e236a9961b464ad8ffbff4654eec6 3742 ncurses_6.0+20160625-1.dsc
fe78c7887c8b373cdc3000cf51d2c8844cee5d78 3167182 ncurses_6.0+20160625.orig.tar.gz
677f3422962ba3424d7755e05c916455f70be321 52508 ncurses_6.0+20160625-1.debian.tar.xz
Checksums-Sha256:
676762505dde61298bcc87de15d9d7b98853a22240e7df6c24cf4b2b14b99d3c 3742 ncurses_6.0+20160625-1.dsc
aaccc026de6f2f112dd56085ec7f38923429edc91a010ae1c8e68b5c53c60acd 3167182 ncurses_6.0+20160625.orig.tar.gz
5e01e261431c57e2f8856de0c8fe58565814ae2bc737ae991ae161406772bbc6 52508 ncurses_6.0+20160625-1.debian.tar.xz
Files:
8e09478b520c77dd6b59dfa7aa4bb540 3742 libs required ncurses_6.0+20160625-1.dsc
b53b7a18bdcc29a2826b485411bab607 3167182 libs required ncurses_6.0+20160625.orig.tar.gz
9e62305d82ad7b351636b4d1553311df 52508 libs required ncurses_6.0+20160625-1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCgAGBQJXfSvOAAoJEDsQbnGNazGs0SAP/2Hw2JJ8dys98ae0G/jE7Xe6
A/kCY56Dc/AskMThsWMGOsCnCJ11b/MsDRNPK9vnNzZyvrYAgGlfeJAzeri4rgK3
rBjp2c/MKMwKmrQcJrCGtwzQtohL463boMn1BwA8rcvK8tV1ZRC0Dp748k8EqQQg
5KcXQfRWNs6k7LzUmzVrLATgmVL498kPrn0UuS1rE1ITfxpqGuXhCrS/ORTyJGiE
PUC0eeN7Xt54sUjTZL54M4yg1tbdVGThuSg8oAFqKKA/HEHZhVzScgHaRZDYc10L
vI+paOiPAzwVaIvaZiDz68ehV3eSUR2P4jYMbbJaKUpSl2nJ6SlHCpjrK23MYjpj
BN0IoDMPECuOT/Ypb9TboMRzNidqF6zZeglvgo9rYy8ciba6PAhB4uq6K/qHCda9
3+lI+pAVY//P+hSc3bBaDSmo/Hvj28+t4ILT7tTvu8gTgYJYb+xmwDzAOVXdRGhk
AZd/EUkxPD0waDq5e1EdE6uKBEuMB5NMzwkIdeZEqrZ/gCmGULAvsRxNg5iRDGq8
OPRSeuiAyvp5geZKMRABTM4mtHAzbGi02J6vikRAatk2gXqLPlAVGKEEaSnv9axv
azUld1LdLZa0cuSS3aeeFustoeBgQrrA2KQun2lM8ngWlq4tpbe+uoS+rtDEAkd+
JQ7eWb5MGJqfjCy8KgM6
=BEPE
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Sun, 14 Aug 2016 07:57:22 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Thu Aug 8 03:38:29 2024;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.