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

Piston Window creates black screen and throws X11 error on close #245

Open
alexispurslane opened this issue Feb 24, 2019 · 0 comments
Open

Comments

@alexispurslane
Copy link

I'm using PistonWindow like it shows in the examples and docs, i.e. with a simple instantiation:

    let mut window: PistonWindow =
    WindowSettings::new("Astra Terra", [1920, 1080])
        .exit_on_esc(false)
        .build()
        .unwrap();

This worked for the several years that I've been working on this project, but today I updated my system and now all I get is a black screen. When I quit (not using the in-game menu, since I can't see it, but using the system close button) I get this error:

hread 'main' panicked at 'Failed to close input method: XError { description: "BadDrawable (invalid Pixmap or Window parameter)", error_code: 9, request_code: 14, minor_code: 0 }', src/libcore/result.rs:1009:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:211
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:227
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:491
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:398
   6: rust_begin_unwind
             at src/libstd/panicking.rs:325
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:95
   8: core::result::unwrap_failed
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/macros.rs:26
   9: <winit::platform::platform::x11::util::Ime as core::ops::drop::Drop>::drop
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/result.rs:835
             at /home/christopherdumas/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.12.0/src/platform/linux/x11/util.rs:409
  10: <std::collections::hash::table::RawTable<K, V> as core::ops::drop::Drop>::drop
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/ptr.rs:204
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/ptr.rs:204
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/ptr.rs:194
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libstd/collections/hash/table.rs:844
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libstd/collections/hash/table.rs:1127
  11: core::ptr::real_drop_in_place
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/ptr.rs:204
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/ptr.rs:204
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/ptr.rs:204
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/ptr.rs:204
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/ptr.rs:204
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/ptr.rs:204
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/ptr.rs:204
  12: core::ptr::real_drop_in_place
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/ptr.rs:204
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/ptr.rs:204
  13: AstraTerra::main
             at src/main.rs:1881
  14: std::rt::lang_start::{{closure}}
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libstd/rt.rs:74
  15: std::panicking::try::do_call
             at src/libstd/rt.rs:59
             at src/libstd/panicking.rs:310
  16: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:102
  17: std::rt::lang_start_internal
             at src/libstd/panicking.rs:289
             at src/libstd/panic.rs:398
             at src/libstd/rt.rs:58
  18: main
  19: __libc_start_main
  20: _start

Cargo-Process exited abnormally with code 101 at Sun Feb 24 09:10:15

System info:
Linux christophers-Dell-XPS 4.19.20-1-MANJARO #1 SMP PREEMPT Wed Feb 6 21:33:34 UTC 2019 x86_64 GNU/Linux

I've attached some screenshots, in case it helps. I've also tried using glxinfo | grep "OpenGL version" to get the supported version of OpenGL. It gives me this: OpenGL version string: 3.0 Mesa 18.3.3, and then setting the correct version number on the PistonWindow using the .opengl method but that doesn't help either. Again, this used to work until I updated some packages on my system today, I've made no code changes.

2019-02-24-085108_2560x1440_scrot
2019-02-24-085119_2560x1440_scrot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant