dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

SIGSEGV on WSL 2

Open ClementNerma opened this issue 1 year ago • 3 comments

Problem

When compiling a basic example on WSL 2, the program crashes without displaying anything.

When running it with strace, the process crashes with SIGSEGV (so a segmentation fault).

I don't really know how to fix that, I could give you a complete strace log if that's useful?

Note that cargo build works fine. It's only running that fails.

Steps To Reproduce

  1. Create a new project
  2. Add dioxus with the desktop feature
  3. Use the following src/main.rs file:
use dioxus::prelude::*;

fn main() {
    dioxus::launch(|| rsx! { "hello dioxus! ­ƒº¼" });
}
  1. cargo run
  2. Enjoy the crash

Environment:

  • Dioxus version: 0.6.0
  • Rust version: 1.82.0
  • OS info: Windows 11 24H2, WSL 2.3.26.0 with Ubuntu 24.10, kernel 5.15.167.4-1, WSLg 1.0.65
  • App platform: desktop

ClementNerma avatar Dec 13 '24 21:12 ClementNerma

Running desktop in WSL has been tricky. Did you take a look at https://dioxuslabs.com/learn/0.6/getting_started/#wsl?

DogeDark avatar Dec 13 '24 23:12 DogeDark

Yeah I have the required dependencies installed, the DISPLAY env variable set to :0, the latest WSL version + Linux kernel (at least the one available in Ubuntu 24.10).

Still doesn't work. What surprises me is not the fact it's not launching (there could be tons of incompatibility issues in terms of libraries interop and dependencies) but the fact that it crashes silently with a segmentation fault.

ClementNerma avatar Dec 13 '24 23:12 ClementNerma

Hi I running into the same issue not sure if related due to me running on arch on bare metal

The desktop application fails to run not build i get the error on run under niri wayland desktop enviroment. but under gnome wayland it works fine.

Application [linux] exited with error: signal: 11 (SIGSEGV) (core dumped)
  • dioxus version: 0.6.0
  • rust version: 1.83.0
  • os: archlinux on not under wsl ect
  • desktop enviroment: niri
  • platform: desktop linux

Notliam99 avatar Dec 14 '24 11:12 Notliam99