Trying to find the cause of a segfault in egui
EDIT 2: Turns out the issue was specifically down to wgpu trying to use Dx12 which won't work for some reason. For anyone else having a similar issue, try following u/zettui 's suggestion of setting the WGPU_BACKEND environment variable to vulkan
EDIT: after some digging, it looks like wgpu might not be compatible with my machine, which might be the source of my problems, as it can run in some cases but not consistently.
I've been learning rust of a couple of months now, and have mainly done basic command-line toy programs, and wanted to try making a gui app with EGUI since it has support for a natively running GUI. I'm using the template that egui's lead developer provided (\github.com/emilk/eframe_template/tree/main) and can compile the included example, but attempting to run it causes a segmentation fault (this is using a up to date w11 machine)
So far I've tried:
- Completely reinstalling the rust toolchain
- Increasing the stack size to 8mb via RUST_MIN_STACK (windows default is apparently 1mb?)
- Attempting to build other egui applications from source that are known to work, which gets the same error
I'm kind of at a loss for what to do, as I've tried using iced as well with similar issues, so as far as I can tell it's something that I've done, and not an issue with the libraries. If anyone else has had to solve issues like this, I'd really appreciate some advice
12 points · 14 comments
Mentions
Trying to find the cause of a segfault in egui EDIT 2: Turns out the issue was specifically down to wgpu trying to use Dx12 which won't work for some reason. For anyone else having a similar issue, try following u/zettui 's suggestion of setting the WGPU_BACKEND environment variable to vulkan EDIT: after some digging, it looks like wgpu might not be compatible with my machine, which might be the source of my problems, as it can run in some cases but not consistently. I've been learning rust of a couple of months now, and have mainly done basic command-line toy programs, and wanted to try making a gui app with EGUI since it has support for a natively running GUI. I'm using the template that egui's lead developer provided (\github.com/emilk/eframe_template/tree/main) and can compile the included example, but attempting to run it causes a segmentation fault (this is using a up to date w11 machine) So far I've tried: - Completely reinstalling the rust toolchain - Increasing the stack size to 8mb via RUST_MIN_STACK (windows default is apparently 1mb?) - Attempting to build other egui applications from source that are known to work, which gets the same error I'm kind of at a loss for what to do, as I've tried using iced as well with similar issues, so as far as I can tell it's something that I've done, and not an issue with the libraries. If anyone else has had to solve issues like this, I'd really appreciate some advice