-
Notifications
You must be signed in to change notification settings - Fork 690
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
Linux terminal hangs after quit the GUI on Net5.0 #931
Comments
I can't repro this either in Windows Terminal with Ubuntu or ConEmu. What terminal are you using? |
That said, almost nothing else works in WSL for me. Tab key works to move between panes, but arrows don't nav. Hmm.... |
Also not working with CMD and WSL2. |
|
I use the default WSL2 terminal. I'm not sure what which open. How can I check that? I'm going test in VMWare to see if it's fail too. It's all messed up. With the Ubuntu 20.04 I seen the Example is fail too. |
Ahhh... If I start it from bash it works fine (and exits fine). but if I run it from pwsh most keystrokes don't work (but it exits fine). |
Weird thing is, |
The hangs after quit only happens with the Net5.0. The mouse issues only happens with Ubuntu which has the libncurses 6.2 version. |
Writing |
I already discovered what is causing this. Are the
Commenting them the behavior issue stops but the problem it's the mouse movement also stops too. |
I won't waste any more time on this problem because it only happens with |
The problem still exists. I just tested with |
Yes indeed. But if you test with the |
I confirm that it does not hang any more. However, after I close the application and I use a mouse button in the terminal I get strange text like: My environment is: |
Ah I see. I am using |
Is this another bug or related? Shall I open another issue? |
No, it is still under development in this PR #1021. |
I just did a |
Comment the |
Tried both, but it did not fix the problem. |
Can you post a print screen, please? Thanks. |
Oh, I'm now noticing that I didn't explain the problem before... sorry! After the application quits, when I press the left (or right) cursor key, the cursor caret moves a whole word at a time instead of a character at a time. It seems the Its not just the left/right cursor keys; up/down are also messed up. I'm not sure if this will help anything, but this is my
Interesting enough, if I immediately open |
Ah. Ok. The terminal is not restoring properly. It is a issue not solved yet. |
To bypass this without close the terminal, I do: With |
Yes. My terminal is broken after |
Ok, this is a blocking bug for releasing 1.0. I've labeled it as such. |
tagging myself, so I can review later |
I can no longer repro this in WSL (Debian) from I can no longer repro this in WSL (Ubuntu 20.04) from Anyone else? |
On WSL (Ubuntu 20.04.2 LTS) and on a Linux (VirtualBox) still happens with |
Can you repro it with WSL as well? |
Yes @tig |
I wonder what's different on my machine. |
Maybe your Linux version (Debian) but I doubt. It's not affecting only to me, because others are already say the same. It's only happens using he |
I can also reproduce this on linux with both alacritty and xterm. After quitting the app, the terminal keeps adding characters with just the mouse moving over it. Even in the app the mouse behaves wrong - just moving it seems to be reporting mouse clicks to the app. Can I help somehow with this issue? |
Hi, yes, I know. Although stopping mouse repporting at exit, the terminal continues to report these movements and hangs the terminal. I think the problem is not from |
I'll try to take a look sometime this week, we'll see how that goes :) |
"this week" became "next week" :) I don't have much success so far, the mouse situation seems to be putting ncurses in a weird state - if I click with the left mouse button, then mouse movement starts reporting left mouse clicks, if I use the mouse wheel, then mouse movement starts reporting mouse wheel events, but much faster than before. I tried to regenerate the On the topic of interesting observations - the ncurses library gets loaded dynamically twice. I'm not sure if this causes any side effects yet, this might be the next thing I verify. Long story short I'm worried that the native binding isn't completely correct, but I haven't found what exactly is wrong (yet). |
I finally fixed it, I hope :-) #931 |
Leaving open until we verify. |
Maybe is due to this:
Can you please check it? |
Try commenting all this: Console.Out.Write ("\x1b[2J");
Console.Out.Flush ();
Console.Out.Write ("\x1b[1;25r");
Console.Out.Flush (); |
Ok thanks. I'll send a PR with that lines commented. |
This is great sluthing folks! This stuff is black-art level stuff. The more documentation on why these changes work, the better. |
I added this to the code: // I'm commenting this because was used in a trying to fix the Linux hanging and forgot to exclude it.
// Clear and reset entire screen.
//Console.Out.Write ("\x1b[2J");
//Console.Out.Flush ();
// Reports current cursor line and column.
//Console.Out.Write ("\x1b[1;25r");
//Console.Out.Flush (); |
Run
UICatalog
inWSL
and quit. Try to type and it's hang and you have to closeWSL
. Do the same with theExample
and you can type normally. May be it's related withShutdown
already related before.The text was updated successfully, but these errors were encountered: