The output of some applications is sometimes swallowed #20185

Closed
opened 2026-01-31 07:06:01 +00:00 by claunia · 10 comments
Owner

Originally created by @dio-gh on GitHub (Jul 3, 2023).

Windows Terminal version

1.17.11461.0

Windows build number

10.0.22621.0

Other Software

RPCS3 v0.0.28-15255-b0a34670
PCSX2 Nightly - v1.7.4675
mpv 0.35.1
Git Bash (git version 2.40.1.windows.1)

Steps to reproduce

Call the executables of these respective applications with the following flags from Git Bash:

  • rpcs3.exe --help
  • pcsx2-qt.exe -help
  • mpv.exe --version

Observe the presence of terminal output when PCSX2 is called, and the absence of output when RPCS3 is called (with pwsh a pop-up is thrown). In the case of mpv nothing happens, even using pwsh.

Expected Behavior

I expect the output to be printed for all of these, into the terminal.

Actual Behavior

The output is swallowed completely, or at best is shown as a pop-up.

Originally created by @dio-gh on GitHub (Jul 3, 2023). ### Windows Terminal version 1.17.11461.0 ### Windows build number 10.0.22621.0 ### Other Software RPCS3 v0.0.28-15255-b0a34670 PCSX2 Nightly - v1.7.4675 mpv 0.35.1 Git Bash (git version 2.40.1.windows.1) ### Steps to reproduce Call the executables of these respective applications with the following flags from Git Bash: - `rpcs3.exe --help` - `pcsx2-qt.exe -help` - `mpv.exe --version` Observe the presence of terminal output when PCSX2 is called, and the absence of output when RPCS3 is called (with pwsh a pop-up is thrown). In the case of mpv nothing happens, even using pwsh. ### Expected Behavior I expect the output to be printed for all of these, into the terminal. ### Actual Behavior The output is swallowed completely, or at best is shown as a pop-up.
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 07:06:01 +00:00
Author
Owner

@lhecker commented on GitHub (Jul 3, 2023):

FYI at least in case of mpv.exe --version this is expected behavior. You need to use mpv.com instead (which sets the environment variable _started_from_console to yes and then calls mpv.exe).

@lhecker commented on GitHub (Jul 3, 2023): FYI at least in case of `mpv.exe --version` this is expected behavior. You need to use `mpv.com` instead (which sets the environment variable `_started_from_console` to `yes` and then calls `mpv.exe`).
Author
Owner

@dio-gh commented on GitHub (Jul 4, 2023):

Right, can confirm that works.

@dio-gh commented on GitHub (Jul 4, 2023): Right, can confirm that works.
Author
Owner

@lhecker commented on GitHub (Jul 5, 2023):

Hmm the rpcs3.exe --help issue is weird. It doesn't work in conhost (with git bash) either.

@lhecker commented on GitHub (Jul 5, 2023): Hmm the `rpcs3.exe --help` issue is weird. It doesn't work in conhost (with git bash) either.
Author
Owner

@PankajBhojwani commented on GitHub (Jul 12, 2023):

Thank you for submitting the issue! This seems like an issue with git bash (rather, originating from Cygwin that git bash uses). Would you mind bringing this issue up in their mailing list? Closing this out here.

@PankajBhojwani commented on GitHub (Jul 12, 2023): Thank you for submitting the issue! This seems like an issue with git bash (rather, originating from Cygwin that git bash uses). Would you mind bringing this issue up in their mailing list? Closing this out here.
Author
Owner

@dio-gh commented on GitHub (Jul 14, 2023):

Hi @PankajBhojwani,

As stated in the original post, even under PowerShell, the behavior is different than expected. Would you consider reopening this please?

It's possible that it's working as intended and there's an issue in some other intermediate layer (e.g. coding issues in Qt or RPCS3), but it's not a Git Bash from what I can tell at all.

@dio-gh commented on GitHub (Jul 14, 2023): Hi @PankajBhojwani, As stated in the original post, even under PowerShell, the behavior is different than expected. Would you consider reopening this please? It's possible that it's working as intended and there's an issue in some other intermediate layer (e.g. coding issues in Qt or RPCS3), but it's not a Git Bash from what I can tell at all.
Author
Owner

