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

Running Zed through cargo run or using a built release binary crashes immediately #11319

Closed
1 task done
Person-Who-Exists opened this issue May 2, 2024 · 5 comments
Closed
1 task done
Labels
bug [core label] linux open source Open source community projects, contributions, etc panic / crash [core label]

Comments

@Person-Who-Exists
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

  1. Git pull latest commits
  2. Run cargo run or run a built binary
  3. Wait until zed crashes

Environment

landonk@archlinux
-----------------
OS: Arch Linux x86_64
Host: Predator PH315-54 (V1.15)
Kernel: 6.8.8-arch1-1
Uptime: 21 hours, 14 mins
Packages: 925 (pacman)
Shell: bash 5.2.26
Display (AUOAF90): 1920x1080 @ 144Hz [Built-in]
DE: KDE Plasma 6.0.4
WM: KWin (Wayland)
WM Theme: Colorful-Dark-Aurorae-6
Theme: Breeze (ColorfulBlueDarkColorscheme) [QT], Breeze-Dark [GTK2], Breeze [GTK3]
Icons: Colorful-Dark-Icons [QT], Colorful-Dark-Icons [GTK2/3/4]
Font: Noto Sans (10pt) [QT], Noto Sans (10pt) [GTK2/3/4]
Cursor: breeze (24px)
Terminal: alacritty 0.13.2
Terminal Font: alacritty (11.25pt)
CPU: 11th Gen Intel(R) Core(TM) i7-11800H (16) @ 4.60 GHz
GPU 1: Intel UHD Graphics @ 1.45 GHz [Integrated]
GPU 2: NVIDIA GeForce RTX 3050 Ti Mobile [Discrete]
Memory: 4.36 GiB / 15.40 GiB (28%)
Swap: 564.15 MiB / 4.00 GiB (14%)
Disk (/): 16.99 GiB / 19.52 GiB (87%) - ext4
Disk (/home): 90.02 GiB / 447.71 GiB (20%) - ext4
Local IP (wlan0): 192.168.1.130/24 *
Battery: 100% [Charging]
Locale: en_US.UTF-8

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

Although I have no log file, here is the error from the run command

