jacg / petalo

PET scanner image reconstruction
1 stars 4 forks source link

Problem with vislor #1

Closed jmbenlloch closed 3 years ago

jmbenlloch commented 3 years ago

I have successfully clone the project, installed nix-shell and direnv. I could run as well the mlem examples and the jupyter notebook to compare the results. But when I have tried to run any of the vislor examples I am getting an error:

$ cargo run --bin vislor -- ball 
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/vislor ball`
vbox: VoxelBox { half_width: Matrix { data: [90.0, 90.0, 90.0] }, n: [60, 60, 60], voxel_size: Matrix { data: [3.0, 3.0, 3.0] } }
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: OsError("`glXQueryExtensionsString` found no glX extensions")', /home/jmbenlloch/.cargo/registry/src/github.com-1ecc6299db9ec823/kiss3d-0.26.0/src/window/gl_canvas.rs:49:62
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The extended version is this:

$ RUST_BACKTRACE=full cargo run --bin vislor -- ball 
    Finished dev [unoptimized + debuginfo] target(s) in 0.15s
     Running `target/debug/vislor ball`
vbox: VoxelBox { half_width: Matrix { data: [90.0, 90.0, 90.0] }, n: [60, 60, 60], voxel_size: Matrix { data: [3.0, 3.0, 3.0] } }
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: OsError("`glXQueryExtensionsString` found no glX extensions")', /home/jmbenlloch/.cargo/registry/src/github.com-1ecc6299db9ec823/kiss3d-0.26.0/src/window/gl_canvas.rs:49:62
stack backtrace:
   0:     0x55793baa7a20 - std::backtrace_rs::backtrace::libunwind::trace::h577ea05e9ca4629a
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/../../backtrace/src/backtrace/libunwind.rs:96
   1:     0x55793baa7a20 - std::backtrace_rs::backtrace::trace_unsynchronized::h50b9b72b84c7dd56
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/../../backtrace/src/backtrace/mod.rs:66
   2:     0x55793baa7a20 - std::sys_common::backtrace::_print_fmt::h6541cf9823837fac
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:79
   3:     0x55793baa7a20 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf64fbff071026df5
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:58
   4:     0x55793bac9eec - core::fmt::write::h9ddafa4860d8adff
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/fmt/mod.rs:1082
   5:     0x55793baa4ab7 - std::io::Write::write_fmt::h1d2ee292d2b65481
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/io/mod.rs:1514
   6:     0x55793baa9d70 - std::sys_common::backtrace::_print::ha25f9ff5080d886d
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:61
   7:     0x55793baa9d70 - std::sys_common::backtrace::print::h213e8aa8dc5405c0
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:48
   8:     0x55793baa9d70 - std::panicking::default_hook::{{closure}}::h6482fae49ef9d963
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:200
   9:     0x55793baa9abc - std::panicking::default_hook::he30ad7589e0970f9
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:219
  10:     0x55793baaa3d3 - std::panicking::rust_panic_with_hook::haa1ed36ada4ffb03
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:569
  11:     0x55793baa9fa9 - std::panicking::begin_panic_handler::{{closure}}::h7001af1bb21aeaeb
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:476
  12:     0x55793baa7eac - std::sys_common::backtrace::__rust_end_short_backtrace::h39910f557f5f2367
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:153
  13:     0x55793baa9f69 - rust_begin_unwind
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:475
  14:     0x55793bac7d61 - core::panicking::panic_fmt::h4e2659771ebc78eb
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/panicking.rs:85
  15:     0x55793bac7b83 - core::option::expect_none_failed::h448b58a024c2c33a
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/option.rs:1221
  16:     0x55793b4bf1e0 - core::result::Result<T,E>::unwrap::h17668e4ca649c797
                               at /nix/store/midjh17vkp64rd7f7r3r9hqcaqnfg03k-rust-1.47.0-2020-10-07-18bf6b4f0/lib/rustlib/src/rust/library/core/src/result.rs:973
  17:     0x55793b57769e - <kiss3d::window::gl_canvas::GLCanvas as kiss3d::window::canvas::AbstractCanvas>::open::hf6b85a4211e9b5bb
                               at /home/jmbenlloch/.cargo/registry/src/github.com-1ecc6299db9ec823/kiss3d-0.26.0/src/window/gl_canvas.rs:49
  18:     0x55793b4fc680 - kiss3d::window::canvas::Canvas::open::h21abe8c22f9b6155
                               at /home/jmbenlloch/.cargo/registry/src/github.com-1ecc6299db9ec823/kiss3d-0.26.0/src/window/canvas.rs:68
  19:     0x55793b4a3521 - kiss3d::window::window::Window::do_new::h8cbaf5a5187feed3
                               at /home/jmbenlloch/.cargo/registry/src/github.com-1ecc6299db9ec823/kiss3d-0.26.0/src/window/window.rs:511
  20:     0x55793b4a3353 - kiss3d::window::window::Window::new::h6d8dff6527d0aaf2
                               at /home/jmbenlloch/.cargo/registry/src/github.com-1ecc6299db9ec823/kiss3d-0.26.0/src/window/window.rs:484
  21:     0x55793b3ea8d3 - petalo::visualize::Scene::new::h2b34dedcae45cfef
                               at /home/jmbenlloch/next/petalo/petalo_rust/src/visualize.rs:38
  22:     0x55793b3ed364 - petalo::visualize::lor_weights::h9a63c55ba25c44c9
                               at /home/jmbenlloch/next/petalo/petalo_rust/src/visualize.rs:197
  23:     0x55793b3df450 - vislor::main::h4f4430d01c98cd56
                               at /home/jmbenlloch/next/petalo/petalo_rust/src/bin/vislor.rs:31
  24:     0x55793b3dc87b - core::ops::function::FnOnce::call_once::h9948ef9bde968a17
                               at /nix/store/midjh17vkp64rd7f7r3r9hqcaqnfg03k-rust-1.47.0-2020-10-07-18bf6b4f0/lib/rustlib/src/rust/library/core/src/ops/function.rs:227
  25:     0x55793b3e246e - std::sys_common::backtrace::__rust_begin_short_backtrace::h3bc5b83623f1cfce
                               at /nix/store/midjh17vkp64rd7f7r3r9hqcaqnfg03k-rust-1.47.0-2020-10-07-18bf6b4f0/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:137
  26:     0x55793b3e2241 - std::rt::lang_start::{{closure}}::h7f0dfe41640910a9
                               at /nix/store/midjh17vkp64rd7f7r3r9hqcaqnfg03k-rust-1.47.0-2020-10-07-18bf6b4f0/lib/rustlib/src/rust/library/std/src/rt.rs:66
  27:     0x55793baaa8a1 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h6a3209f124be2235
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/ops/function.rs:259
  28:     0x55793baaa8a1 - std::panicking::try::do_call::h88ce358792b64df0
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:373
  29:     0x55793baaa8a1 - std::panicking::try::h6311c259678e50fc
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:337
  30:     0x55793baaa8a1 - std::panic::catch_unwind::h56c5716807d659a1
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panic.rs:379
  31:     0x55793baaa8a1 - std::rt::lang_start_internal::h73711f37ecfcb277
                               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/rt.rs:51
  32:     0x55793b3e2217 - std::rt::lang_start::h474a9c803c622349
                               at /nix/store/midjh17vkp64rd7f7r3r9hqcaqnfg03k-rust-1.47.0-2020-10-07-18bf6b4f0/lib/rustlib/src/rust/library/std/src/rt.rs:65
  33:     0x55793b3e102a - main
  34:     0x7ff631f43c7d - __libc_start_main
  35:     0x55793b3db0ca - _start
  36:                0x0 - <unknown>

@jacg, are you familiar with this error? What should I do?

jacg commented 3 years ago

I'm have deleted most of the exchanges in this thread, as they were very noisy, and didn't really contribute anything to understanding the problem. I have left the original problem report and the final solution.

jacg commented 3 years ago

Please check out the fix-vislor branch, and try running

nixGL cargo run --bin vislor -- ball

that is, prepend the command you were trying before, with nixGL.

jmbenlloch commented 3 years ago

Everything worked using the fix-vislor branch and the command you provided!