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

git-for-windows's bash under ConEmu: the console don't display user input (and I can't commit) #295

Closed
glhez opened this issue Aug 24, 2015 · 13 comments

Comments

@glhez
Copy link

glhez commented Aug 24, 2015

Hello,

I ran into a bug either in ConEmu, either in Git for Windows 2.5.0, either in VIM (I don't really know), and I can hardly reproduce or tell what is wrong here.

I am using the following:

Some time, my bash goes in blind mode, where I don't see anymore the text I input.

[22:32:09] /e/git/tg/test-toolbox (develop) [1.8.0_51]
$ git commit
Aborting commit due to empty commit message.
[0;36m[22:32:12] /e/git/tg/test-toolbox (develop) [1.8.0_51]
$ [22:32:14] /e/git/tg/test-toolbox (develop) [1.8.0_51]
$ Aborting commit due to empty commit message.
[0;36m[22:32:27] /e/git/tg/test-toolbox (develop) [1.8.0_51]

I can blindly type the reset command, then enter, and it work again.

But whenever I try to commit again, I have the same problem: vim launch, but incorrectly, leading git to think the commit is empty (which is probably the same).

This is rare and I don't even have a clue of what I've done wrong to get into those trouble.

I tried this command to force reproduce the problem (fail from time to time, and when it does not fail, you need to kill the whole process), with Real console enabled.

rm -f .git/.COMMIT_EDITMSG.swp ;
git reset --hard usbkey/develop ; 
for (( i = 0; i < 100; ++i )); do echo $i > $i; git add "$i"; git commit ; done

On the bash tab, I have this (I truncated to the last line):

7Aborting commit due to empty commit message.
warning: LF will be replaced by CRLF in 99.
The file will have its original line endings in your working directory.
7Aborting commit due to empty commit message.
[0;36m[20:20:51] /e/git/tg/parent (develop) [1.8.0_51]

And the real console:

7Aborting commit due to empty commit message.
warning: LF will be replaced by CRLF in 99.
The file will have its original line endings in your working directory.
7Aborting commit due to empty commit message.
[0;36m[20:20:51] /e/git/tg/parent (develop) [1.8.0_51]
@mikofski
Copy link

mikofski commented Oct 1, 2015

+1 similar issue.

vim --help and vim --version also don't work - show briefly, the clear.

conemu has issues with vim msys2, git-for-windows, msysgit and vim.org

  • crashes for commit messages
  • segfault
  • can't write to _viminfo
  • can't get viminfo data, press enter to continue
  • tried deleting _viminfo, no effect

console2 doesn't have any issues with vim.

@calvindhsu
Copy link

+1 as well, running into this almost every hour. Not sure what the trigger conditions are.

EDIT: I am running Git 2.5.0 x64

@Maximus5
Copy link
Owner

Maximus5 commented Oct 2, 2015

Don't mix issues. All comments are about different things.

And why haven't you posted ConEmu version?

@mikofski Crashes, segfault: Hard to believe. Where are dumps?
Can't write: Never observed it.

@calvindhsu Running into what exactly? On what version?

@calvindhsu
Copy link

@Maximus5 Thanks for the response. Sorry for the vague comment. I'm running into same issue exactly as described as op, glhez.

Repro steps aren't consistent. But I get it maybe 20% of the time when I do something like:

git log
Hold Ctrl+F / Ctrl+B to scroll back and through many pages
git commit -a 

This results in skipping vim and:

Aborting commit due to empty commit message.
]0;MINGW64:/e/src/dev

Afterwards all input is blind.

ConEmu Version 2015.8.13c x64
(ConEmuPack.150813c\ConEmu64.exe)

bash --version
GNU bash, version 4.3.42(2)-release (x86_64-pc-msys)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

git --version
git version 2.5.2.windows.2

@mikofski
Copy link

mikofski commented Oct 5, 2015

Hi @Maximus5

sorry for my terse report, and sorry if this is the wrong issue for it, I found at least 2 others that seemed similar (#341 and #335 both seemed similar). I will try to acquire trigger a seg fault again and save the vim stacktrace to report here. (MSYS2 seems to automatically generate these now)

I will also try to figure out why the vim --help and vim --version output is being cleared, and look through the source to see if it can be redirected or captured for the main console. It doesn't persist in the "real console" either, but it does persists in CMD, mintty and Console2/Z.

IMO ConEmu is still by far the best windows console emulator in existence and I am willing to help to make it work. I greatly appreciate your contribution! Thanks!

@Maximus5
Copy link
Owner

Build 151025?

@glhez
Copy link
Author

glhez commented Oct 26, 2015

@calvindhsu yes, that's my case. Even through I don't use git log + Ctrl F/B.

@mikofski while investigating git-for-windows/git#307 (which is the same as this one), it turned into crash of conhost. I can't really say the two are the same problem.

I retried my procedure to get it fail (a simple bash for loop with git commit in the loop) and it crashed with git-for-windows 2.6.2 and ConEmu 151025:

The minidumps contains conemu64, conemuc64, vim and two conhost process of which I don't know which failed (I initially created fulldumps and one of these conhost is in fact the previous run).

By the way, @Maximus5, if you think I should create another separate issue for conhost crashes, please tell me.

@Maximus5
Copy link
Owner

@calvindhsu
Copy link

@Maximus5 I'm going to be testing the 151025 build over the next few days, will let you know if I run into anything.

@glhez
Copy link
Author

glhez commented Oct 27, 2015

I don't why I unchecked the ConEmuHk injection, but it fails even with it: here is the full set of minidumps -> https://bitbucket.org/glhez/zeta-bash/downloads/pe-2015-10-27-001.7z

@mikofski
Copy link

so far 151025 is working great for me. Thanks!

  • vim is stable with git commit
  • vim --help and vim --version buffers are preserved
  • git-for-windows git bash is automatically detected and added as c:\program files\git\git-cmd.exe --command=usr\bin\bash.exe -l -i
  • msys-2_x86-64 is also detected automatically, but $MSYSTEM is not set - this should be set by the user depending on whether they want MSYS, MINGW32 or MINGW64.

@calvindhsu
Copy link

151025 seems to be a lot more stable. I ran into the blind input problem once so far over these two days in my daily workflow. Not sure how I triggered it this time. This is in comparison to running into the issue once an hour.

@mikofski
Copy link

mikofski commented Nov 3, 2015

@Maximus5 2 weeks of testing, not a single incident of either

can't write to _viminfo

... or ...

can't get viminfo data, press enter to continue

I vote to close this issue.

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

4 participants