Skip to content
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 - Zed crashes on terminal open unless config is fixed #11645

Open
1 task done
arihant2math opened this issue May 10, 2024 · 5 comments
Open
1 task done

Windows - Zed crashes on terminal open unless config is fixed #11645

arihant2math opened this issue May 10, 2024 · 5 comments
Labels
defect [core label] panic / crash [core label] setting Feedback for preferences, configuration, etc terminal Feedback for terminal integration, shell commands, etc windows

Comments

@arihant2math
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

When opening the terminal (by clicking on the button on the toolbar) on windows, the entire application crashes unless the following is set in the zed settings:

"terminal": {
    "shell": {
        "program": "pwsh"
    }
  }

where the program is either pwsh or cmd or any other installed shell.

Environment

Zed: v0.136.0 (Zed Dev 0c2d71f)
OS: Windows 10.0.22635
Memory: 15.9 GiB
Architecture: x86_64

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

The logs simply end with

2024-05-09T21:12:50-07:00 [INFO] Using Windows API for pseudoconsole

(The log message is from alacritty)

Zed.log

@arihant2math arihant2math added admin read Pending admin review defect [core label] panic / crash [core label] triage Maintainer needs to classify the issue labels May 10, 2024
@Moshyfawn Moshyfawn added terminal Feedback for terminal integration, shell commands, etc windows setting Feedback for preferences, configuration, etc and removed triage Maintainer needs to classify the issue labels May 10, 2024
@arihant2math
Copy link
Author

It seems like this line is unix only.

@a-usr
Copy link
Contributor

a-usr commented May 15, 2024

It works for me (windows 11 Build 22631.3447)
When clicking on the terminal with the default configuration it opens cmd.exe for a shell. I find it quite odd that there is no panic whatsoever. Are you building under native windows or wsl? are you sure zed isn't still running? Is cmd.exe working correctly? Try disabling any antivirus application before starting the terminal in zed.

@arihant2math
Copy link
Author

It works for me (windows 11 Build 22631.3447) When clicking on the terminal with the default configuration it opens cmd.exe for a shell.

Issues are likely not going to be reproducible for all users, especially because this is windows.

I find it quite odd that there is no panic whatsoever. Are you building under native windows or wsl?

I doubt wsl is even supported, I am in fact building under natively.

are you sure zed isn't still running? Is cmd.exe working correctly?

yes and yes

Try disabling any antivirus application before starting the terminal in zed.

uh ... I don't see how this would help?

  1. Terminals work out of the box in basically every other ide/text editor on my computer (JetBrains, VSC, etc.) so this isn't some sort of issue with my computer.

  2. This is a silent panic that is occurring because alacrity is mis-configured in some way (to the best of my knowledge). Part of me suspects that zed is feeding in a ~ to cmd.exe (as part of the working directory or some other configuration), which leads to the crash or zed could be trying to spawn a sh shell or similar and crashing because of that.

  3. I don't have antivirus installed

@a-usr
Copy link
Contributor

a-usr commented May 15, 2024

  1. This is a silent panic that is occurring because alacrity is mis-configured in some way (to the best of my knowledge). Part of me suspects that zed is feeding in a ~ to cmd.exe (as part of the working directory or some other configuration), which leads to the crash or zed could be trying to spawn a sh shell or similar and crashing because of that.

Good thinking, but can you prove that? And what about the return code when zed exits?

@arihant2math
Copy link
Author

  1. This is a silent panic that is occurring because alacrity is mis-configured in some way (to the best of my knowledge). Part of me suspects that zed is feeding in a ~ to cmd.exe (as part of the working directory or some other configuration), which leads to the crash or zed could be trying to spawn a sh shell or similar and crashing because of that.

Good thinking, but can you prove that? And what about the return code when zed exits?

Well it's silent, I can't really prove it any more than the fact alacrity had a similar issue:
alacritty/alacritty#7615

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] panic / crash [core label] setting Feedback for preferences, configuration, etc terminal Feedback for terminal integration, shell commands, etc windows
Projects
None yet
Development

No branches or pull requests

4 participants