Nixpkgs: ncurses apps get displayed incorrectly

Created on 14 Sep 2017  路  18Comments  路  Source: NixOS/nixpkgs

Issue description

Since my latest update, unstable: 01c3847b9c -> 1b1fc65505 curses apps get displayed incorrectly. This affects mutt, bmon, ranger but (strangely) not tig.

I could provide screenshots if required.

Steps to reproduce

I don't know. Maybe it is enough to use these apps on 1b1fc65505

Technical details

  • System: 18.03pre115166.1b1fc65505 (Impala)
  • Nix version: nix-env (Nix) 1.11.14
  • Nixpkgs version: "18.03pre115166.1b1fc65505"
  • Sandboxing enabled: build-use-sandbox = true
regression

Most helpful comment

It was an ncurses update that contained a broken terminfo file for xterm. Another ncurses bump fixed this issue and is currently on staging for 17.09.

All 18 comments

Can confirm.

I'm trying to build mutt with the ncurses version rolled back right now... still building though. Not sure whether xfce4-terminal (what I use) causes this or whether it is caused by ncurses... I can at least see the same issues in xterm with bmon


Cannot build mutt (without building forever) because of what I reported in https://github.com/NixOS/nixpkgs/issues/29368

It seems like that the issues I experience stem from the terminal used, I have no issues with xterm but with alacritty everything is distorted. Also running bmon and atop together with the terminal at the same revision (nix-shell -p xterm atop) presents no visual errors. Strange.

You have no issues with xterm? Because I have, although not so much as with xfce4-terminal, though.

I don't see anything strange. Can you elaborate?

I just noticed, some parts of the UI are shown on (slightly) bad places, in various ncurses apps (inside KDE konsole).

Note: even the old versions of apps that used to work do this for me now (when ran from nix store directly).

I noticed transmission-remote-cli crashes when resizing the terminal (making the window smaller):

Traceback (most recent call last):
  File "/nix/store/0wzm7bz95r7l2h6sgri06cm8flm1bzzj-transmission-remote-cli-1.7.1/bin/.transmission-remote-cli-wrapped", line 3767, in <module>
    Interface()
  File "/nix/store/0wzm7bz95r7l2h6sgri06cm8flm1bzzj-transmission-remote-cli-1.7.1/bin/.transmission-remote-cli-wrapped", line 1000, in __init__
    self.run()
  File "/nix/store/0wzm7bz95r7l2h6sgri06cm8flm1bzzj-transmission-remote-cli-1.7.1/bin/.transmission-remote-cli-wrapped", line 1107, in run
    self.draw_title_bar()  # show shortcuts and stuff
  File "/nix/store/0wzm7bz95r7l2h6sgri06cm8flm1bzzj-transmission-remote-cli-1.7.1/bin/.transmission-remote-cli-wrapped", line 2761, in draw_title_bar
    self.draw_quick_help()
  File "/nix/store/0wzm7bz95r7l2h6sgri06cm8flm1bzzj-transmission-remote-cli-1.7.1/bin/.transmission-remote-cli-wrapped", line 2792, in draw_quick_help
    self.screen.insstr(0, self.width-len(line), line, curses.A_REVERSE)
_curses.error: insstr() returned ERR

I'm not sure what causes this, but from what we know it could be

  • ncurses
  • terminal

    • xfce4-terminal (@matthiasbeyer)

    • konsole (@vcunat)

    • alacritty (@mguenter)

or something else which is related to

  • bmon
  • mutt
  • ncmpcpp
  • htop
  • ranger
  • tig (just saw some misbehavings there despite my initial msg)

We did some ncurses bumps to unreleased versions recently, so I'd expect that to be related, but some terminals are OK with it (e.g. xterm).

I tried to rebuild mutt without that bump in version but as reported in https://github.com/NixOS/nixpkgs/issues/29368 it causes systemd and such things to be rebuild... and I really don't like that! :smile:

I get this as well with the pass program which uses ncurses to prompt for a password over an ssh connection. I'm connecting to my NixOS box from a Windows program called MobaXterm over ssh.

Running current NixOS 17.09 beta.

By the way: In my applications, when printing a ">" I get "&gt;" printed in the terminal...
Maybe that's related to this issue and helps us debugging or locating this error?

Fixed (as in cannot reproduce) as of

  • System: 18.03pre115705.c8e7aab0c8 (Impala)
  • Nix version: nix-env (Nix) 1.11.15
  • Nixpkgs version: "18.03pre115705.c8e7aab0c8"
  • Sandboxing enabled: build-use-sandbox = true

So we still don't what it was. I tried bisecting multiple times but got inconclusive results.

I would guess it was ncurses, which got updated in the last batch AFAIK.

It was an ncurses update that contained a broken terminfo file for xterm. Another ncurses bump fixed this issue and is currently on staging for 17.09.

I'm not sure if this is related, but I've had some weird glitches with ncmpcpp and cli-visualizer. What worked for me is doing export TERM=xterm-termite, which prevents glitches in both of those.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

retrry picture retrry  路  3Comments

spacekitteh picture spacekitteh  路  3Comments

lverns picture lverns  路  3Comments

teto picture teto  路  3Comments

ghost picture ghost  路  3Comments