Kl4rry / simp

🖼️ Simp is a fast and simple GPU-accelerated image manipulation program.
Apache License 2.0
307 stars 14 forks source link

3.5.1 fails to launch on NetBSD #28

Closed 0323pin closed 9 months ago

0323pin commented 9 months ago

Just updated simp to 3.5.1, launching it causes a panic

xkbcommon: ERROR: couldn't find a Compose file for locale "en_US.UTF-8" (mapped to "en_US.UTF-8")
PanicInfo { payload: Any { .. }, message: Some(called `Option::unwrap()` on a `None` value), location: Location { file: "/usr/pkgsrc/wip/simp/work/vendor/wgpu-core-0.19.0/src/instance.rs", line: 521, col: 39 }, can_unwind: true, force_no_backtrace: false }
Exception: simp exited with 1
Kl4rry commented 9 months ago

Could you run it with RUST_BACKTRACE=1?

0323pin commented 9 months ago

Could you run it with RUST_BACKTRACE=1?

Yes, I can try this but, I won't have time before tomorrow been fighting other bugs elsewhere :)

Wonder if this would fix it.

Kl4rry commented 9 months ago

It might, as I am pretty sure its an upstream wgpu bug.

0323pin commented 9 months ago

It might, as I am pretty sure its an upstream wgpu bug.

Me to, it worked just fine with version 0.18.1. I should probably report it with them.

0323pin commented 9 months ago

@Kl4rry I've applied a patch to cover the changes brought by https://github.com/gfx-rs/wgpu/commit/45957088ade7b909eb35f57cd254eb1f6c6e2b7f

Now, I get a different panic, as follows:

PanicInfo { payload: Any { .. }, message: Some(called `Result::unwrap()` on an `Err` value: CreateSurfaceError { inner: Hal(NoSupportedBackend) }), location: Location { file: "src/main.rs", line: 100, col: 63 }, can_unwind: true, force_no_backtrace: false }

RUST_BACKTRACE=1 gives only,

Deprecation: the legacy temporary assignment syntax is deprecated; use "tmp" instead
  [tty 8]:1:1-16: RUST_BACKTRACE=1 simp
xkbcommon: ERROR: couldn't find a Compose file for locale "en_US.UTF-8" (mapped to "en_US.UTF-8")
PanicInfo { payload: Any { .. }, message: Some(called `Result::unwrap()` on an `Err` value: CreateSurfaceError { inner: Hal(NoSupportedBackend) }), location: Location { file: "src/main.rs", line: 100, col: 63 }, can_unwind: true, force_no_backtrace: false }
Exception: simp exited with 1
Kl4rry commented 9 months ago

You could try setting WGPU_BACKEND=gl.

0323pin commented 9 months ago

WGPU_BACKEND=gl

This works but, it's a bit annoying.

Some more info, I run quite a few programs built from development branches, so I've asked a fellow dev to test the 3.5.0 release on a default set-up. Yes, 3.5.0 it's still what we have internally, as I haven't pushed 3.5.1, yet. He reported the following, already on the previous release:

PanicInfo { payload: Any { .. }, message: Some(called `Option::unwrap()` on a `None` value), location: Location { file: "src/main.rs", line: 106, col: 14 }, can_unwind: true, force_no_backtrace: false }

The bug must have been introduced after the last test I did on https://github.com/Kl4rry/simp/pull/27 IIRC, that was commit https://github.com/Kl4rry/simp/commit/18b7458ac69844b633279e8aaff1ca42c94dee1e

So, after that and before 3.5.0 release.

0323pin commented 9 months ago

If I was to guess, I'd bet on this one, https://github.com/Kl4rry/simp/commit/6da7b61e5734288d41f73959d79ac41a18a8410e

Kl4rry commented 9 months ago

73500bc954dd8f740df701751a33d7d866f30970 should atleast fix having to use WGPU_BACKEND=gl

0323pin commented 9 months ago

73500bc should atleast fix having to use WGPU_BACKEND=gl

Thanks! I'll do a build from it and report back. It might not be today, though. After all, it's my birthday 😉

0323pin commented 9 months ago

Got sometime to test this. It works flawlessly. I've push the fix to our package. Thank you!