Skip to content
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

Launching and crashing soon after #109

Open
Arbee4ever opened this issue Jan 4, 2024 · 28 comments
Open

Launching and crashing soon after #109

Arbee4ever opened this issue Jan 4, 2024 · 28 comments
Labels
bug Something isn't working

Comments

@Arbee4ever
Copy link

When I try to run the newest release on Fedora 39, it crashes after starting. When I run it using ./native_app in the Terminal I get the error Error trying to flush the wayland display: Broken pipe (os error 32) once it crashes. The Client opens, but I can't interact with it, click anything in the game or move the Camera.

@Uriopass
Copy link
Owner

Uriopass commented Jan 4, 2024

Wayland support is probably not great as I don't really tro to support it.
Last time I tried using wayland every other program was broken too so I thought I'd wait until it matured a bit.

@Uriopass
Copy link
Owner

Uriopass commented Jan 4, 2024

Can you try running master instead? I upgraded to winit 0.29 recently which could help.

@Arbee4ever
Copy link
Author

Arbee4ever commented Jan 4, 2024

Tried that, and it didn't even launch and threw the error

thread 'main' panicked at 'texture not found at path: assets/sprites/blue_noise_512.png (in dir: Ok("/home/arbee/Documents/Egregoria")): The image format could not be determined': /home/arbee/Documents/Egregoria/engine/src/texture.rs:353
   0: <backtrace::capture::Backtrace as core::default::Default>::default
   1: log_panics::Config::install_panic_hook::{{closure}}
   2: std::panicking::rust_panic_with_hook
   3: std::panicking::begin_panic_handler::{{closure}}
   4: std::sys_common::backtrace::__rust_end_short_backtrace
   5: rust_begin_unwind
   6: core::panicking::panic_fmt
   7: engine::texture::TextureBuilder::from_path
   8: engine::framework::run::{{closure}}
   9: native_app::main
  10: std::sys_common::backtrace::__rust_begin_short_backtrace
  11: std::rt::lang_start::{{closure}}
  12: std::rt::lang_start_internal
  13: main
  14: __libc_start_call_main
  15: __libc_start_main_impl
  16: _start

even thought the texture at "assets/sprites/blue_noise_512.png" exists.

@Uriopass
Copy link
Owner

Uriopass commented Jan 4, 2024

You probably didn't pull the LFS files, check the readme

@Arbee4ever
Copy link
Author

I did run git lfs pull

@Uriopass
Copy link
Owner

Uriopass commented Jan 4, 2024

What does
file assets/sprites/blue_noise_512.png
Show ?

@Arbee4ever
Copy link
Author

blue_noise_512
This

@Uriopass
Copy link
Owner

Uriopass commented Jan 4, 2024

Hmmmm, can you run again ? I don't see why the image format would not be recognized

@Arbee4ever
Copy link
Author

Arbee4ever commented Jan 4, 2024

Oh.. Is that a Terminal Command?
assets/sprites/blue_noise_512.png: PNG image data, 512 x 512, 8-bit/color RGBA, non-interlaced
Didn't know that command existed

@Uriopass
Copy link
Owner

Uriopass commented Jan 4, 2024

It is :) very useful

@Arbee4ever
Copy link
Author

Arbee4ever commented Jan 4, 2024

I deleted the file and reran git lfs pull, and it ran, but I couldn't interact with it again until it crashed with

Io error: Broken pipe (os error 32)
thread 'main' panicked at 'Failed to run event loop: ExitFailure(1)': /home/arbee/Documents/Egregoria/engine/src/framework.rs:160
   0: <backtrace::capture::Backtrace as core::default::Default>::default
   1: log_panics::Config::install_panic_hook::{{closure}}
   2: std::panicking::rust_panic_with_hook
   3: std::panicking::begin_panic_handler::{{closure}}
   4: std::sys_common::backtrace::__rust_end_short_backtrace
   5: rust_begin_unwind
   6: core::panicking::panic_fmt
   7: core::result::unwrap_failed
   8: engine::framework::run::{{closure}}
   9: native_app::main
  10: std::sys_common::backtrace::__rust_begin_short_backtrace
  11: std::rt::lang_start::{{closure}}
  12: std::rt::lang_start_internal
  13: main
  14: __libc_start_call_main
  15: __libc_start_main_impl
  16: _start

I'm guessing that is the same error as before?

@Uriopass
Copy link
Owner

