[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Display corruption with certain programs
From: |
Thomas Dickey |
Subject: |
Re: Display corruption with certain programs |
Date: |
Tue, 06 Aug 2013 21:02:58 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Date: Tue, 06 Aug 2013 11:57:24 +0200
>
> Ever since switching to ncurses 5.9-dev some months ago I have been
> noticing the same display bugs in "my" applications which use it,
> htop and ncmpcpp. This happens on both my computers. See the
> screenshots:
>
> http://imgur.com/a/1xTsU#0
>
> The occurrence is not entirely consistent, sometimes htop will look
> fine directly after start. In ncmpcpp it almost always happens,
> especially after a few songs with the playlist open.
>
> Manually selecting a line will "reset" it to proper display, letting
> the program display something else (eg another ncmpcpp menu - which
> will leave the status bar corrupted, as it's not switched) or
> changing console dimensions brings back the proper one, too.
The most likely reason is if a program was doing printf's mixed with curses
calls.
To resolve a problem with signal handlers, ncurses doesn't buffer its output in
the same way. The fix for those programs is to modify them to do fflush's
before
calling ncurses(*)
(*) technically, there should be very few programs doing this, to solve some
specific problem, in practice there are also programs doing this due to
it usually "working", and not being noticed. Mixing curses and printf's
has never been advised nor supported.
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature