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

Chat about just about anything else
Post Reply
User avatar
Webtest
Level 4
Level 4
Posts: 288
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/result.rs:945:5
    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
xenopeek
Level 24
Level 24
Posts: 22189
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:
export RUST_BACKTRACE=1
Then as long as you keep the terminal open Rust will do the backtrace for any Rust commands started from this terminal that panic.
Image

Post Reply

Return to “Open chat”