Uriopass commented Jan 4, 2024

I have never seen this error before. Are you running any "surprising" setup? Maybe an old computer, a networked disk, maybe you don't have a gpu?...

@Arbee4ever
Copy link
Author

Nope... I don't think so...

@Arbee4ever
Copy link
Author

Maybe it's the nvidia gpu messing stuff up... wouldn't be the first time

@Uriopass
Copy link
Owner

Uriopass commented Jan 4, 2024

I'm just wondering what pipe could be broken. Super weird.

@Arbee4ever
Copy link
Author

I reran it yet again and got the error:

Io error: Connection reset by peer (os error 104)
Io error: Connection reset by peer (os error 104)
thread 'main' panicked at 'Failed to run event loop: ExitFailure(1)': /home/arbee/Documents/Egregoria/engine/src/framework.rs:160
   0: <backtrace::capture::Backtrace as core::default::Default>::default
   1: log_panics::Config::install_panic_hook::{{closure}}
   2: std::panicking::rust_panic_with_hook
   3: std::panicking::begin_panic_handler::{{closure}}
   4: std::sys_common::backtrace::__rust_end_short_backtrace
   5: rust_begin_unwind
   6: core::panicking::panic_fmt
   7: core::result::unwrap_failed
   8: engine::framework::run::{{closure}}
   9: native_app::main
  10: std::sys_common::backtrace::__rust_begin_short_backtrace
  11: std::rt::lang_start::{{closure}}
  12: std::rt::lang_start_internal
  13: main
  14: __libc_start_call_main
  15: __libc_start_main_impl
  16: _start

@Uriopass
Copy link
Owner

Uriopass commented Jan 4, 2024

I'm thinking it might be related to the logging. Can you run

sed -i 's/release_max_level_info/release_max_level_off/g' native_app/Cargo.toml

then cargo run --release again?

@Uriopass
Copy link
Owner

Uriopass commented Jan 4, 2024

But I'm mostly thinking it's wayland (which is networked) that's broken. In which case I can't investigate right now since I'd need to setup a wayland desktop.

@Arbee4ever
Copy link
Author

Arbee4ever commented Jan 4, 2024

I'm thinking it might be related to the logging. Can you run

sed -i 's/release_max_level_info/release_max_level_off/g' native_app/Cargo.toml

then cargo run --release again?

That crashed with Io error: Broken pipe (os error 32)
I might be able to try it on Windows sometime :D

@Uriopass
Copy link
Owner

Uriopass commented Jan 4, 2024

Windows should definitely work. I run Ubuntu on X11 most days but I have a windows gaming pc where I try it occasionally and I haven't had any issues.

@Arbee4ever
Copy link
Author

Yeah Windows can be more easily developed for because there isn't multiple display servers or something messing it up all the time

@Arbee4ever
Copy link
Author

I just remembered I can just switch to xorg by just logging out setting it to xorg and logging back in... Now it works fine :D

@Uriopass
Copy link
Owner

Uriopass commented Jan 4, 2024

Nice! So it was a Wayland issue. I'll try to reproduce it as it's slowly becoming the default.

@Uriopass
Copy link
Owner

Uriopass commented Jan 4, 2024

As last time... Wayland+vulkan is buggy as hell with NVIDIA drivers. (Egregoria only supports vulkan on Linux as a graphics backend, I don't have time to make wgpu's opengl backend work)

When using the latest drivers I hit: gfx-rs/wgpu#4775
And when using the stable drivers I hit NVIDIA/egl-wayland#83 (comment)

🙃

Let's hope it gets better when the game is ready to be released! In the meantime, I can't test much.

@Uriopass
Copy link
Owner

Goods news. I'm pretty sure this is fixed by gfx-rs/wgpu@e5c62fb which should come in the next wgpu release :)

@Uriopass Uriopass added the bug Something isn't working label Jan 22, 2024
@Uriopass
Copy link
Owner

Uriopass commented Feb 8, 2024

Didn't made it in time for wgpu 0.19. It should be there in wgpu 0.20 though! (in a few months).

@Uriopass
Copy link
Owner

Uriopass commented Jul 3, 2024

I think it's finally good! Can you try again?

@Arbee4ever
Copy link
Author

Now I dont get a window at all and the logs don't tell me there's an issue, but when I run it from the terminal, I get interface 'wl_surface' has no event 2 before any log output
log_1720375223294615.log
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants