Closed
Description
Windows Terminal version
1.13.10336.0
Windows build number
10.0.19042.1466
Other Software
No response
Steps to reproduce
In WSL bash, echo $'\e]9;9;\e\\'
Expected Behavior
Terminal should keep running. I don't know if the devs think an empty path should be treated as a no-op or like a well-formed path to a non-existent directory. For example, \e]9;9;/foo\e\\\ sets the directory to /.
Actual Behavior
Terminal window hangs immediately (tested by running date in a tight loop in the background) and crashes a second later.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done
Activity
j4james commentedon Feb 6, 2022
This was something I was planning to look at as a followup PR #12247. In the same way that
AdaptDispatchandConGetSetare designed to throw exceptions for error handling, the equivalent Terminal classesTerminalDispatchandITerminalApishould be doing the same thing. That way exceptions like this would be caught in theStateMachineand recovered gracefully.I had initially planned to leave this till I was further along refactoring the conhost side of things, but maybe it's a good idea to get it done sooner rather than later if it'll save users from having a crashed terminal. Any objections to that?
j4james commentedon Feb 6, 2022
I should add that this isn't necessarily a fix for the
OSC 9;9handling - I'm not sure what the correct behaviour is for that. I just want to make sure the terminal isn't needlessly crashing in situations like this.zadjii-msft commentedon Feb 7, 2022
I agree. At the very least, we should fix this crash now, so we can service the fix to the in-market builds.
13 remaining items
j4james commentedon Feb 11, 2022
Yeah, that makes perfect sense. I've just checked ConEmu now and it looks like a blank path is simply ignored, i.e. it retains the last valid path that was set. So what we have is technically correct - it's just a code health issue now.
Update Component Parts: (#1)