space-menace
space-menace copied to clipboard
Cannot run on Fedora 30 Wayland
Hey team! I am super interested in trying space-menace but I can't get the dang thing to run! It compiles just fine for me, but won't run. :disappointed: Let me know if I'm doing something wrong or if I found a real bug we can fix.
The error
$ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.19s
Running `target/debug/space-menace`
[INFO][amethyst::app] Initializing Amethyst...
[INFO][amethyst::app] Version: 0.12.0
[INFO][amethyst::app] Platform: x86_64-unknown-linux-gnu
[INFO][amethyst::app] Amethyst git commit: c72063f13f90bae4ae96b6c96e04a2206493bbf3
[INFO][amethyst::app] Rustc version: 1.39.0-nightly Nightly
[INFO][amethyst::app] Rustc git commit: 72b2abfd65ba024e12d7fe51852a309419f494d8
[WARN][gfx_backend_vulkan] Unable to find layer: VK_LAYER_LUNARG_standard_validation
[WARN][rendy_factory::factory] Slow safety checks are enabled! Disable them in production by enabling the 'no-slow-safety-checks' feature!
[INFO][rendy_util::wrap] Slow safety checks are enabled! You can disable them in production by enabling the 'no-slow-safety-checks' feature!
[INFO][gfx_backend_vulkan]
GENERAL [Loader Message (0)] : Device Extension: VK_KHR_8bit_storage (/usr/lib64/libvulkan_intel.so) version 0.0.1
object info: (type: INSTANCE, hndl: 94501314526768)
[INFO][gfx_backend_vulkan]
GENERAL [Loader Message (0)] : Device Extension: VK_KHR_16bit_storage (/usr/lib64/libvulkan_intel.so) version 0.0.1
object info: (type: INSTANCE, hndl: 94501314526768)
[ ... snip ... ]
[INFO][gfx_backend_vulkan]
GENERAL [Loader Message (0)] : Device Extension: VK_GOOGLE_hlsl_functionality1 (/usr/lib64/libvulkan_intel.so) version 0.0.1
object info: (type: INSTANCE, hndl: 94501314526768)
[INFO][gfx_backend_vulkan]
GENERAL [Loader Message (0)] : Device Extension: VK_NV_compute_shader_derivatives (/usr/lib64/libvulkan_intel.so) version 0.0.1
object info: (type: INSTANCE, hndl: 94501314526768)
WARN][rendy_wsi] Image count not supported. Supported: 4..4294967295, requested: 3
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ErrorMessage { msg: "Image count not supported." }', src/libcore/result.rs:1084:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[ERROR][rendy_resource::escape] Terminal must be dropped after all `Escape`s
[ERROR][rendy_resource::escape] Terminal must be dropped after all `Escape`s
[ERROR][rendy_resource::escape] Terminal must be dropped after all `Escape`s
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(139264) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(12288) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(65536) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(524288) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(4194304) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(155648) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(1048576) is still used
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
Segmentation fault (core dumped)
Host info
$ rustc --version
rustc 1.39.0-nightly (72b2abfd6 2019-08-29)
$ cargo --version
cargo 1.39.0-nightly (22f7dd049 2019-08-27)
$ uname -s -r -v -m -p -i -o
Linux 5.2.9-200.fc30.x86_64 #1 SMP Fri Aug 16 21:37:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
I am running Wayland on Fedora 30.
Misc debugging info
It looks like you are running it in debug mode. Try compiling and running it with optimizations enabled:
cargo run --release
@clemarescx :confused:
$ cargo run --release
Finished release [optimized] target(s) in 0.20s
Running `target/release/space-menace`
[INFO][amethyst::app] Initializing Amethyst...
[INFO][amethyst::app] Version: 0.12.0
[INFO][amethyst::app] Platform: x86_64-unknown-linux-gnu
[INFO][amethyst::app] Amethyst git commit: c72063f13f90bae4ae96b6c96e04a2206493bbf3
[INFO][amethyst::app] Rustc version: 1.39.0-nightly Nightly
[INFO][amethyst::app] Rustc git commit: 72b2abfd65ba024e12d7fe51852a309419f494d8
[WARN][rendy_factory::factory] Slow safety checks are enabled! Disable them in production by enabling the 'no-slow-safety-checks' feature!
[INFO][rendy_util::wrap] Slow safety checks are enabled! You can disable them in production by enabling the 'no-slow-safety-checks' feature!
[WARN][rendy_wsi] Image count not supported. Supported: 4..4294967295, requested: 3
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ErrorMessage { msg: "Image count not supported." }', src/libcore/result.rs:1084:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
Segmentation fault (core dumped)
Likely resolved by https://github.com/amethyst/rendy/issues/182
@azriel91 Any way I can verify that before closing the issue? I'm not sure how to trick Cargo into using the master
version of rendy
. :thinking: :confused:
yeap, add this to Cargo.toml
:
[patch.crates-io]
rendy = { git = "https://github.com/amethyst/rendy.git" }
Hmm. Cargo ignores that patch
when I add it to Cargo.toml
. I haven't dug into how to properly patch dependencies. I might dig deeper and let you know what I find.
diff --git a/Cargo.toml b/Cargo.toml
index 03cb355..4971505 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,9 @@ log = "*"
specs-derive = "*"
[features]
-default = ["metal"]
+default = ["vulkan"]
metal = ["amethyst/metal"]
vulkan = ["amethyst/vulkan"]
+[patch.crates-io]
+rendy = { git = "https://github.com/amethyst/rendy.git" }
diff --git a/Cargo.lock b/Cargo.lock
index f8ab91a..af637e4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
[... snip ...]
@ -4334,10 +4319,15 @@ name = "xml-rs"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
+[[patch.unused]]
+name = "rendy"
+version = "0.4.0"
+source = "git+https://github.com/amethyst/rendy.git#1980054d9efa3355eaa76163990e7127fb169295"
+
[... snip ...]
I've recreated the problem on Debian Buster with Wayland.
When adding this to Cargo.toml
:
[patch.crates-io]
rendy = { git = "https://github.com/amethyst/rendy.git" }
I get the following message:
warning: Patch `rendy v0.4.0 (https://github.com/amethyst/rendy.git#a8ac0de9)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
I believe Amethyst must be updated to use a newer version of rendy
before this will work. If you just want to see it working locally, you could try to apply commit https://github.com/amethyst/rendy/commit/08df51d0a6779601c8f8c37a35c0a181bd00b55f to https://github.com/amethyst/rendy/commit/b3904b6ce4bbedafd67c2709e1483dace25d0191 and patch that into Cargo.toml
(untested).
If it will be a while before Amethyst can use rendy v0.4.0
, perhaps a backported fix can be released as v0.3.3
?
Any word on this? Think we could get a backport or could we merge Amethyst libraries to using rendy >= 0.4.0
? I can't run any of the Amethyst showcase projects or the 2D project template.
@pop I don't have much knowledge on this. @azriel91 or some other member from the core Amethyst team may have some information.
The master
branch of amethyst has got rendy
0.4.1 (amethyst_rendy/Cargo.toml), so the patch should hopefully work if you cargo update
as well (seeing that space-menace
master
depends on amethyst
master
).
Repasting here for convenience:
[patch.crates-io]
rendy = { git = "https://github.com/amethyst/rendy.git" }
The fix seems to not be included in 0.4.1 See https://github.com/amethyst/rendy/blob/v0.4.1/graph/src/node/render/pass.rs#L443
https://github.com/amethyst/rendy/commit/561847a26f7512410590428bae6318004c81dc26 seems to fix the problem. Maybe we can release rendy v0.4.2
To test a hypothetical 0.4.2
release of rendy, you can use the following patches to the current master branch of amethyst:
diff --git a/Cargo.toml b/Cargo.toml
index a3cdf092..179e0994 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -350,3 +350,5 @@ required-features = [ "tiles" ]
[package.metadata.docs.rs]
features = ["animation", "audio", "gltf", "tiles", "json", "locale", "network", "sdl_controller", "vulkan"]
+[patch.crates-io]
+rendy = { git = "https://github.com/mxgrey/rendy", branch = "test_0.4.2" }
diff --git a/amethyst_rendy/Cargo.toml b/amethyst_rendy/Cargo.toml
index f227b694..1b7e77e0 100644
--- a/amethyst_rendy/Cargo.toml
+++ b/amethyst_rendy/Cargo.toml
@@ -25,7 +25,7 @@ glsl-layout = "0.3"
lazy_static = "1.3"
log = "0.4"
palette = { version = "0.4", features = ["serde"] }
-rendy = { version = "0.4.1", default-features = false, features = ["base", "mesh-obj", "texture-image", "texture-palette", "serde-1"] }
+rendy = { version = "0.4.2", default-features = false, features = ["base", "mesh-obj", "texture-image", "texture-palette", "serde-1"] }
ron = "0.5"
serde = { version = "1", features = ["serde_derive"] }
fnv = "1"
This uses a fork I've made of rendy
where only the pertinent fix was added to v0.4.1
.
Exporting the environment variable WINIT_UNIX_BACKEND=x11
seems to also be a valid workaround until a fix makes it into an Amethyst release.