Examples panic with 'gl function was not loaded'
- Dominant language
- Rust
- Stars
- 1.8k
- Forks
- 194
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 2
Description
I've been trying to run the examples using `cargo --example`, and keep getting errors similar to the following:
```
Finished dev [unoptimized + debuginfo] target(s) in 0.20s
Running `target/debug/examples/lines`
OpenGL Warning: glXChooseVisual: ignoring attribute 0x22
OpenGL Warning: vboxCall failed with VBox status code VERR_BUFFER_OVERFLOW
thread 'main' panicked at 'gl function was not loaded', /home/cfkaran2/Documents/repositories/kiss3d/target/debug/build/gl-596ce15c37388ddb/out/bindings.rs:20624:13
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::begin_panic
at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libstd/panicking.rs:425
6: gl::missing_fn_panic
at ./target/debug/build/gl-596ce15c37388ddb/out/bindings.rs:20624
7: gl::GenVertexArrays
at ./target/debug/build/gl-596ce15c37388ddb/out/bindings.rs:1946
8: ::open
at src/window/gl_canvas.rs:51
9: kiss3d::window::canvas::Canvas::open
at src/window/canvas.rs:25
10: kiss3d::window::window::Window::do_new
at src/window/window.rs:407
11: kiss3d::window::window::Window::new
at src/window/window.rs:391
12: lines::main
at examples/lines.rs:9
13: std::rt::lang_start::{{closure}}
at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libstd/rt.rs:74
14: std::panicking::try::do_call
at src/libstd/rt.rs:59
at src/libstd/panicking.rs:310
15: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:102
16: std::rt::lang_start_internal
at src/libstd/panicking.rs:289
at src/libstd/panic.rs:398
at src/libstd/rt.rs:58
17: std::rt::lang_start
at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libstd/rt.rs:74
18: main
19: __libc_start_main
20: _start
```
I have no idea how to debug or diagnose this, but would like to get it working, if I can. Any help would be appreciated.
# Metainformation
I am running within a virtual box environment. 3D acceleration is turned on, and at least some of the examples for glutin are running.
```
$ lsb_release -a && uname -a && rustc -v -V && cargo -v -V
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
Linux EMANE 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
rustc 1.32.0 (9fda7c223 2019-01-16)
binary: rustc
commit-hash: 9fda7c2237db910e41d6a712e9a2139b352e558b
commit-date: 2019-01-16
host: x86_64-unknown-linux-gnu
release: 1.32.0
LLVM version: 8.0
cargo 1.32.0 (8610973aa 2019-01-02)
release: 1.32.0
commit-hash: 8610973aaf48615ba7dc9a38a9a2795ba6f36a31
commit-date: 2019-01-02
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure with `cargo --example lines` and inspect the reported path through `examples/lines.rs:9`, `src/window/window.rs:391` and `:407`, `src/window/canvas.rs:25`, and `src/window/gl_canvas.rs:51`. Compare the OpenGL context and function-loading behavior with the glutin examples that run successfully. Done means the kiss3d examples start without the `gl function was not loaded` panic in the reported environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100