Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display corruption in irssi, others running inside tmux in WSL bash #1444

Open
harakka opened this issue Feb 9, 2018 · 25 comments
Open

Display corruption in irssi, others running inside tmux in WSL bash #1444

harakka opened this issue Feb 9, 2018 · 25 comments

Comments

@harakka
Copy link

harakka commented Feb 9, 2018

Versions

ConEmu build: 180206 x64 and x32 both, fresh download, settings reset to default
OS version: Windows 10 Pro x64 ver 1709 build 16299.125
Used shell version: WSL bash with wslbridge/connector as launched by the default ConEmu {Bash::bash} task

Problem description

First of all I hope ConEmu is the right place to report this, but to my amateur observation it seemed like the most likely place to start at least. Apologies if that isn't the case.

When running irssi inside tmux in WSL bash, the output becomes garbled during use. It's a bit difficult to describe exactly, but it's particularly notable when using pageup and pagedown to scroll up and down. Irssi scrolls by half a page at a time, and it looks like the other half either doesn't update or gets blanked depending on which way it's being scrolled. This is completely consistent and reproducible on my end. New lines also seem to get printed in the wrong place or some lines don't update correctly. The scrolling problem was the clearest and most consistent one to repro so it's included here as an animated gif:
conemu-tmux2 gif

There's visual weirdness in programs other than irssi too, but irssi seems to be most consistent to reproduce for me. In less, after scrolling the status line of tmux at the bottom becomes blank or disappears or is printed in the wrong place, and less' statusline prints either either correctly on the second to last line, or incorrectly on the blank line where tmux' status line was, or it doesn't show at all. Line lengths in manpages (paged by less) get messed up when scrolling at least on a console noticeably wider than the standard 80 characters.

The image below (not animated) is after scrolling down for a bit in less. Also notice how part of the tmux status line (grey background), which should be at the bottom, is at the end of some completely different line.
image
Also, the issues with less seem to become more pronounced on a console noticeably wider than 80 characters.

Issuing a tmux redraw with Ctrl+b r seems to always fix the screen for that moment, but then it starts getting corrupted again.

I believe this is not a WSL/Windows console issue, or at least not completely, because the tmux+irssi/less combination seems to work fine when WSL bash is started either from normal Windows command prompt or PowerShell. The issues only happen when using WSL bash in ConEmu+tmux.

Based on tmux FAQ there is a similar-looking problem with irssi in normal Linux usage when using incorrect $TERM inside/and outside tmux, but my $TERM is xterm-256color outside and screen-256color inside tmux, which I understand to be the correct configuration.

Steps to reproduce

  1. Create a new console in ConEmu with the default {Bash::bash} task
  2. sudo apt-get install tmux irssi
  3. tmux
  4. irssi
  5. /set prints out all irssi settings, just to give something to scroll around in. If you're quick, you can see there's something odd going on with printing and scrolling already.
  6. press pageup a few times and then pagedown, note how both corrupt the display in a different way

To try seeing corruption in less, although this doesn't seem to happen as consistently:

  1. sudo apt-get install tmux
  2. less /usr/share/doc/bash/README
  3. scroll to the bottom either with arrows or pagedown, you should see the last lines getting corrupted at least
  4. Try a manpage like man bash (less is the default pager) and scrolling around with arrow keys and pageup and pagedown. You can also try resizing the console to be larger than the default, with a wider console the line width seem to become inconsistent once the corruption starts when scrolling.

Actual results

Display corruption and explained and shown above

Expected results

No display corruption.

Logs

Here's a log of me doing the tmux irssi and less activities as explained in the repro steps, where the corruption is showing on my display.
ConEmu-2018-02-09-p4956.log

@Maximus5
Copy link
Owner

Maximus5 commented Feb 9, 2018

Does bash task contains conemu-cyg-64? Jyst to be sure.

@Maximus5 Maximus5 added this to To Do in Inspection via automation Feb 9, 2018
@harakka
Copy link
Author

harakka commented Feb 9, 2018

Yep, tasks and settings were reset to defaults before reproing just to be sure, so the bash task command is
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pm:/mnt

@Viknet
Copy link

Viknet commented Mar 6, 2018

I have exactly the same problem in ConEmu. Same configuration of tmux+irssi looks completely normal in st (through XMing).

It is strange, but if other terminal emulator connected to the same tmux, ConEmu refreshes display correctly.

@veryeasily
Copy link

veryeasily commented Apr 22, 2018

I'm seeing a similar issue too inside of vim when I use visual line mode, and at certain times within just the command line in tmux. If I disable tmux's status bar, this can sometimes clear things up. I am seeing the same issue in the RealConsole, so that makes me unsure if this if this is actually a tmux bug instead of conemu. Here's a screen shot of mine, with the realconsole enabled.
2018-04-21 17_49_33-untitled - paint

@Maximus5
Copy link
Owner

How to reproduce?

@Maximus5
Copy link
Owner

Or I need ANSI LogFiles
https://conemu.github.io/en/AnsiLogFiles.html

@lgrangeia
Copy link

I can confirm this issue. I ran into this the other day and can reproduce.