@lhecker commented on GitHub (Jul 14, 2023):

Did RPCS3 ever print the help text into the Terminal in the first place? I can't reproduce such behavior in cmd.exe with the old console application. I get a popup there - same as with PowerShell.

@lhecker commented on GitHub (Jul 14, 2023): Did RPCS3 ever print the help text into the Terminal in the first place? I can't reproduce such behavior in cmd.exe with the old console application. I get a popup there - same as with PowerShell.
Author
Owner

@dio-gh commented on GitHub (Jul 15, 2023):

I believe it used to, but I'm not able to give you a specific version. Why does it produce a popup in the first place? I'm not familiar with this behavior or why it could happen.

Is there anything I can do to redirect such popups back into the terminal?

@dio-gh commented on GitHub (Jul 15, 2023): I believe it used to, but I'm not able to give you a specific version. Why does it produce a popup in the first place? I'm not familiar with this behavior or why it could happen. Is there anything I can do to redirect such popups back into the terminal?
Author
Owner

@lhecker commented on GitHub (Jul 15, 2023):

That's only something the application itself can control. I have another Qt6 application here (qBittorrent) which also pops up a dialog when I run it with --help. And to be honest, I fully believe you that it used to print into the terminal. I think it's supposed to, going by the code in Qt that I believe is relevant here (see displayMessageBox): https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/tools/qcommandlineparser.cpp#n522

But I must be missing something... Maybe that code only works if the Qt application is compiled with /SUBSYSTEM:CONSOLE? Well, as I said, we don't really have any control over this unfortunately. Something's not working on Qt's side. 🫤

@lhecker commented on GitHub (Jul 15, 2023): That's only something the application itself can control. I have another Qt6 application here (qBittorrent) which also pops up a dialog when I run it with `--help`. And to be honest, I fully believe you that it used to print into the terminal. I think it's supposed to, going by the code in Qt that I believe is relevant here (see `displayMessageBox`): https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/tools/qcommandlineparser.cpp#n522 But I must be missing something... Maybe that code only works if the Qt application is compiled with `/SUBSYSTEM:CONSOLE`? Well, as I said, we don't really have any control over this unfortunately. Something's not working on Qt's side. 🫤
Author
Owner

@j4james commented on GitHub (Jul 15, 2023):

Maybe that code only works if the Qt application is compiled with /SUBSYSTEM:CONSOLE?

Yeah. As I understand it, a Windows executable has to be linked with either the CONSOLE subsystem or the WINDOWS subsystem. If it's a GUI/WINDOWS application, it doesn't get attached to the console, so can't produce console output (it could open a separate console window, but that's not typically what you want). If it's a CONSOLE application, it'll always open a console window when you launch it, which is not something you want for a GUI application. So applications that provide both a CLI and a GUI will typically have a separate executable for each interface.

@j4james commented on GitHub (Jul 15, 2023): > Maybe that code only works if the Qt application is compiled with `/SUBSYSTEM:CONSOLE`? Yeah. As I understand it, a Windows executable has to be linked with either the CONSOLE subsystem or the WINDOWS subsystem. If it's a GUI/WINDOWS application, it doesn't get attached to the console, so can't produce console output (it could open a separate console window, but that's not typically what you want). If it's a CONSOLE application, it'll always open a console window when you launch it, which is not something you want for a GUI application. So applications that provide both a CLI and a GUI will typically have a separate executable for each interface.
Author
Owner

@dio-gh commented on GitHub (Jul 15, 2023):

Maybe the way the framework expects to be used changed. PCSX2 is also Qt6, but it produces terminal output as one would expect.

Either way, seems like the responsible parties are the individual app developers then, or maybe the framework. @PankajBhojwani Please disregard my request for reopening then, most likely not a Windows Terminal issue.

@dio-gh commented on GitHub (Jul 15, 2023): Maybe the way the framework expects to be used changed. PCSX2 is also Qt6, but it produces terminal output as one would expect. Either way, seems like the responsible parties are the individual app developers then, or maybe the framework. @PankajBhojwani Please disregard my request for reopening then, most likely not a Windows Terminal issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20185