"Zed quit unexpectedly" - when quitting via ⌘ + Q
Check for existing issues
- [X] Completed
Description
I always close apps with ⌘ + Q instead of ⌘ + W to make sure nothing is running in the background anymore. Therefore, this message gets displayed every time I close Zed. Really annoying and I would assume apple receiving unnecessary crash reports is also not the best for ya.
Screenshot
Environment
Zed: v0.123.6 (Zed) OS: macOS 14.3.1 Memory: 16 GiB Architecture: aarch64
Zed log
2024-02-25T14:25:00+01:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-02-25T14:25:01+01:00 [INFO] Waiting for default prettier to install 2024-02-25T14:25:01+01:00 [INFO] Starting prettier at path "/Users/fschlegelone/Library/Application Support/Zed/prettier" 2024-02-25T14:25:01+01:00 [INFO] Node runtime install_if_needed 2024-02-25T14:25:01+01:00 [ERROR] crates/lsp/src/lsp.rs:256: cannot read LSP message headers 2024-02-25T14:25:01+01:00 [ERROR] crates/lsp/src/lsp.rs:648: server shut down 2024-02-25T14:25:01+01:00 [ERROR] crates/lsp/src/lsp.rs:278: Broken pipe (os error 32) 2024-02-25T14:25:01+01:00 [ERROR] Default prettier instance failed to spawn: default prettier spawn: prettier server initialization: oneshot canceled 2024-02-25T14:25:01+01:00 [INFO] Initializing default prettier with plugins {} 2024-02-25T14:25:01+01:00 [INFO] Initializing default prettier with plugins {} 2024-02-25T14:25:04+01:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-02-25T14:25:25+01:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-02-25T14:25:58+01:00 [INFO] Starting prettier at path "/Users/fschlegelone/Library/Application Support/Zed/prettier" 2024-02-25T14:25:58+01:00 [INFO] Node runtime install_if_needed 2024-02-25T14:25:58+01:00 [ERROR] crates/lsp/src/lsp.rs:256: cannot read LSP message headers 2024-02-25T14:25:58+01:00 [ERROR] crates/lsp/src/lsp.rs:648: server shut down 2024-02-25T14:25:58+01:00 [ERROR] crates/lsp/src/lsp.rs:278: Broken pipe (os error 32) 2024-02-25T14:25:58+01:00 [ERROR] Default prettier instance failed to spawn: default prettier spawn: prettier server initialization: oneshot canceled 2024-02-25T14:25:59+01:00 [INFO] Initializing default prettier with plugins {} 2024-02-25T14:25:59+01:00 [INFO] Initializing default prettier with plugins {} 2024-02-25T14:26:04+01:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-02-25T14:26:34+01:00 [INFO] Initializing default prettier with plugins {} 2024-02-25T14:26:34+01:00 [ERROR] crates/lsp/src/lsp.rs:648: oneshot canceled 2024-02-25T14:26:36+01:00 [INFO] ========== starting zed ========== 2024-02-25T14:26:36+01:00 [INFO] Opening main db 2024-02-25T14:26:36+01:00 [ERROR] crates/theme/src/settings.rs:344: theme not found: Catppuccin Macchiato 2024-02-25T14:26:36+01:00 [INFO] Opening main db 2024-02-25T14:26:36+01:00 [INFO] build git repository ".git" 2024-02-25T14:26:36+01:00 [ERROR] error processing "/opt/repos/projects/one_config/dotfiles/.cargo/bin/rls": No such file or directory (os error 2) 2024-02-25T14:26:36+01:00 [ERROR] error processing "/opt/repos/projects/one_config/dotfiles/.cargo/bin/rustdoc": No such file or directory (os error 2) 2024-02-25T14:26:36+01:00 [ERROR] error processing "/opt/repos/projects/one_config/dotfiles/.cargo/bin/cargo": No such file or directory (os error 2) 2024-02-25T14:26:36+01:00 [ERROR] error processing "/opt/repos/projects/one_config/dotfiles/.cargo/bin/rust-analyzer": No such file or directory (os error 2) 2024-02-25T14:26:36+01:00 [ERROR] error processing "/opt/repos/projects/one_config/dotfiles/.cargo/bin/clippy-driver": No such file or directory (os error 2) 2024-02-25T14:26:36+01:00 [ERROR] error processing "/opt/repos/projects/one_config/dotfiles/.cargo/bin/rust-gdbgui": No such file or directory (os error 2) 2024-02-25T14:26:36+01:00 [ERROR] error processing "/opt/repos/projects/one_config/dotfiles/.cargo/bin/cargo-miri": No such file or directory (os error 2) 2024-02-25T14:26:36+01:00 [ERROR] error processing "/opt/repos/projects/one_config/dotfiles/.cargo/bin/rust-lldb": No such file or directory (os error 2) 2024-02-25T14:26:36+01:00 [ERROR] error processing "/opt/repos/projects/one_config/dotfiles/.cargo/bin/cargo-clippy": No such file or directory (os error 2) 2024-02-25T14:26:36+01:00 [ERROR] error processing "/opt/repos/projects/one_config/dotfiles/.cargo/bin/rustc": No such file or directory (os error 2) 2024-02-25T14:26:36+01:00 [ERROR] error processing "/opt/repos/projects/one_config/dotfiles/.cargo/bin/cargo-fmt": No such file or directory (os error 2) 2024-02-25T14:26:36+01:00 [ERROR] error processing "/opt/repos/projects/one_config/dotfiles/.cargo/bin/rustfmt": No such file or directory (os error 2) 2024-02-25T14:26:36+01:00 [ERROR] error processing "/opt/repos/projects/one_config/dotfiles/.cargo/bin/rust-gdb": No such file or directory (os error 2) 2024-02-25T14:26:36+01:00 [INFO] build git repository "dotfiles/.config/nvim/pack/github/start/copilot.vim/.git" 2024-02-25T14:26:37+01:00 [INFO] set status on client 0: Authenticating 2024-02-25T14:26:37+01:00 [INFO] Opening main db 2024-02-25T14:26:37+01:00 [INFO] set status on client 116624: Connecting 2024-02-25T14:26:37+01:00 [INFO] Opening main db 2024-02-25T14:26:37+01:00 [ERROR] crates/workspace/src/persistence/model.rs:257: No worktree for path: "/Users/fschlegelone/.config/zed/settings.json" 2024-02-25T14:26:37+01:00 [ERROR] crates/workspace/src/persistence/model.rs:257: No path stored for this editor
I can quit without any problems using Cmd+q — any concrete steps to reproduce?
@fschlegelone is it possible to send us the content of one of the macOS crash reports you are seeing?
(You can find them in the Console app with cmd-space Console and then click on "Crash reports").
We don't have a way to tie crash reports to specific users, so I'd love to know which one this is.
I'm able to Cmd+Q fine as well on v0.127.3. Do you experience this issue with the latest version of Zed?
Following up from my earlier comment, it seems likely that this is (an example of) the relevant crash:
https://zed-crash-reports.nyc3.digitaloceanspaces.com/0988851E-D920-4CB4-B102-AD429EE116E7.ips
We see this about once a day, so it's clearly not affecting everyone (and probably even for the people it is affecting, it's not every time).
I suspect that there's another race in the Mac platform code where the objective C window has been released, but rust code tries to access it.
lookUpImpOrForward
_objc_msgSend_uncached
<gpui::platform::mac::window::MacWindow as core::ops::drop::Drop>::drop::{closure#0}
<async_task::raw::RawTask<<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = ()>>>>, (), <gpui::executor::ForegroundExecutor>::spawn::inner<()>::{closure#0}, ()>>::run
_dispatch_client_callout
_dispatch_main_queue_drain
_dispatch_main_queue_callback_4CF
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
__CFRunLoopRun
CFRunLoopRunSpecific
RunCurrentEventLoopInMode
ReceiveNextEventCommon
_BlockUntilNextEventMatchingListInModeWithFilter
_DPSNextEvent
-[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
-[NSApplication run]
<gpui::platform::mac::platform::MacPlatform as gpui::platform::Platform>::run
Zed::main
std::rt::lang_start::<()>::{closure#0}
std::rt::lang_start_internal::hba631f1493ca29ca
and 2 more...
This may be fixed by the latest preview which fixes one known case of this drop panic.
Closing optimistically, but will re-open if it recurs :D.