To reproduce, basically install conemu preview, install wslbridge as documented, and run irssi inside a tmux session.

@Maximus5
Copy link
Owner

You don't need to "install" wslbridge. It's included in ConEmu distro and all you need - proper default Task created for you by ConEmu.

@Maximus5 Maximus5 added the ansi label May 19, 2018
@Maximus5 Maximus5 added this to To Do in ConEmu via automation May 19, 2018
@Maximus5 Maximus5 removed this from To Do in Inspection May 19, 2018
@Maximus5 Maximus5 added this to To Do in ANSI via automation May 19, 2018
@Maximus5 Maximus5 removed this from To Do in ConEmu May 19, 2018
@Maximus5 Maximus5 moved this from To Do to In progress in ANSI May 19, 2018
@lgrangeia
Copy link

I meant configure, not install, sorry.

@Maximus5
Copy link
Owner

Issue has been already fixed, just wait for a while, new build is on the way

@bbrendon
Copy link

bbrendon commented May 28, 2018

The build it's going to be fixed in is the one after 180506?

@Maximus5 Maximus5 moved this from In progress to Ready for Testing in ANSI May 29, 2018
@SilverBut
Copy link

SilverBut commented Jul 14, 2018

For version 180626, seems this bug is not completely fixed.

I am using WSL with cygwin/msys connector. The following steps can be used to reproduce it:

  1. SSH to remote machine running zsh with theme bullet-train.
  2. open tmux, The cursor position is incorrect now
    image
  3. execute ls -R or something like that to fill terminal with text. The cursor position is correct now.
    image

Here is the attached ANSI log (with some info stripped, via Firefox Send, expire after 20 downloads with password notinfected). Task is started with:

set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -C~ -cur_console:pm:/mnt -t zsh

@mavandenbos-clgx
Copy link

I am seeing this issue as well.

correctly displayed
notfail
incorrectly displayed
fail

another example (awscli output)
morefail

the issue appears to be related to tmux, because i have been unable to replicate the issue outside of tmux. Im using tmux 2.8, but experienced the issue in tmux 2.7 as well.

@Maximus5 suggested this is already fixed, any idea when we'll be able to test it?

@madchap
Copy link

madchap commented Feb 18, 2019

the issue appears to be related to tmux, because i have been unable to replicate the issue outside of tmux. Im using tmux 2.8, but experienced the issue in tmux 2.7 as well.

Same here. Posting my comment here because this is one of the rare thread where what I encounter is 100% the same.

For me, that's running weechat in tmux, under CentOS. I cannot reproduce outside of tmux.

@Maximus5
Copy link
Owner

What about build 190217?

@madchap
Copy link

madchap commented Feb 18, 2019

@Maximus5 if this was addressed to me -- and forgot to mention -- I am running this out of gnome-terminal on Linux, or iTerm2 on MacOS. Hence, it may be that ConEmu is not to blame at all.

@l00sed
Copy link

l00sed commented Feb 18, 2019

Not sure if this is the same issue you guys have been having, but my status line pushes up every time I switch to another window then back to WSL:
image
Super annoying. I need to scroll up and down every time I return to bash to reset the rendered lines to their correct position so that I'm not editing on the wrong line.

Just WSL + tmux

Here it is again after flipping between windows and coming back:
image

@Maximus5
Copy link
Owner

@l00sed No status bar. What version are you running?

@l00sed
Copy link

l00sed commented Feb 20, 2019

tmux -V returned:
tmux 2.6

WSL / Windows build:
image

@tanmaywadhwa
Copy link

+1. I am seeing this too.

@egrubbs
Copy link

egrubbs commented Dec 12, 2019

I was able to get errors with tmux and vim with the following steps:

  1. tmux
  2. vim (Don't need any data in the file)
  3. :vsp (Split the vim window)
  4. CTRL-W CTRL-R (rotate the split screen)
  5. CTRL-W CTRL-R (sometimes it needs to be done twice before the error appears)

image

Software Versions:

Windows 7 64-bit

  • ConEmu64 191012
  • PortableGit 2.24.0.2 64-bit
    • bash 4.4.23(1)-release (x86_64-pc-msys)
    • OpenSSH_8.1p1, OpenSSL 1.1.1d 10 Sep 2019

Red Hat Enterprise Linux Server release 7.7 (Maipo)

  • tmux-1.8-4.el7.x86_64
  • vim-enhanced-7.4.629-6.el7.x86_64

@erfantkerfan
Copy link

+1

@blacktek
Copy link

Hello,
I've the same issue using the "less" command on CentOS 7 servers.

I've Win7 pro 64bit with OpenSSH_8.4p1, OpenSSL 1.1.1f 31 Mar 2020

ConEmu 210912

With vi/vim no problem, but less 99% of the times break the output/console as for the person that opened the issue

@tanmaywadhwa
Copy link

tanmaywadhwa commented Sep 28, 2021 via email

@blacktek
Copy link

blacktek commented Sep 29, 2021

reset and/or clear seem to work in general, but are not very handy.
Isn't it possible to fix this issue in ConEMU? with default windows console it doesn't happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
ANSI
  
Ready for Testing
Development

No branches or pull requests