-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Unknown input AND output regression between v1/v2 conhost #16410
Comments
So, here's an interesting question - why would you like access to the v1 console host/? We've got a mind to deprecate that entirely. I'd honestly think it weird to have a quick shortcut to the conhost propsheet inside the Terminal itself. They're two different apps, they should have separate settings IMO. |
In case I have an old app that requires the "Use legacy console" setting to be enabled for cmd. (Or make the setting no sense when using WT?) |
Okay, given that we are actively working on removing the legacy console, can you please let us know what application that is and how it breaks with the built-in non-legacy Windows Console Host? |
@DHowett Would it be possible to send you a PM/Mail with further information if required? |
@htcfreek Yes please! My e-mail is on my GitHub profile. |
@DHowett What I know is that it is an old self made IBM38 application which was ported using CICS runtime to run on Windows/DOS. My colleague told me that when our users start the app without "Legacy console mode" then they can not jump using the tab key between the fields and the mouse isn't working too. (We don't have WT installed for our users. So they definitely use the conhost) Additional test I made: |
This looks like the app might be using However, neither case explains why the legacy console option is needed. What does the app look like in Conhost without the "Use legacy console" checked. Is it the same appearance as Windows Terminal? If so, is it possible that your system has the |
@j4james
|
Is there any chance you could link us to this application to debug it/? I'd rather us figure out why this isn't working (even in conhost v2), rather than offer a bail-out to something we're actively trying to deprecate 😄 |
Unfortunately not. It is a self development of our company. And the only person who knows about the code, can make changes and can provide more details is out of office since a long time. And we can't send you a copy of the application. |
Some context: The runtime is providing IBM 3270 series terminal emulation (screen, keyboard, data channels, etc.) for Customer Information Control System (CICS) purposes. I wonder if use of console feature Here's example CICS Runtime 6.0.27 behavior across several configurations: Windows Console Hostwindows_console_host.mp4Legacy Windows Console Hostwindows_console_host_legacy.mp4Windows Terminal:windows_terminal.mp4 |
@zadjii-msft Is there anything else I can provide to help with your conhost deprecation efforts? (I presume you need to know which console APIs the runtime is using here, etc.) As it currently stands, this entire class of apps will fail to function if conhost v1 goes away. There's no indication the vendor is working on an update. |
FWIW, we are not deprecating all of conhost. We're deprecating only the v1/legacy console (which was forked after Windows 8.1 and frozen in time.) At this point, a live repro would be the best... but I understand that probably CICS Runtime requires a bunch of setup that isn't available to us. Hmm. |
@DHowett Didn't you have some kind of debug feature that could be used to log console API calls? That might be helpful here, because I'm curious to see what input APIs they are using that might be the cause of the tab key and mouse operations failing. As far as the output corruption is concerned, I'm pretty certain that's just one of the |
I can get that information for you outside any logging facility that may exist. Sounds like that coupled with some test cases will be needed to move forward here so I can work on that. |
vtm can log Win32 Console API calls (with |
What we currently support are TraceLogging events of the We have instructions to record a trace here: https://github.com/microsoft/terminal/wiki/Troubleshooting-Tips#capturing-a-debug-etl-trace @j4james You're thinking of https://github.com/microsoft/terminal/tree/dev/duhowett/hax/conhost_dump_replay |
Unfortunately, conhost_dump_replay doesn't capture generated input nor does it work for the legacy console; however, I can imagine introducing a version of it that acts as an interposer between the client and the server rather than as its own server. Hmm. |
Oh, it might be best to use the DefTerm profile if you do go the WPR route. It's not documented on that page, but if you swap |
I don't think that's necessarily a problem. Even running in the new conhost, we should be able to get a general idea of what the app is doing: what input modes are set; what read APIs are called. And from that we could potentially produce our own test app that does the same sort of thing, and see how it performs in v1 conhost compared to v2 conhost. |
@j4james Oh! You're totally right! Alright, very few folks have actually run through this scenario end-to-end, so... it might break. OpenConsole-Dump-Replay-20240221.tar.gz
|
Per request: |
And another with more complex menu navigation and even an unhandled exception (not console's fault) during a print operation. Note this OpenConsole doesn't reproduce the formatting issues above. Suspect that's expected and we're just using this OpenConsole build for tracing. But do correct me if I'm wrong here. |
@riverar Thanks for the logs. I had a chance to look at them this weekend, and I think I've figured out at least part of the what is going wrong.
|
When using the legacy console APIs, it's possible to write arbitrary codepoints into the buffer. If any of those codepoints are in the C0 or C1 range, and the buffer contents are forwarded over conpty, they can end up mistakenly interpreted as controls by the connected terminal. This PR fixes that issue by converting any C0 and C1 codepoints in the buffer into printable glyphs before forwarding them over conpty. I've used the C0 glyphs from the DOS 437 codepage and just a `?` for the C1 codepoints, since that's what you would typically have seen in the v1 console with a raster font. Although this doesn't address the main problem in #16410, it should at least fix the rendering issues they're seeing when running their app in Windows Terminal. I've confirmed that the test case in #4363 now looks the same in Windows Terminal as it does in conhost, and I've tested the Windows version of the terminal game [Gorched], and confirmed that it now works correctly in Window Terminal. [Gorched]: https://github.com/zladovan/gorched Closes #4363 Closes #6265
When using the legacy console APIs, it's possible to write arbitrary codepoints into the buffer. If any of those codepoints are in the C0 or C1 range, and the buffer contents are forwarded over conpty, they can end up mistakenly interpreted as controls by the connected terminal. This PR fixes that issue by converting any C0 and C1 codepoints in the buffer into printable glyphs before forwarding them over conpty. I've used the C0 glyphs from the DOS 437 codepage and just a `?` for the C1 codepoints, since that's what you would typically have seen in the v1 console with a raster font. Although this doesn't address the main problem in #16410, it should at least fix the rendering issues they're seeing when running their app in Windows Terminal. I've confirmed that the test case in #4363 now looks the same in Windows Terminal as it does in conhost, and I've tested the Windows version of the terminal game [Gorched], and confirmed that it now works correctly in Window Terminal. [Gorched]: https://github.com/zladovan/gorched Closes #4363 Closes #6265 (cherry picked from commit 563b731) Service-Card-Id: 92001662 Service-Version: 1.20
When using the legacy console APIs, it's possible to write arbitrary codepoints into the buffer. If any of those codepoints are in the C0 or C1 range, and the buffer contents are forwarded over conpty, they can end up mistakenly interpreted as controls by the connected terminal. This PR fixes that issue by converting any C0 and C1 codepoints in the buffer into printable glyphs before forwarding them over conpty. I've used the C0 glyphs from the DOS 437 codepage and just a `?` for the C1 codepoints, since that's what you would typically have seen in the v1 console with a raster font. Although this doesn't address the main problem in #16410, it should at least fix the rendering issues they're seeing when running their app in Windows Terminal. I've confirmed that the test case in #4363 now looks the same in Windows Terminal as it does in conhost, and I've tested the Windows version of the terminal game [Gorched], and confirmed that it now works correctly in Window Terminal. [Gorched]: https://github.com/zladovan/gorched Closes #4363 Closes #6265 (cherry picked from commit 563b731) Service-Card-Id: 92001661 Service-Version: 1.19
the "new" one doesnt supply virtual key code on key pressed down, only on key pressed up. the "new" conhost im reffering has 10.0.18362.1 file version, living in my virtualbox world (never would have i rise above 7th win) so the problem here is a simple lack of testing. testing tool that would fit is the showkey-like program that prints received input.
|
I've been using this to test If I run that in a build 18362 conhost, I never get Is there any specific keys that you press that reproduce the issue? Otherwise I'd also of course be happy to test some PHP code if you have anything that would reproduce such an issue. 🙂 |
mm, ooke, that's the |
Description of the new feature/enhancement
Please add a button or menu entry that people can open the old CMD window settings. Sometimes there are situations where you need to change them. For example to enable legacy conhost behavior.
Proposed technical implementation details (optional)
The text was updated successfully, but these errors were encountered: