Open someone13574 opened 2 months ago
Zed works fine when disabling transparency: https://github.com/zed-industries/zed/issues/13734#issuecomment-2211341786
Interesting, so these attributes are incorrect
attributes.push(egl::TRANSPARENT_TYPE);
attributes.push(egl::TRANSPARENT_RGB);
Just tried building Zed with the changes in #145 and it still crashes with the same error. Can this be reopened?
libEGL warning: DRI3: Screen seems not DRI3 capable
libEGL warning: DRI2: failed to authenticate
libEGL warning: DRI3: Screen seems not DRI3 capable
Thread "main" panicked with "called `Result::unwrap()` on an `Err` value: BadAlloc" at /home/owen/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/d4b395e/blade-graphics/src/gles/egl.rs:449:18
0: zed::reliability::init_panic_hook::{{closure}}
at crates/zed/src/reliability.rs:58:29
1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2036:9
std::panicking::rust_panic_with_hook
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:799:13
2: std::panicking::begin_panic_handler::{{closure}}
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:664:13
3: std::sys_common::backtrace::__rust_end_short_backtrace
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:171:18
4: rust_begin_unwind
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:652:5
5: core::panicking::panic_fmt
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:72:14
6: core::result::unwrap_failed
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/result.rs:1654:5
7: core::result::Result<T,E>::unwrap
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/result.rs:1077:23
blade_graphics::hal::platform::Context::resize
at /home/owen/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/d4b395e/blade-graphics/src/gles/egl.rs:443:17
8: gpui::platform::blade::blade_renderer::BladeRenderer::update_drawable_size
at crates/gpui/src/platform/blade/blade_renderer.rs:430:13
9: gpui::platform::linux::x11::window::X11WindowStatePtr::configure
at crates/gpui/src/platform/linux/x11/window.rs:913:17
10: gpui::platform::linux::x11::client::X11Client::handle_event
at crates/gpui/src/platform/linux/x11/client.rs:544:17
11: gpui::platform::linux::x11::client::X11Client::process_x11_events
at crates/gpui/src/platform/linux/x11/client.rs:506:17
12: <gpui::platform::linux::x11::client::X11Client as gpui::platform::linux::platform::LinuxClient>::run
at crates/gpui/src/platform/linux/x11/client.rs:1231:17
13: gpui::platform::linux::platform::<impl gpui::platform::Platform for P>::run
at crates/gpui/src/platform/linux/platform.rs:153:9
14: gpui::app::App::run
at crates/gpui/src/app.rs:140:9
15: zed::main
at crates/zed/src/main.rs:382:5
16: core::ops::function::FnOnce::call_once
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/function.rs:250:5
17: std::sys_common::backtrace::__rust_begin_short_backtrace
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:155:18
18: std::rt::lang_start::{{closure}}
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/rt.rs:159:18
19: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/function.rs:284:13
std::panicking::try::do_call
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:559:40
std::panicking::try
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:523:19
std::panic::catch_unwind
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panic.rs:149:14
std::rt::lang_start_internal::{{closure}}
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/rt.rs:141:48
std::panicking::try::do_call
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:559:40
std::panicking::try
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:523:19
std::panic::catch_unwind
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panic.rs:149:14
std::rt::lang_start_internal
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/rt.rs:141:20
20: std::rt::lang_start
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/rt.rs:158:17
21: main
22: __libc_start_call_main
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
23: __libc_start_main_impl
at ./csu/../csu/libc-start.c:360:3
24: _start
at /builddir/glibc-2.39/csu/../sysdeps/x86_64/start.S:115
If you can build, it would help if you could narrow it down a bit by playing with this section
let mut attributes = vec![
egl::RENDER_BUFFER,
// We don't want any of the buffering done by the driver, because we
// manage a swapchain on our side.
// Some drivers just fail on surface creation seeing `EGL_SINGLE_BUFFER`.
if cfg!(any(target_os = "android", target_os = "macos", windows)) {
egl::BACK_BUFFER
} else {
egl::SINGLE_BUFFER
},
];
//TODO: detect if linear color space is supported
match inner.egl.srgb_kind {
SrgbFrameBufferKind::None => {}
SrgbFrameBufferKind::Core | SrgbFrameBufferKind::Khr => {
attributes.push(egl::GL_COLORSPACE);
attributes.push(egl::GL_COLORSPACE_SRGB);
}
}
The GLES backend for Zed is crashing for me under both X11 and Wayland. This has been occuring since at least https://github.com/zed-industries/zed/pull/13114 but has probably been present for much longer. This occurs whenever you resize the window (if doing the hello_world example, which has been there the whole time) or at startup if running Zed (though I don't think this has always been the case).
This is what gets printed out:
And on wayland I get this:
My DE is gnome.