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

hello_world example crashes on '--release' config #1221

Open
samuel-williams opened this issue Feb 14, 2018 · 4 comments
Open

hello_world example crashes on '--release' config #1221

samuel-williams opened this issue Feb 14, 2018 · 4 comments

Comments

@samuel-williams
Copy link

samuel-williams commented Feb 14, 2018

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.

@henke443
Copy link

I have this issue too

@mihaiandrei1294
Copy link

mihaiandrei1294 commented Jul 5, 2018

I have this problem too. Weird thing is, it has worked with no problem before, that is, sometime in February 2018. Haven't tried it since. And now, when I try it, I have the same problem, working for debug, but not for release. Is it possible to have something to do with rust updates since then?

Edit: ok, whatever the problem was, it seemed it was fixed. I updated to the last version of the piston and pistoncore_glutin-window crates and it works now.

@Jason5Lee
Copy link

I have this issue on Windows, but it works on MacOS.

@filippo-orru
Copy link

Have this issue as well. Can't get my game to work after updating Cargo.toml dependencies. There seems to be a mismatch between the different crates. For example:
When calling viewport() on the Renderargs returned by the eventloop, my opengl.draw(viewport, closure) doesn't work as they use different versions of Viewport. One from graphics::Viewport and another in the same file as the Renderargs (probably piston::input::viewport::Viewport but I'm not sure)

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

No branches or pull requests

5 participants