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

Can not run examples #484

Closed
azerupi opened this issue Jun 22, 2015 · 18 comments
Closed

Can not run examples #484

azerupi opened this issue Jun 22, 2015 · 18 comments
Labels

Comments

@azerupi
Copy link

azerupi commented Jun 22, 2015

When I try to run the examples I get a panic:

thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: OsError("glx::ChooseFBConfig failed")', ../src/libcore/result.rs:731
An unknown error occurred

Any idea what I am doing wrong?

I am on Arch Linux and I tried using both stable and nightly rust

@mitchmindtree
Copy link
Contributor

Thanks for the issue!

Could you please provide the backtrace? i.e.

RUST_BACKTRACE=1 cargo run --example all_widgets

@azerupi
Copy link
Author

azerupi commented Jun 22, 2015

Thank you for taking the time to look into it :)

Here is the backtrace, let me know if I can do anything else.

$ RUST_BACKTRACE=1 cargo run --example all_widgets
     Running `target/debug/examples/all_widgets`
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: OsError("glx::ChooseFBConfig failed")', ../src/libcore/result.rs:731
stack backtrace:
   1:     0x7f406e0b3b43 - sys::backtrace::write::hac6f7844a2c08518pqs
   2:     0x7f406e0b7089 - panicking::on_panic::he3a077dab5880a1969w
   3:     0x7f406e0ab9aa - rt::unwind::begin_unwind_inner::h07f84ceedf6e11d3KPw
   4:     0x7f406e0abfa7 - rt::unwind::begin_unwind_fmt::h7e195ef64919b9efQOw
   5:     0x7f406e0b6a86 - rust_begin_unwind
   6:     0x7f406e0e7174 - panicking::panic_fmt::h03749e86046e7c85E8B
   7:     0x7f406deb1252 - result::Result<T, E>::unwrap::h9744667872259961920
                        at ../src/libcore/macros.rs:28
   8:     0x7f406deac1bd - GlutinWindow::new::h769ffa3dbf277bcfKaa
                        at /home/mathieu/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/pistoncore-glutin_window-0.2.1/src/lib.rs:61
   9:     0x7f406df33ddc - GlutinWindow.From<WindowSettings>::from::h4e6d67af243caddd9fa
                        at /home/mathieu/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/pistoncore-glutin_window-0.2.1/src/lib.rs:126
  10:     0x7f406dda48bc - convert::T.Into<U>::into::h15332988262216744694
                        at ../src/libcore/convert.rs:152
  11:     0x7f406dda3f31 - main::ha051f9a5a1c68f74cfa
                        at examples/all_widgets.rs:135
  12:     0x7f406e0bbe78 - rust_try_inner
  13:     0x7f406e0bbe65 - rust_try
  14:     0x7f406e0b8b54 - rt::lang_start::h9b015c0b6de57f8334w
  15:     0x7f406ddca92b - main
  16:     0x7f406d30778f - __libc_start_main
  17:     0x7f406dd99d88 - _start
  18:                0x0 - <unknown>
An unknown error occurred

@mitchmindtree
Copy link
Contributor

Hmmm, the stack trace seems to show the panic in the GlutinWindow constructor. @bvssvni any ideas? Or d'you know anyone on Arch Linux who might have an idea?

@bvssvni
Copy link
Member

bvssvni commented Jun 22, 2015

@mitchmindtree
Copy link
Contributor

The source for that glutin::WindowBuilder::build method is here.

Error should be very rare and only occur in case of permission denied, incompatible system, out of memory, etc.

@mitchmindtree
Copy link
Contributor

@azerupi out of curiousity, do any of these glutin examples work for you?

@bvssvni
Copy link
Member

bvssvni commented Jun 22, 2015

Could it be the issue with loading OpenGL function pointers? PistonDevelopers/glutin_window#35

@azerupi
Copy link
Author

azerupi commented Jun 22, 2015

@mitchmindtree I am not home at the moment, but I will try when I get back later today

@azerupi
Copy link
Author

azerupi commented Jun 22, 2015

@mitchmindtree the glutin examples work like a charm

@mitchmindtree
Copy link
Contributor

@azerupi were you ever able to get any of the examples working?

@azerupi
Copy link
Author

azerupi commented Feb 22, 2016

Hah, it's been a long time.. ;) I have to admit that I don't really remember the problem anymore. After hitting this bug I put conrod and played with other things.

If you want I can try now, see if it works?

@mitchmindtree
Copy link
Contributor

@azerupi aye it has been a while :)

If you get a chance, t'would be appreciated! No rush though of course 👍

@azerupi
Copy link
Author

azerupi commented Feb 22, 2016

So I tried to run the all_widgets example. I don't get the original panic I reported here but I do get another one:

     Running `target/release/examples/all_widgets`
thread '<main>' panicked at 'Failed to get root window: XError { description: "GLXBadFBConfig", error_code: 181, request_code: 155, minor_code: 34 }', ../src/libcore/result.rs:760

I am running a fairly recently installed Arch linux with xfce + i3wm. Let me know if you need me to procure any extra information or if I should post this in a new issue and close this one.

@stianeklund
Copy link

stianeklund commented Jul 29, 2016

I suspect this is the same problem I'm experiencing with Ubuntu running on Virtualbox.
I have a Ubuntu VM (with Guest utilities & 3D acceleration on). Please let me know if there is a more specific issue for this and I'll comment there instead, or if there are things to test and I'd be glad to assist.

Trying to compile & run all_widgets on Ubuntu 16:04 in VirtualBox fails.

rustc 1.10.0 (cfcb716cf 2016-07-03)
cargo 0.11.0-nightly (259324c 2016-05-20)
via rustup 0.4.0 (3171903 2016-07-22)

Backtrace:

         Running `target/debug/examples/all_widgets`
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: "Couldn\'t find any pixel format that matches the criterias."', ../src/libcore/result.rs:785
stack backtrace:
   1:     0x5634a1e9635f - std::sys::backtrace::tracing::imp::write::h3800f45f421043b8
   2:     0x5634a1e992fb - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::h0ef6c8db532f55dc
   3:     0x5634a1e98f83 - std::panicking::default_hook::hf3839060ccbb8764
   4:     0x5634a1e8d88d - std::panicking::rust_panic_with_hook::h5dd7da6bb3d06020
   5:     0x5634a1e99541 - std::panicking::begin_panic::h9bf160aee246b9f6
   6:     0x5634a1e8e81a - std::panicking::begin_panic_fmt::haf08a9a70a097ee1
   7:     0x5634a1e994de - rust_begin_unwind
   8:     0x5634a1ecebdf - core::panicking::panic_fmt::h93df64e7370b5253
   9:     0x5634a19ccee9 - core::result::unwrap_failed::hfa264942aa0c849a
                        at ../src/libcore/macros.rs:29
  10:     0x5634a19c321e - _<std..result..Result<T, E>>::unwrap::h162c33ab0d43eec1
                        at ../src/libcore/result.rs:723
  11:     0x5634a19c2aa5 - all_widgets::main::hca8753e5503ba0c4
                        at examples/all_widgets.rs:136
  12:     0x5634a1e98bc8 - std::panicking::try::call::hbbf4746cba890ca7
  13:     0x5634a1ea2ddb - __rust_try
  14:     0x5634a1ea2d7e - __rust_maybe_catch_panic
  15:     0x5634a1e9866e - std::rt::lang_start::hbcefdc316c2fbd45
  16:     0x5634a1ace779 - main
  17:     0x7fd14d54b82f - __libc_start_main
  18:     0x5634a19b8638 - _start
  19:                0x0 - <unknown>
error: Process didn't exit successfully: `target/debug/examples/all_widgets` (exit code: 101)

@mitchmindtree
Copy link
Contributor

@stianeklund it looks like the error you're getting is slightly different to the ones azurepi has been reporting. I believe it might be either 1. a problem with the implementation of your platform within glutin or 2. a problem with the way that either PistonDevelopers/glutin_window or PistonDevelopers/piston_window wraps glutin. Would you mind checking whether or not the glutin examples work for you?

The following issues might be related:

@stianeklund
Copy link

@mitchmindtree Not sure whether to comment in #757 or not. Glutin works, I'm able to compile and run the window example.

@mitchmindtree
Copy link
Contributor

@stianeklund would be best to continue discussion of the bug at #757. Thanks for testing glutin examples btw 👍

@mitchmindtree
Copy link
Contributor

Going to close this as I believe the examples should work now! Happy to re-open if there are still issues though.

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

No branches or pull requests

4 participants