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

Piston Basic Example app crashes soon after window is shown. #1371

Open
santokalayil opened this issue May 30, 2021 · 1 comment
Open

Piston Basic Example app crashes soon after window is shown. #1371

santokalayil opened this issue May 30, 2021 · 1 comment

Comments

@santokalayil
Copy link

santokalayil commented May 30, 2021

I am fairly new to rust programming. Also this is the first time i am trying to use piston. I tried to use the following example code (the code found in here).

extern crate piston_window;

use piston_window::*;

fn main() {
    let mut window: PistonWindow =
        WindowSettings::new("Hello Piston!", [640, 480])
        .exit_on_esc(true).build().unwrap();
    while let Some(event) = window.next() {
        window.draw_2d(&event, |context, graphics, _device| {
            clear([1.0; 4], graphics);
            rectangle([1.0, 0.0, 0.0, 1.0], // red
                      [0.0, 0.0, 100.0, 100.0],
                      context.transform,
                      graphics);
        });
    }
}

But It crashed soon after the window is displayed.
The Error :
image

Help me to fix it..

@shinmili
Copy link

Maybe same issue with PistonDevelopers/piston_window#163?

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

2 participants