RUST: Newbie woes: Spinning-Square Demo Crashes ???

Chat about just about anything else
Post Reply
User avatar
Level 4
Level 4
Posts: 293
Joined: Sun Feb 21, 2010 4:45 pm
Location: Carlisle, Pennsylvania, USA

RUST: Newbie woes: Spinning-Square Demo Crashes ???

Post by Webtest » Fri Mar 30, 2018 12:49 pm

Esteemed Forum Participants and Lurkers:
I'm just beginning to investigate "Rust", with a reasonable level of success ... until now.

I found a 'simple' graphics program using Piston graphics engine and presents a red spinning square in a green window: Piston Developers/Piston-Tutorials

It builds, but when I try to run it, it crashes with:
  • thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "GL context creation failed"', libcore/
    note: Run with `RUST_BACKTRACE=1` for a backtrace.
I've spent over 2 hours trying to google all over rust, GitHub, and elsewhere for a solution, or even how to get the 'BACKTRACE' to do anything, but I have had ZERO success. I'm out of time today, but next week when I get the chance I'll try the rust-beginners IRC. I have used a couple of other chat groups, but this will be my first for Rust.

Thank you for any and all comments, suggestions, and assistance.
Blessings in abundance,
Art in Carlisle, PA USA
BOAT - a hole in the water that you pour money into
LINUX - a hole in your life that you pour TIME into

HP dx2400 Core 2 Duo 4 GB - Mint 10 Gnome, Mint 13/15/17.x/18.x Mate <on LOCKED SD cards, and Kanguru USB drives>

User avatar
Level 24
Level 24
Posts: 23478
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: RUST: Newbie woes: Spinning-Square Demo Crashes ???

Post by xenopeek » Fri Mar 30, 2018 4:39 pm

Build a debug target. Then run it as:
RUST_BACKTRACE=1 cargo run
Or to make RUST_BACKTRACE=1 the default for your current terminal session, run this once:
Then as long as you keep the terminal open Rust will do the backtrace for any Rust commands started from this terminal that panic.

Post Reply

Return to “Open chat”