Skip to content

Unable to run example on Windows with RC3 -- zero-initialization of glutin::ContextWrapper<glutin::PossiblyCurrent, glutin::Window> #213

@mrd0ll4r

Description

@mrd0ll4r

Hey,

I'm trying to run the example on Windows 10, x86_64, NVIDIA graphics card, latest stable Rust. I use turtle 1.0.0-rc.3 and run the example code from the README.
This is what I get:

thread 'main' panicked at 'attempted to zero-initialize type `glutin::ContextWrapper<glutin::PossiblyCurrent, glutin::Window>`, which is invalid', C:\Users\Leo\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\mem\mod.rs:622:9
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4\/library\std\src\panicking.rs:483
   1: core::panicking::panic_fmt
             at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4\/library\core\src\panicking.rs:85
   2: core::panicking::panic
             at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4\/library\core\src\panicking.rs:50
   3: core::mem::zeroed
             at C:\Users\Leo\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\mem\mod.rs:622
   4: glutin_window::{{impl}}::make_current
             at C:\Users\Leo\.cargo\registry\src\github.com-1ecc6299db9ec823\pistoncore-glutin_window-0.63.0\src\lib.rs:511
   5: piston_window::PistonWindow<glutin_window::GlutinWindow>::draw_2d<glutin_window::GlutinWindow,input::Event,closure-1,tuple<>>
             at C:\Users\Leo\.cargo\registry\src\github.com-1ecc6299db9ec823\piston_window-0.105.0\src\lib.rs:272
   6: turtle::renderer::Renderer::run
             at C:\Users\Leo\.cargo\registry\src\github.com-1ecc6299db9ec823\turtle-1.0.0-rc.3\src\renderer.rs:126
   7: turtle::server::main
             at C:\Users\Leo\.cargo\registry\src\github.com-1ecc6299db9ec823\turtle-1.0.0-rc.3\src\server.rs:90
   8: turtle::server::start
             at C:\Users\Leo\.cargo\registry\src\github.com-1ecc6299db9ec823\turtle-1.0.0-rc.3\src\server.rs:66
   9: turtle::turtle_window::TurtleWindow::new
             at C:\Users\Leo\.cargo\registry\src\github.com-1ecc6299db9ec823\turtle-1.0.0-rc.3\src\turtle_window.rs:23
  10: turtle::turtle::Turtle::new
             at C:\Users\Leo\.cargo\registry\src\github.com-1ecc6299db9ec823\turtle-1.0.0-rc.3\src\turtle.rs:86
  11: hilbert::main
             at .\src\main.rs:4

I am on stable Rust 1.48. Let me know if I can provide any additional info.

On the upside: It does work with the latest commit, i.e. using turtle = {git = "https://github.com/sunjay/turtle"} as the dependency. So maybe this issue resolves itself on next release :)

Best,
Leo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions