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-demo is broken #30

Closed
aholtzma opened this issue Sep 11, 2019 · 7 comments
Closed

piston-demo is broken #30

aholtzma opened this issue Sep 11, 2019 · 7 comments
Labels
bug Something isn't working portability

Comments

@aholtzma
Copy link

The piston demo builds, but panics immediately

aaron-mini:piston-demo aholtzma$ RUST_BACKTRACE=1 ./target/release/piston-demo
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: StringError("Not supported") }', src/libcore/result.rs:999:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::_print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::continue_panic_fmt
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::result::unwrap_failed
   9: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
  10: piston_demo::main
  11: std::rt::lang_start::{{closure}}
  12: std::panicking::try::do_call
  13: __rust_maybe_catch_panic
  14: std::rt::lang_start_internal
  15: main

This is running on MacOS Mojave.

@38
Copy link
Member

38 commented Sep 11, 2019

Thats' odd, would you please provide detailed stack trace by running the debug build ?

Thanks

@38
Copy link
Member

38 commented Sep 11, 2019

It seems the dependency i am using for this which called systemstat is broken under MacOS now. I am not sure and I don't have a Mac on my hand. So if you could provide the stack trace with line numbers, it should be extremely helpful.

@38 38 closed this as completed Sep 18, 2019
@38 38 reopened this Sep 18, 2019
@38 38 added bug Something isn't working portability labels Oct 8, 2019
@bermeom
Copy link

bermeom commented Oct 10, 2019

Hi
I have this error

error[E0425]: cannot find function draw_piston_window in module plotters::drawing
--> src/main.rs:25:44
|
25 | while let Some(_) = plotters::drawing::draw_piston_window(&mut window, |b| {
|

@38
Copy link
Member

38 commented Oct 10, 2019

Hi
I have this error

error[E0425]: cannot find function draw_piston_window in module plotters::drawing
--> src/main.rs:25:44
|
25 | while let Some(_) = plotters::drawing::draw_piston_window(&mut window, |b| {
|

Would you please provide more details about how you compile the code ?

@bermeom
Copy link

bermeom commented Oct 15, 2019

I have managed to run that example but using the following configuration in cargo.toml
plotters = {version="0.2.3",default_features = false, features = ["piston"]}
systemstat = "0.1.4"
piston_window = "0.96.0"
But using the last plotters version, the project does not work, i.e
plotters = {version="^0.2.8",default_features = false, features = ["piston"]}
systemstat = "0.1.4"
piston_window = "0.96.0"

@38
Copy link
Member

38 commented Oct 15, 2019

Hi I tried your configure, what I see is this error

error[E0308]: mismatched types
  --> src/main.rs:21:44
   |
21 |     while let Some(_) = draw_piston_window(&mut window, |b| {
   |                                            ^^^^^^^^^^^ expected struct `piston_window::PistonWindow`, found a different struct `piston_window::PistonWindow`
   |
   = note: expected type `&mut piston_window::PistonWindow` (struct `piston_window::PistonWindow`)
              found type `&mut piston_window::PistonWindow` (struct `piston_window::PistonW

This is caused by version conflict of the piston window used by newer version of Plotters and your configuration.

If this is the issue, it seems change the version requirement of psition window to * could solve

pistion_window = "*"

@38
Copy link
Member

38 commented Feb 5, 2020

Closed due to removal of piston backend

@38 38 closed this as completed Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working portability
Projects
None yet
Development

No branches or pull requests

3 participants