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

Output distorted under newest Cygwin [test] #1966

Open
thorstenkampe opened this issue Aug 13, 2019 · 15 comments
Open

Output distorted under newest Cygwin [test] #1966

thorstenkampe opened this issue Aug 13, 2019 · 15 comments

Comments

@thorstenkampe
Copy link

thorstenkampe commented Aug 13, 2019

Versions

ConEmu build: 190714[32]
OS version: Windows 10 x64
Used shell version: Powershell, Cmd

Problem description

Running Cygwin text utilities with the newest Cygwin test release shows a massive distortion of the output.

Steps to reproduce

  1. install Cygwin 3.1.0-0.1 through the Cygwin installer
  2. run Cygwin utilities like ls or tree from Cmd or PowerShell
  3. output is distorted (see below)
  4. Please see https://cygwin.com/ml/cygwin/2019-08/msg00152.html where Takashi Yano states "I looked into this problem, and found that this is due to a bug of ConEmu."

Actual results

> ls -l
insgesamt 0
           -rw-rw----+ 1 thorsten Kein 0 12. Dez 2018  test.txt
                                                               -rw-rw----+ 1 thorsten Kein 0 12. Dez 2018  test.txt.1

Expected results

> ls -l
insgesamt 0
-rw-rw----+ 1 thorsten Kein 0 12. Dez 2018  test.txt
-rw-rw----+ 1 thorsten Kein 0 12. Dez 2018  test.txt.1
@Maximus5
Copy link
Owner

I suppose you don't run cygwin via cygwin/msys connector.
If so, the bug most probably should be addressed to Microsoft.

@thorstenkampe
Copy link
Author

Not really sure what you mean. If I run conemu-cyg-64.exe ls -l then the output is as expected. But it used to work without conemu-cyg-64. So from my perspective the bug is either in ConEmu or in Cygwin. I would rather say Cygwin because Cygwin is the one that changed.

Did you read what Takashi Yano states in https://cygwin.com/ml/cygwin/2019-08/msg00152.html ?
"If ENABLE_VIRTUAL_TERMINAL_INPUT flag is set to console input, it affects to console output and becomes so that the newline '\n' does not cause carriage return."

Can you "do" something with this finding?

@tyan0
Copy link
Contributor

tyan0 commented Aug 14, 2019

This is not cygwin specific problem. To reproduce the problem, compile attached source in https://cygwin.com/ml/cygwin/2019-08/msg00152.html using mingw compiler and execute it in ConEmu.

The expected result and the result in command prompt is:

AAA
BBB

However, the result in ConEmu is:

AAA
   BBB

@falsovsky
Copy link

falsovsky commented Oct 14, 2019

I'm also being hit by this bug. Latest Cygwin 64bits and latest Conemu Preview.
For me it seems to happen randomly.
Any ideas @Maximus5 ?

@falsovsky
Copy link

This bug and the paste feature removing the newlines made me stop using this software.

Gonna try again in a few months.

@Pathduck
Copy link

Pathduck commented Jan 9, 2020

I've just encountered this issue in Cmder which uses Conemu, after a Cygwin update.
Until a fix can be done in code either in Cygwin or Conemu - is there a workaround for this? Envvar, setting, anything?

@PipeItToDevNull
Copy link

PipeItToDevNull commented Jan 10, 2020

@Pathduck I believe the work around was stated above

When I do this all the cygwin executables in my path display correctly. It completely breaks my workflow (obviously) so I am looking to utilize that in some way.

@Pathduck
Copy link

@PipeItToDevNull For now I've just rolled the Cygwin 'cygwin' package back to 3.0.7-1 and it works. I rarely update Cygwin anyway, and I'll just wait for a couple of months and try again.

@PipeItToDevNull
Copy link

@Pathduck How did you achieve this? I just installed cygwin using a portable script

@Pathduck
Copy link

@Pathduck How did you achieve this? I just installed cygwin using a portable script

I use the GUI installer, and you can roll back to older versions there. But the "bug" is in the cygwin1.dll and if you just replace this it will work. You can get the older packages here:
https://cygwin.uib.no/x86/release/cygwin/
https://cygwin.uib.no/x86_64/release/cygwin/

Unpack the cygwin-3.0.7-1.tar.xz with xz -d and find the dll in usr/bin.

@tyan0
Copy link
Contributor

tyan0 commented Jan 10, 2020

But the "bug" is in the cygwin1.dll and if you just replace this it will work.

This is not a bug of cygwin but a lack of feature in ConEmu. The problem is that ConEmu ignores DISABLE_NEWLINE_AUTO_RETURN which is used in cygwin 3.1.x.

@tyan0
Copy link
Contributor

tyan0 commented Jan 17, 2020

I made a patch against ConEmuHk.dll just for testing. I am not familiar with ConEmu source, so I am not sure this is the right thing. However, the following patch solves the issue.

0001-Add-support-for-DISABLE_NEWLINE_AUTO_RETURN.patch.zip

@PipeItToDevNull
Copy link

PipeItToDevNull commented Jan 17, 2020

I started using scoops as my work around

I will test this at some point though

@HansM1986
Copy link

HansM1986 commented Jan 19, 2020

Another workaround is to uncheck the "Inject ConEmuHk.dll into all processes started in ConEmu tabs" option in Settings->General

@Pathduck
Copy link

This appears to be fixed in the latest Cygwin 3.1.4-1 base package.
See: #2059

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants