-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Closing a window crashes other Zed windows #17005
Comments
Same here. Bisected it to d1dceef. These are the logs I get with KWin:
Interestingly, it only happens on Wayland and not on X11. |
Enabling Vulkan validation in the source code (which should be on by default in debug builds IMO) shows many errors like the following (both on Wayland and X11):
It seems like object destruction is being done incorrectly. |
Applying the following on diff --git a/blade-graphics/src/vulkan/init.rs b/blade-graphics/src/vulkan/init.rs
index 3b4ac73..07625df 100644
--- a/blade-graphics/src/vulkan/init.rs
+++ b/blade-graphics/src/vulkan/init.rs
@@ -1034,8 +1034,6 @@ impl Drop for super::Context {
surface_instance.destroy_surface(surface.raw, None);
}
}
- self.device.core.destroy_device(None);
- self.instance.core.destroy_instance(None);
if let Ok(queue) = self.queue.lock() {
self.device
.core
@@ -1044,6 +1042,8 @@ impl Drop for super::Context {
.core
.destroy_semaphore(queue.present_semaphore, None);
}
+ self.device.core.destroy_device(None);
+ self.instance.core.destroy_instance(None);
}
}
} There are still lots of Vulkan validation errors though. |
Happening for me too(returns SIGABRT)
|
cc: @ConradIrwin, since you're the last one to update Blade 🙂 The crash is now fixed in upstream Blade, but this bug affects Should I open a PR for the |
@apricotbucket28 We should probably merge the two. I'd like #17022 to hit preview tomorrow (we haven't heard complaints from anyone on main). |
I've opened #17319 for the |
Closes #17005 Like #17319, but based on kvark/blade#144. This should be cherry-picked into preview if possible 🙂 Release Notes: - Linux: Fixed crash when closing windows on Wayland.
This is still happening. Unfortunately I don't see any new errors in the logs. Please re-open issue. |
Same thing happens on my end (NixOS, Hyprland WM, latest nvidia driver), reopening. Repro Steps:
|
Same thing here. Arch linux, KDE plasma (wayland), latest nvidia driver. Makes it really tough to swap folders! |
Same here, but when i see others using nvidia. I think that a problem, because im use nvidia rtx 4060. So this is step to make all window closed:
|
Also experiencing this (on current main I get a segfault. Using gdb to capture the segfault backtrace reveals this:
I'll note that, before I run |
Anything in the logs? |
Not sure if this is what you're asking, but Zed runs one process that has multiple windows: one per project that you open. |
That makes sense, thanks! I'll see if I can repro this by creating different contexts within the same process. |
Also having this issue -- has a cause been identified and a solution proposed? Happy to provide info if helpful. |
Is this strictly an NVIDIA thing? The system I reported the issue on has an NVIDIA GPU. My other laptop that has an older AMD APU doesn't seem to exhibit the same crashing behavior. |
Yes, I have an NVIDIA GPU, so that might be the cause. |
If anyone can check out #20853 and confirm if it fixes it, that would be great! |
Yes! Your branch on my system lets me open and close new windows as much as I want without Zed crashing. Thanks for your work on this! |
#20853 Fixes the issue for me. I'm on Arch Linux with an Nvidia GPU. |
Check for existing issues
Describe the bug / provide steps to reproduce it
zed .
.zed .
.Environment
Zed: v0.151.0 (Zed Nightly 22a791d)
OS: Linux Wayland fedora 40
Memory: 30.6 GiB
Architecture: x86_64
GPU: NVIDIA RTX A3000 Laptop GPU || NVIDIA || 555.58.02
If applicable, add mockups / screenshots to help explain present your vision of the feature
Screencast.from.2024-08-28.08-00-32.mp4
If applicable, attach your Zed.log file to this issue.
Zed.log
The text was updated successfully, but these errors were encountered: