PistonDevelopers / PistonDevelopers/piston
hello_world example crashes on '--release' config
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.7k
- Forks
- 235
- Avg merge
- 1m
- Merged PRs (30d)
- 4
Description
hello, I am having trouble running the hello_world example. it works fine with cargo run --bin hello_world, but if I try cargo run --release --bin hello_world, I get:
thread 'main' panicked at 'gl function was not loaded', C:\Users\fastf\Documents\Repos\piston-examples\target\release\build\gfx_gl-2c33ce61de5e5dae\out/gl_bindings.rs:1506:13
stack backtrace:
0: std::sys::windows::backtrace::unwind_backtrace
at C:\projects\rust\src\libstd\sys\windows\backtrace\mod.rs:65
1: std::sys_common::backtrace::print
at C:\projects\rust\src\libstd\sys_common\backtrace.rs:56
2: std::panicking::default_hook::{{closure}}
at C:\projects\rust\src\libstd\panicking.rs:381
3: std::panicking::default_hook
at C:\projects\rust\src\libstd\panicking.rs:397
4: std::panicking::rust_panic_with_hook
at C:\projects\rust\src\libstd\panicking.rs:577
5: std::panicking::begin_panic
6: gfx_gl::FnPtr::new
7: <gfx_device_gl::info::Version as core::fmt::Debug>::fmt
8: gfx_device_gl::info::get_all
9: <piston_window::PistonWindow as window::BuildFromWindowSettings>::build_from_window_settings
10: graphics::text::Text::draw
11: std::io::read_to_end
12: std::panicking::try::do_call<closure,i32>
at C:\projects\rust\src\libstd\panicking.rs:476
13: panic_unwind::__rust_maybe_catch_panic
at C:\projects\rust\src\libpanic_unwind\lib.rs:101
14: std::rt::lang_start_internal
at C:\projects\rust\src\libstd\rt.rs:50
15: main
16: __scrt_common_main_seh
at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283
17: BaseThreadInitThunk
error: process didn't exit successfully: target\release\hello_world.exe (exit code: 101)
I have already looked at How to fix problem when function pointer is not loaded, but it doesn't seem to apply to my issue. Even if I comment out everything except the building the window, I still get the crash.
I should mention that I am running Windows 10 on a i5-7200u.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with cargo run --release --bin hello_world on Windows, then compare it with the working debug command. Start at the hello_world example and the gfx_gl generated gl_bindings.rs location named in the panic, while checking the window-building path. Done means the release example builds and runs without the gl function was not loaded panic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100