[2024-05-02T16:27:42-04:00 ERROR util] crates/settings/src/settings_file.rs:76: EOF while parsing a value at line 1 column 0
[2024-05-02T16:27:42-04:00 ERROR util] crates/zed/src/zed.rs:663: EOF while parsing a value at line 1 column 0
Thread "main" panicked with "called `Result::unwrap()` on an `Err` value: ERROR_INITIALIZATION_FAILED" at /home/landonk/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/e82eec9/blade-graphics/src/vulkan/init.rs:842:18
   0: Zed::reliability::init_panic_hook::{closure#0}
             at crates/zed/src/reliability.rs:83:29
   1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/alloc/src/boxed.rs:2029:9
      std::panicking::rust_panic_with_hook
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:785:13
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:659:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/sys_common/backtrace.rs:171:18
   4: rust_begin_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:647:5
   5: core::panicking::panic_fmt
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panicking.rs:72:14
   6: core::result::unwrap_failed
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/result.rs:1649:5
   7: <core::result::Result<ash::vk::definitions::SwapchainKHR, ash::vk::enums::Result>>::unwrap
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/result.rs:1073:23
      <blade_graphics::hal::Context>::resize
             at /home/landonk/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/e82eec9/blade-graphics/src/vulkan/init.rs:839:13
   8: <gpui::platform::blade::blade_renderer::BladeRenderer>::new
             at crates/gpui/src/platform/blade/blade_renderer.rs:373:28
   9: <gpui::platform::linux::wayland::window::WaylandWindowState>::new
             at crates/gpui/src/platform/linux/wayland/window.rs:144:23
  10: <gpui::platform::linux::wayland::window::WaylandWindow>::new
             at crates/gpui/src/platform/linux/wayland/window.rs:233:41
  11: <gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::platform::LinuxClient>::open_window
             at crates/gpui/src/platform/linux/wayland/client.rs:380:36
  12: <gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::Platform>::open_window
             at crates/gpui/src/platform/linux/platform.rs:215:9
  13: <gpui::window::Window>::new
             at crates/gpui/src/window.rs:608:35
  14: <gpui::app::AppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#8}>::{closure#0}
             at crates/gpui/src/app.rs:498:30
  15: <gpui::app::AppContext>::update::<gpui::window::WindowHandle<workspace::Workspace>, <gpui::app::AppContext>::open_window<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#8}>::{closure#0}>
             at crates/gpui/src/app.rs:363:22
  16: <gpui::app::AppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#8}>
             at crates/gpui/src/app.rs:495:9
  17: <gpui::app::async_context::AsyncAppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#8}>
             at crates/gpui/src/app/async_context.rs:157:12
  18: <workspace::Workspace>::new_local::{closure#0}::{closure#0}
             at crates/workspace/src/workspace.rs:977:17
  19: <core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>> as core::future::future::Future>::poll
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/future/future.rs:124:9
  20: <<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>>> as core::future::future::Future>::poll
             at /home/landonk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:455:26
  21: <async_task::raw::RawTask<<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>>>, core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>, <gpui::executor::ForegroundExecutor>::spawn::inner<core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>::{closure#0}, ()>>::run
             at /home/landonk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:557:17
  22: <async_task::runnable::Runnable>::run
             at /home/landonk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:781:18
  23: <gpui::platform::linux::wayland::client::WaylandClient>::new::{closure#1}
             at crates/gpui/src/platform/linux/wayland/client.rs:285:17
  24: <core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::wayland::client::WaylandClient>::new::{closure#1}>> as calloop::sources::EventDispatcher<gpui::platform::linux::wayland::client::WaylandClientStatePtr>>::process_events::{closure#0}
             at /home/landonk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/mod.rs:327:61
  25: <calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events::<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::wayland::client::WaylandClient>::new::{closure#1}>> as calloop::sources::EventDispatcher<gpui::platform::linux::wayland::client::WaylandClientStatePtr>>::process_events::{closure#0}>::{closure#0}
             at /home/landonk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/channel.rs:187:32
  26: <calloop::sources::ping::eventfd::PingSource as calloop::sources::EventSource>::process_events::<<calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::wayland::client::WaylandClient>::new::{closure#1}>> as calloop::sources::EventDispatcher<gpui::platform::linux::wayland::client::WaylandClientStatePtr>>::process_events::{closure#0}>::{closure#0}>::{closure#0}
             at /home/landonk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/ping/eventfd.rs:138:21
  27: <calloop::sources::generic::Generic<calloop::sources::ping::eventfd::ArcAsFd> as calloop::sources::EventSource>::process_events::<<calloop::sources::ping::eventfd::PingSource as calloop::sources::EventSource>::process_events<<calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::wayland::client::WaylandClient>::new::{closure#1}>> as calloop::sources::EventDispatcher<gpui::platform::linux::wayland::client::WaylandClientStatePtr>>::process_events::{closure#0}>::{closure#0}>::{closure#0}>
             at /home/landonk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/generic.rs:290:9
  28: <calloop::sources::ping::eventfd::PingSource as calloop::sources::EventSource>::process_events::<<calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::wayland::client::WaylandClient>::new::{closure#1}>> as calloop::sources::EventDispatcher<gpui::platform::linux::wayland::client::WaylandClientStatePtr>>::process_events::{closure#0}>::{closure#0}>
             at /home/landonk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/ping/eventfd.rs:127:9
  29: <calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events::<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::wayland::client::WaylandClient>::new::{closure#1}>> as calloop::sources::EventDispatcher<gpui::platform::linux::wayland::client::WaylandClientStatePtr>>::process_events::{closure#0}>
             at /home/landonk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/channel.rs:184:9
  30: <core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::wayland::client::WaylandClient>::new::{closure#1}>> as calloop::sources::EventDispatcher<gpui::platform::linux::wayland::client::WaylandClientStatePtr>>::process_events
             at /home/landonk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/mod.rs:326:9
  31: <calloop::loop_logic::EventLoop<gpui::platform::linux::wayland::client::WaylandClientStatePtr>>::dispatch_events
             at /home/landonk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/loop_logic.rs:445:31
  32: <calloop::loop_logic::EventLoop<gpui::platform::linux::wayland::client::WaylandClientStatePtr>>::dispatch::<core::option::Option<core::time::Duration>>
             at /home/landonk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/loop_logic.rs:559:9
  33: <calloop::loop_logic::EventLoop<gpui::platform::linux::wayland::client::WaylandClientStatePtr>>::run::<<gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::platform::LinuxClient>::run::{closure#0}, core::option::Option<core::time::Duration>>
             at /home/landonk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/loop_logic.rs:596:13
  34: <gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::platform::LinuxClient>::run
             at crates/gpui/src/platform/linux/wayland/client.rs:428:9
  35: <gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::Platform>::run
             at crates/gpui/src/platform/linux/platform.rs:128:9
  36: <gpui::app::App>::run::<Zed::init_ui::{closure#3}>
             at crates/gpui/src/app.rs:142:9
  37: Zed::init_ui
             at crates/zed/src/main.rs:233:5
  38: Zed::main
             at crates/zed/src/main.rs:442:9
  39: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/ops/function.rs:250:5
  40: std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/sys_common/backtrace.rs:155:18
  41: std::rt::lang_start::<()>::{closure#0}
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/rt.rs:166:18
  42: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/ops/function.rs:284:13
      std::panicking::try::do_call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40
      std::panicking::try
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19
      std::panic::catch_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/rt.rs:148:48
      std::panicking::try::do_call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40
      std::panicking::try
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19
      std::panic::catch_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14
      std::rt::lang_start_internal
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/rt.rs:148:20
  43: std::rt::lang_start::<()>
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/rt.rs:165:17
  44: main
  45: <unknown>
  46: __libc_start_main
  47: _start
@Person-Who-Exists Person-Who-Exists added admin read Pending admin review bug [core label] panic / crash [core label] triage Maintainer needs to classify the issue labels May 2, 2024
@Person-Who-Exists Person-Who-Exists changed the title running cargo run compiles zed but errors out when running Zed Running Zed through cargo run or using a built release binary crashes immediately May 2, 2024
@MillhioreBT
Copy link

The same thing happens to me but with Windows 10, everything compiled correctly, but when I run Zed.exe it throws this same error and does not open the application

@JosephTLyons JosephTLyons added linux open source Open source community projects, contributions, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels May 3, 2024
@EliasBinder
Copy link

Hi,
I ran into the same issue. I'm not a rust developer but I did some research and found the following.

Since crucial functionality is not yet implemented for Linux and Windows (see here for Linux and here for Windows, the application cannot run in the first place. However, this logic is only invoked when the environment variable ZED_BUNDLE at compile time is set to true. (see here).

As a workaround for now you can compile ZED on your own from source (without that environment variable)

@christ-offer
Copy link

afaik you can just clone the repo and cd into the scripts then run ./install.sh (I just did, and it installed it fine on Linux, looks like some recent merges added the linux bit to the install script.

I did this and its now installed on system and i run it with zed-preview (working fine, with the occational hiccup)

@Person-Who-Exists
Copy link
Author

afaik you can just clone the repo and cd into the scripts then run ./install.sh (I just did, and it installed it fine on Linux, looks like some recent merges added the linux bit to the install script.

I did this and its now installed on system and i run it with zed-preview (working fine, with the occational hiccup)

I just tried to use the install script, although, the url that it tries to curl from doesn't exist, that url being https://zed.dev/api/releases/preview/latest/zed-linux-x86_64.tar.gz (I found this out by doing bash -x install.sh)

@Moshyfawn
Copy link
Member

This seems to be a duplicate of another issue that's being actively discussed. Be sure to +👍 and add any missing information to the other thread.

Duplicate of:

@Moshyfawn Moshyfawn closed this as not planned Won't fix, can't repro, duplicate, stale May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] linux open source Open source community projects, contributions, etc panic / crash [core label]
Projects
None yet
Development

No branches or pull requests

6 participants