-
Notifications
You must be signed in to change notification settings - Fork 8.2k
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
CreatePseudoConsole
crashes due to long path to conpty.dll
#16860
Comments
Wow, great catch! |
Im wondering, how did you even discover this in the first place? Are you one of those people that name their directories like Java Classes? |
@a-usr you may check the linked issue JetBrains/pty4j#145 for the history |
To be honest I thought there was more to it. But thanks for the link! |
Nope, just tests involving running from gradle long paths failed all the sudden |
@a-usr Initially, it was discovered by IntelliJ plugin developers. Also, please see IDEA-347968 for more details. |
Anyhow, awesome that you found/helped to find this bug! |
@lhecker Thanks for fixing it. Do you know in when a stable Terminal v1.21 with the fix will be released? Seems the latest release (Windows Terminal v1.21.2361.0 as of now) doesn't contain it. |
I'll mark it up for a backport to 1.21. That will take probably about 2 weeks. |
I just pulled this into 1.21 after conflict resolution. |
Windows Terminal version
1.19.10573.0
Windows build number
10.0.22631.0
Other Software
No response
Steps to reproduce
WindowsTerminal.exe
should have length 167 chars or higher.WindowsTerminal.exe
Please see https://github.com/segrey/CreatePseudoConsole-crash-with-long-path, it automates the reproduction of this issue.
Expected Behavior
Windows Terminal runs normally.
Actual Behavior
Windows Terminal crashes at startup and finishes with exit code -1073740791 (hex: c0000409)
Event Viewer (Windows Log | Application) contains the following error:
Running the
WindowsTerminal.exe
with WinDbg shows that the problem is inCreatePseudoConsole
function:Looks like it's caused by crashing
swprintf_s
, becauseMAX_PATH
(260) is too small to accomodate the full path. This is indirectly confirmed by the following:WindowsTerminal.exe
doesn't crash when it's located in a directory with full path length 162 chars -- in this case the command line of OpenConsole.exe is 259 chars and everything works correctly:"D:\CreatePseudoConsole-crash-with-long-path\tmp\aaaaaaaa\aaaaaaaa\aaaaaaaa\aaaaaaaa\aaaaaaaa\aaaaaaaa\aaaaaaaa\aaaaaaaa\aaaaaaaa\aaaaaaaa\aa\terminal-1.19.10573.0\OpenConsole.exe" --headless --resizeQuirk --width 120 --height 30 --signal 0xd28 --server 0xd20
It'd be great to fix this issue, because sometimes conpty.dll / OpenConsole.exe are located deep inside the file system.
The text was updated successfully, but these errors were encountered: