-
Notifications
You must be signed in to change notification settings - Fork 124
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
Apparent misuse of scoped-tls, only appearing on a Raspberry Pi #728
Comments
Interesting that this only happens with the Raspberry Pi. I guess it's using a proprietary graphics driver rather than the open source Mesa driver? (Since the graphics driver makes some Wayland calls of its own, and with Mesa that code should be the same as on x86 desktops.) |
As far as I can tell, the Raspi is using Mesa, the precise driver seems to be called VideoCore 6, from what I could gather from the internet. Also there is quite some mesa packages installed by default:
|
It's odd that the same code would work on everything except the Raspberry Pi, then. Since nothing should really be different. |
The output is quite large, so I'll attach it as a text file. I don't know how video drivers are structured, but it seems VideoCore is something Raspberry Pi specific, that is somehow part of Mesa, so I'd assume there is actually code that is only executed on the raspi. |
Yep, it's the V3DV Mesa driver.
Yeah. But the code that makes Wayland calls is shared for all Vulkan implementations in Mesa (https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/vulkan/wsi/wsi_common_wayland.c). So it's not obvious what would be different that could change the behavior of wayland-rs. |
Could you provide the output of running the app until crash with the env variable |
Sure: wayland_errors.txt |
There are two very puzzling things in that log that maybe you can clarify regarding your app:
|
This is absolutely not expected. The app basically doesn't execute any code I've written before the crash, this is all just startup code. I just created an empty iced app skeleton, that does about nothing. Here is the source: use iced::{executor, widget::Text, Application, Command, Element, Settings, Theme};
#[derive(Debug)]
struct Gui;
#[derive(Debug, Clone)]
pub enum Message {
Foo,
}
impl Application for Gui {
type Executor = executor::Default;
type Flags = ();
type Message = Message;
type Theme = Theme;
fn new((): ()) -> (Gui, Command<Self::Message>) {
(Gui, Command::none())
}
fn title(&self) -> String {
String::from("Foo")
}
fn update(&mut self, message: Self::Message) -> Command<Self::Message> {
Command::none()
}
fn view(&self) -> Element<Self::Message> {
Text::new("hi").into()
}
}
fn main() {
Gui::run(Settings::with_flags(())).unwrap();
} I just ran that on the pi, with the same result. The wayland log differs slightly: we2.txt the only dependency you need to add to compile it, is iced itself. As a side node: I cross compile it from an amd64 host in a docker container that runs debian bookworm. The crosscompiler is gcc-arm-linux-gnueabihf |
If you run e.g. alacritty or winit example does it work? |
Both work, but this problem is vulkan specific, and Alacritty uses OpenGL. And the winit example also does not use vulkan as far as I can tell. |
What about the examples for wgpu? Is it |
Yes, I think the compositor is wayfire. I'm sorry, but I'm traveling now for 1-2 weeks. I might be able to get my fingers onto a Pi in that time, but I doubt it. I'll try everything that will comes up here in the meantime when I'm back. I still will answer questions that I don't need a pi for though. |
Hey, I'm back. The basic WGPU example worked. I ran it via Just in case it's useful, here is the wayland debug log: |
I wonder if zink works with e.g. alacritty/glutin's window example or crashes the same way. |
I was able to reproduce this issue on a newly flashed Rpi CM4
It it definitely timing dependent. Like on the other platform I observed this, it seems to only happen when the compositor sends an event before/during the driver dispatches its initialization logic. |
#738 fixes the issue on the Rpi CM4 @KnorrFG can you verify that it also fixes the issue you observed? Patching wayland-backend in the Cargo.toml should work (at least for the minimal example you provided it does)
|
Hey, |
#738 is released now, so hopefully this sort of thing won't be happening now. |
Hi, I'm trying to run a GUI application (using Iced) on a Raspberry Pi 4B with the latest RPI Os. I didn't modify it yet.
The program crashes before any gui is created, with the following backtrace:
The crash originates in scoped-tls, but it seems more like a bug in
wayland_backend
.I will append a text file with all logging output. The same program runs perfectly fine on my desktop btw.
errors.txt
The text was updated successfully, but these errors were encountered: