-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
conhost headless mode is broken #13914
Comments
Thanks for the report! The direct invocation of Despite that, I'm not inclined to close this issue because it probably represents an under-served need... and because we didn't intentionally break it. What was the use case for which you were using In general: spawning headless console applications is achievable via |
Use case: shortcuts launching various powershell-based GUI front-ends in plain-text scripts,sans annoying / ocd-inducing flashing console window command-line scripting of various brief and simple tasks,sans annoying / ocd-inducing flashing console window parity with terminals on *nixmultiple ways of running headless scripts, by designStart /min was never a solution since it requires non-headless cmd - same for Run Minimized for shortcuts. Compiled programs obviously have access to window creation parameters, but that's outside the scope of Command Prompt / Powershell / Terminal and scripts. So maybe restore OS conhost behavior and do what's needed with Terminal's own OpenConsole? |
Note to self:
oh boy. We're crashing here. At this point in startup the
Okay that seems mostly reasonable. There's now just a case where, for This is probably due to there not being a signal handle.
|
Easiest delta to fix this is probably just void VtIo::CreatePseudoWindow()
{
+ if (_pPtySignalInputThread) {
_pPtySignalInputThread->CreatePseudoWindow();
+ else {
+ ServiceLocator::LocatePseudoWindow(owner);
+ }
} |
It's not supported, and it shouldn't be. But this is the absolutely most minimal way to get the crash to go away. Closes #13914
🎉This issue was addressed in #13950, which has now been successfully released as Handy links: |
This did not trickle down in Windows 11 latest builds and that's where it's most daring. |
Unfortunately, it's not very likely that we will fix this for existing Windows 11 install, either in the coming 22621 update or in a servicing update. It doesn't impact any previously supported user scenarios, and there's no strong business justification for bringing the fix into the coming version of Windows since that version of Windows has already been signed-off-on and sealed. |
@DHowett thankfully this only got broken in 11 Dev builds above 25179, so no objective reason not to expect the fix in upcoming 11 Dev builds. |
Oh, right! In that case, yes, the fix will be available in a future Dev build. We don't migrate the changes made in this repository over to the Windows codebase immediately, but we do migrate them eventually. |
Close to a year later and this crap is still not fixed. |
Windows Terminal version
1.15.2203.0
Windows build number
10.0.25193.1000
Other Software
No response
Steps to reproduce
conhost --headless cmd /c "echo;%date% %time%>>%userprofile%\desktop\test.log"
Expected Behavior
test.log with date and time on desktop sans brief ui, like it worked so far up to build 25179
Actual Behavior
cmd.exe - Application Error dialog
The application was unable to start correctly (0xc0000142).
Click OK to close the application.
The text was updated successfully, but these errors were encountered: