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
39.31k stars 2.04k forks source link

[Windows] Zed not running in debug and release both builds #9251

Open shivaay108 opened 3 months ago

shivaay108 commented 3 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Came up with the error when launched the zed /target/debug binary :

expand for log
D:\zed>cargo run     
warning: unused variable: `path`
   --> crates\fs\src/fs.rs:119:36
    |
119 |     async fn create_symlink(&self, path: &Path, target: PathBuf) -> Result<()> {
    |                                    ^^^^ help: if this is intentional, prefix it with an underscore: `_path`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `target`
   --> crates\fs\src/fs.rs:119:49
    |
119 |     async fn create_symlink(&self, path: &Path, target: PathBuf) -> Result<()> {
    |                                                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_target`

warning: `fs` (lib) generated 2 warnings (run `cargo fix --lib -p fs` to apply 2 suggestions)
    Finished dev [unoptimized + debuginfo] target(s) in 4.31s
     Running `target\debug\Zed.exe`
[2024-03-13T05:04:12+05:30 ERROR util] crates\settings\src\settings_file.rs:76: EOF while parsing a value at line 1 column 0
[2024-03-13T05:04:14+05:30 ERROR util] crates\zed\src/zed.rs:620: EOF while parsing a value at line 1 column 0
[2024-03-13T05:04:14+05:30 ERROR util] crates\zed\src/main.rs:692: The system cannot find the path specified. (os error 3)
Thread "main" panicked with "called `Result::unwrap()` on an `Err` value: NotSupportedError" at crates\gpui\src\platform\windows\window.rs:143:14
   0: backtrace::backtrace::dbghelp::trace
             at C:\Users\sharm\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.69\src\backtrace\dbghelp.rs:98
   1: backtrace::backtrace::trace_unsynchronized
             at C:\Users\sharm\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.69\src\backtrace\mod.rs:66
   2: backtrace::backtrace::trace
             at C:\Users\sharm\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.69\src\backtrace\mod.rs:53
   3: backtrace::capture::Backtrace::create
             at C:\Users\sharm\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.69\src\capture.rs:176
   4: backtrace::capture::Backtrace::new
             at C:\Users\sharm\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.69\src\capture.rs:140
   5: Zed::init_panic_hook::closure$0
             at crates\zed\src\main.rs:596
   6: alloc::boxed::impl$49::call
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\alloc\src\boxed.rs:2029
   7: std::panicking::rust_panic_with_hook
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:783
   8: std::panicking::begin_panic_handler::closure$0
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:657
   9: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\sys_common\backtrace.rs:171
  10: std::panicking::begin_panic_handler
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:645
  11: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\panicking.rs:72
  12: core::result::unwrap_failed
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\result.rs:1649
  13: core::result::Result::unwrap
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\core\src\result.rs:1073
  14: gpui::platform::windows::window::WindowsWindowInner::new
             at crates\gpui\src\platform\windows\window.rs:133
  15: gpui::platform::windows::window::wnd_proc
             at crates\gpui\src\platform\windows\window.rs:1086
  16: DispatchMessageW
  17: DispatchMessageW
  18: CallNextHookEx
  19: KiUserCallbackDispatcher
  20: NtUserCreateWindowEx
  21: CreateWindowExW
  22: CreateWindowExW
  23: CreateWindowExW
  24: windows::Win32::UI::WindowsAndMessaging::CreateWindowExW,windows::Win32::Foundation::HWND,windows::Win32::UI::WindowsAndMessaging::HMENU,windows::Win32::Foundation::HINSTA
             at C:\Users\sharm\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows-0.53.0\src\Windows\Win32\UI\WindowsAndMessaging\mod.rs:540
  25: gpui::platform::windows::window::WindowsWindow::new
             at crates\gpui\src\platform\windows\window.rs:654
  26: gpui::platform::windows::platform::impl$3::open_window
             at crates\gpui\src\platform\windows\platform.rs:340
  27: gpui::window::Window::new
             at crates\gpui\src\window.rs:324
  28: gpui::app::impl$4::open_window::closure$0
             at crates\gpui\src\app.rs:489
  29: gpui::app::AppContext::update,gpui::app::impl$4::open_window::closure_env$0 >
             at crates\gpui\src\app.rs:354
  30: gpui::app::AppContext::open_window
             at crates\gpui\src\app.rs:486
  31: gpui::app::async_context::AsyncAppContext::open_window
             at crates\gpui\src\app\async_context.rs:133
  32: workspace::impl$10::new_local::closure$0::async_block$0
             at crates\workspace\src\workspace.rs:872
  33: core::future::future::impl$1::poll,alloc::vec::Vec,alloc::vec::Vec,alloc::ve
             at C:\Users\sharm\.cargo\registry\src\index.crates.io-6f17d22bba15001f\async-task-4.7.0\src\raw.rs:557
  36: async_task::runnable::Runnable::run >
             at C:\Users\sharm\.cargo\registry\src\index.crates.io-6f17d22bba15001f\async-task-4.7.0\src\runnable.rs:781
  37: gpui::platform::windows::platform::WindowsPlatform::run_foreground_tasks
             at crates\gpui\src\platform\windows\platform.rs:211
  38: gpui::platform::windows::platform::impl$3::run
             at crates\gpui\src\platform\windows\platform.rs:282
  39: gpui::app::App::run
             at crates\gpui\src\app.rs:142
  40: Zed::main
             at crates\zed\src\main.rs:119
  41: core::ops::function::FnOnce::call_once >
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\core\src\ops\function.rs:250
  42: std::sys_common::backtrace::__rust_begin_short_backtrace >
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\std\src\sys_common\backtrace.rs:155
  43: std::sys_common::backtrace::__rust_begin_short_backtrace >
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\std\src\sys_common\backtrace.rs:155
  44: std::rt::lang_start::closure$0 >
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\std\src\rt.rs:166
  45: std::rt::lang_start_internal::closure$2
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\rt.rs:148
  46: std::panicking::try::do_call
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:552
  47: std::panicking::try
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:516
  48: std::panic::catch_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panic.rs:142
  49: std::rt::lang_start_internal
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\rt.rs:148
  50: std::rt::lang_start >
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\std\src\rt.rs:165
  51: main
  52: invoke_main
             at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  53: __scrt_common_main_seh
             at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  54: BaseThreadInitThunk
  55: RtlUserThreadStart

error: process didn't exit successfully: `target\debug\Zed.exe` (exit code: 0xffffffff)

Environment

Processor AMD Ryzen 5 5600U with Radeon Graphics 2.30 GHz Installed RAM 16.0 GB (15.3 GB usable) System type 64-bit operating system, x64-based processor Pen and touch No pen or touch input is available for this display

If applicable, add mockups / screenshots to help explain present your vision of the feature

image image image

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

No response

kazatsuyu commented 3 months ago

NotSupportedError means "your graphics system is not supported". You could probably get more information with RUST_LOG=blade=debug environment variable. However, it may be difficult to solve this issue quickly.

ASlava12 commented 2 months ago

I have a similar problem zed.error.txt zed.error.vulkaninfo.txt dmidecode.txt dkpg.txt

graphic card: radeon rx590, install official driver

WAYLAND_DISPLAY='' cargo run
cargo run
slava@slava-tower:~/zed$ RUST_LOG=blade_graphics=debug cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.38s
     Running `target/debug/Zed`
[2024-04-05T18:52:23+03:00 DEBUG blade_graphics::hal::init] Bugs SystemBugs {
    intel_unable_to_present: false,
}
[2024-04-05T18:52:23+03:00 WARN  blade_graphics::hal::init] Rejected for device extension "VK_EXT_inline_uniform_block" not supported
[2024-04-05T18:52:23+03:00 WARN  blade_graphics::hal::init] Rejected for device extension "VK_KHR_dynamic_rendering" not supported
[2024-04-05T18:52:23+03:00 WARN  blade_graphics::hal::init] Rejected for device extension "VK_KHR_timeline_semaphore" not supported
Thread "main" panicked with "called `Result::unwrap()` on an `Err` value: NotSupportedError" at crates/gpui/src/platform/linux/x11/window.rs:234:14

....

All text in file

kazatsuyu commented 2 months ago

https://www.amd.com/ja/support/kb/release-notes/rn-rad-win-vulkan Radeon graphics driver supports Vulkan extentions used by blade. If your driver is older than supported version, you need to update it.

kazatsuyu commented 2 months ago

We should add troubleshooting for this. https://github.com/zed-industries/zed/blob/3aa242e0766813e2cfb8cb84d6ca73606c8a5d49/docs/src/developing_zed__building_zed_windows.md

tbrockman commented 2 months ago

Ran into this issue with out-of-date GeForce GTX 1070 drivers, updating solved the issue and led to a functional Windows build! 🎉