zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.89k stars 3.15k forks source link

[Linux] Clicking git blame crashes Zed #21304

Closed SomeoneToIgnore closed 1 day ago

SomeoneToIgnore commented 2 days ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Open Zed repo in Zed, toggle git blame, click on the git blame entry

Expected: a browser is opened with the relevant commit Actual: a cryptic panic

2024-11-28T23:40:47.200746554+02:00 [ERROR] {
  "thread": "<unnamed>",
  "payload": "there is no reactor running, must be called from the context of a Tokio 1.x runtime",
  "location_data": {
    "file": "/home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zbus-5.1.1/src/abstractions/executor.rs",
    "line": 189
  },
  "backtrace": [
    "core::panicking::panic_fmt",
    "tokio::runtime::scheduler::Handle::current::panic_cold_display",
    "tokio::runtime::scheduler::Handle::current",
    "zbus::connection::builder::Builder::build_::{{closure}}",
    "ashpd::proxy::Proxy::connection::{{closure}}",
    "ashpd::proxy::Proxy::new_desktop::{{closure}}",
    "ashpd::desktop::open_uri::OpenURIProxy::new::{{closure}}",
    "gpui::platform::linux::platform::open_uri_internal::{{closure}}",
    "async_task::raw::RawTask<F,T,S,M>::run",
    "std::sys::backtrace::__rust_begin_short_backtrace",
    "core::ops::function::FnOnce::call_once{{vtable.shim}}",
    "std::sys::pal::unix::thread::Thread::new::thread_start",
    "start_thread",
    "__GI___clone3"
  ],
  "app_version": "0.165.0",
  "release_channel": "Zed Nightly",
  "os_name": "Linux Wayland",
  "os_version": "fedora 41",
  "architecture": "x86_64",
  "panicked_on": 1732830047200,
  "system_id": "60289f31-72c4-421e-b50a-0dfcbf8574ca",
  "installation_id": "7469252e-15a5-4388-bf97-205fee3b5cf4",
  "session_id": "de92bfd4-3c36-4501-90fc-9e4cbb9edc43"
}

Do note that the path in the backtrace is from the build machine:

~ ❯ ls /home
alpc

Environment

Zed Nightly 0.165.0 cacec06db66fe29252b0f24b08e53509812f32a6

Linux alpc 6.11.8-300.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 14 20:37:39 UTC 2024 x86_64 GNU/Linux

LSB Version: n/a Distributor ID: Fedora Description: Fedora Linux 41 (Workstation Edition) Release: 41 Codename: n/a

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

Zed.log ``` ```
apricotbucket28 commented 2 days ago

I bisected the crash to https://github.com/zed-industries/zed/commit/6927512e345bb8c258417e58f7b0cf25b1ac8a87. It seems like ashpd switched from async-std to tokio by default: https://github.com/bilelmoussaoui/ashpd/commit/ebfdc2f59ea1a522d749480e64c7ff1c44c0f41d.

SomeoneToIgnore commented 2 days ago

Thank you, that was indeed it and quite easy to fix after your information.

SomeoneToIgnore commented 1 day ago

Closed in https://github.com/zed-industries/zed/pull/21315