-
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
Windows Terminal crashes when nested command does not have command field #9448
Comments
Welp that's a pretty trivial repro. We'll make sure to add it to test cases so that this doesn't regress in the future. Thanks! |
It doesn't seem related to #8422, as that PR modified only the CmdPal (fixed an underflow there) and here it is a bug in the ShortcutActionDispatch that doesn't verify the parameters. I will add protection in |
Currently, when loading command with sub-commands that fail to parse, we result with command that: * Is not considered nested (has no sub-commands) * Has no action of its own The commit contains a few changes: 1. Protection in the dispatch that will prevent NPE 2. Change in the command parsing that will no load a command if all its sub-commands failed to parse 3. We will add a warning in this case (the solution is somewhat hacky, due to the hack that was there previously) When such command is passed to a dispatch we crash with NPE. Closes #9448
Currently, when loading command with sub-commands that fail to parse, we result with command that: * Is not considered nested (has no sub-commands) * Has no action of its own The commit contains a few changes: 1. Protection in the dispatch that will prevent NPE 2. Change in the command parsing that will no load a command if all its sub-commands failed to parse 3. We will add a warning in this case (the solution is somewhat hacky, due to the hack that was there previously) When such command is passed to a dispatch we crash with NPE. Closes #9448 (cherry picked from commit 28da6c4)
Currently, when loading command with sub-commands that fail to parse, we result with command that: * Is not considered nested (has no sub-commands) * Has no action of its own The commit contains a few changes: 1. Protection in the dispatch that will prevent NPE 2. Change in the command parsing that will no load a command if all its sub-commands failed to parse 3. We will add a warning in this case (the solution is somewhat hacky, due to the hack that was there previously) When such command is passed to a dispatch we crash with NPE. Closes #9448 (cherry picked from commit 28da6c4)
🎉This issue was addressed in #9495, which has now been successfully released as Handy links: |
🎉This issue was addressed in #9495, which has now been successfully released as Handy links: |
Crash happens in the latest release of Windows Terminal 1.6 and Preview 1.7.
Environment
Steps to reproduce
actions
array:From some experimentation, the crash is caused by the missing
"command"
field in the nested commands. While the example JSON above is not real-world, I originally found this when I typo'd the"command"
field name, which could also happen to other users.It might be related to #8422, but it's still happening in the latest release of Windows Terminal (both 1.6 and 1.7 preview).
I've submitted a Feedback Hub reproduction with the exact same title as this GitHub issue, but I wasn't signed in, so it appears I didn't get a hyperlink or ID. Let me know if you'd like me to submit another one (signed in this time).
The text was updated successfully, but these errors were encountered: