piston_window icon indicating copy to clipboard operation
piston_window copied to clipboard

Segfaults when tried to run the example twice

Open juchiast opened this issue 7 years ago • 0 comments

extern crate piston_window;

use piston_window::*;

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

fn main() {
    run();
    run();
}

Running on Fedora 25 with gnome wayland, piston_window 0.65 (didn't use 0.66 because of #192 ). System log:

Jun 08 17:41:59 fe audit[9415]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=9415 comm="test_piston" exe="/home/qwe/test/test_piston/target/debug/test_piston" sig=11 res=1
Jun 08 17:41:59 fe kernel: test_piston[9415]: segfault at 30 ip 00007f15d2df7e20 sp 00007ffe8abb4878 error 4 in libwayland-client.so.0.3.0[7f15d2df1000+c000]
Jun 08 17:41:59 fe abrt-hook-ccpp[9546]: Process 9415 (test_piston) of user 1000 killed by SIGSEGV - dumping core
Jun 08 17:42:00 fe abrt-server[9547]: Deleting problem directory ccpp-2017-06-08-17:41:59-9415 (dup of ccpp-2017-06-08-17:15:42-4907)

juchiast avatar Jun 08 '17 10:06 juchiast