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

crash on open with linux #42

Closed
jedahan opened this issue Nov 17, 2019 · 10 comments
Closed

crash on open with linux #42

jedahan opened this issue Nov 17, 2019 · 10 comments

Comments

@jedahan
Copy link

jedahan commented Nov 17, 2019

cargo install --git https://github.com/cloudhead/rx --locked
~ RUST_BACKTRACE=full rx -u -
[2019-11-17T19:15:33Z INFO  rx] framebuffer size: 1280x720
[2019-11-17T19:15:33Z INFO  rx] hidpi factor: 2.2999980449676514
[2019-11-17T19:15:33Z INFO  rx::session] rx v0.2.0
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:378:21
stack backtrace:
   0:     0x556f5ce1c524 - backtrace::backtrace::libunwind::trace::hda41dbcdfba36aa0
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/libunwind.rs:88
   1:     0x556f5ce1c524 - backtrace::backtrace::trace_unsynchronized::h1a8d6e1f8cb3f5d4
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/mod.rs:66
   2:     0x556f5ce1c524 - std::sys_common::backtrace::_print_fmt::h610c4127487e10da
                               at src/libstd/sys_common/backtrace.rs:76
   3:     0x556f5ce1c524 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0722dc552e01bd1d
                               at src/libstd/sys_common/backtrace.rs:60
   4:     0x556f5ce3d21c - core::fmt::write::h01edf6dd68a42c9c
                               at src/libcore/fmt/mod.rs:1030
   5:     0x556f5ce19087 - std::io::Write::write_fmt::hf15985f193f03c04
                               at src/libstd/io/mod.rs:1412
   6:     0x556f5ce1e7d5 - std::sys_common::backtrace::_print::hd8d5d08a1795e743
                               at src/libstd/sys_common/backtrace.rs:64
   7:     0x556f5ce1e7d5 - std::sys_common::backtrace::print::hf89a79e3921a2366
                               at src/libstd/sys_common/backtrace.rs:49
   8:     0x556f5ce1e7d5 - std::panicking::default_hook::{{closure}}::h3a8f42beb3bb8ae3
                               at src/libstd/panicking.rs:196
   9:     0x556f5ce1e4c6 - std::panicking::default_hook::h8f803b0bc31a5c37
                               at src/libstd/panicking.rs:210
  10:     0x556f5ce1ee75 - std::panicking::rust_panic_with_hook::h825f041245da8739
                               at src/libstd/panicking.rs:473
  11:     0x556f5ce1ea12 - std::panicking::continue_panic_fmt::hbe0378e33481e81b
                               at src/libstd/panicking.rs:380
  12:     0x556f5ce1e906 - rust_begin_unwind
                               at src/libstd/panicking.rs:307
  13:     0x556f5ce3931a - core::panicking::panic_fmt::h527855ce0bc891f6
                               at src/libcore/panicking.rs:85
  14:     0x556f5ce39259 - core::panicking::panic::h2f49f09cf859b728
                               at src/libcore/panicking.rs:49
  15:     0x556f5cd5f86f - wgpu_request_adapter
  16:     0x556f5cd5a4b7 - wgpu::Adapter::request::hc06a386463c80c30
  17:     0x556f5cc265bc - rx::init::h3fab2ab361ffb234
  18:     0x556f5cc343e8 - rx::main::ha967765a9e31cdfc
  19:     0x556f5cc1d013 - std::rt::lang_start::{{closure}}::hc4ee2151b7bf7afb
  20:     0x556f5ce1e8a3 - std::rt::lang_start_internal::{{closure}}::ha04574f12d97cbe2
                               at src/libstd/rt.rs:49
  21:     0x556f5ce1e8a3 - std::panicking::try::do_call::h7c2a8488f72db90c
                               at src/libstd/panicking.rs:292
  22:     0x556f5ce214fa - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:80
  23:     0x556f5ce1f36d - std::panicking::try::hc3a9b5da4250385d
                               at src/libstd/panicking.rs:271
  24:     0x556f5ce1f36d - std::panic::catch_unwind::hf27600bf8c37809a
                               at src/libstd/panic.rs:394
  25:     0x556f5ce1f36d - std::rt::lang_start_internal::h409d4f2fe51133b0
                               at src/libstd/rt.rs:48
  26:     0x556f5cc34a22 - main
  27:     0x7f637cacab97 - __libc_start_main
  28:     0x556f5cc1b2ca - _start
  29:                0x0 - <unknown>
@cloudhead
Copy link
Owner

That looks like you're missing vulkan drivers or vulkan support. I should provide an error for this :)

@neauoire
Copy link

Same error here on Elementary, I'd love to know how to fix this.

@cloudhead
Copy link
Owner

Since Elementary is ubuntu-based, you have to install the ubuntu vulkan drivers, provided your hardware supports vulkan. At the very least, that's the mesa-vulkan-drivers package, and possibly libvulkan1 and vulkan-utils.

@cloudhead
Copy link
Owner

@cloudhead
Copy link
Owner

You can try the OpenGL branch now: cargo install --git https://github.com/cloudhead/rx --locked --branch f/gl --features compatibility

@neauoire
Copy link

neauoire commented Jan 5, 2020

Screenshot from 2020-01-05 10-53-02@2x

It has a few issues, when booting, the canvas is all the way hidden in the top right, and the tablet cursor doesn't seem to adapt to retina pixel ratio, so the cursor is always off from where it actually is.

@cloudhead
Copy link
Owner

cloudhead commented Jan 5, 2020

@neauoire is the first issue resolved after you resize the window? Also if you look at the log output, does it log a hidpi factor of 2?

I'm not able to reproduce this on a retina macbook pro (osx) 🤔

Make sure you pull recent changes, the branch has been merged into master.

@cloudhead
Copy link
Owner

cloudhead commented Jan 5, 2020

Investigating a bit more, I can reproduce if I wrongly force my laptop's hidpi factor to 2, even though it should be 1. Could you try this, but the other way around? Change this https://github.com/cloudhead/rx/blob/master/src/lib.rs#L117 to let hidpi_factor = 1.0; and see what happens 👀.

What's happening is that it's creating a framebuffer that is 2x the size of your window, hence you only see the left corner of it!

@neauoire
Copy link

neauoire commented Jan 5, 2020

Okay! I will give this a shot after lunch, stay tuned :)

@cloudhead
Copy link
Owner

Closing this, as GL support landed in master.

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

No branches or pull requests

3 participants