pixix4 / ev3dev-lang-rust

Rust language bindings for http://ev3dev.org
MIT License
71 stars 14 forks source link

Fixed Framebuffer Errors causing Stack overflows #16

Closed JustSomeRandomUsername closed 2 years ago

JustSomeRandomUsername commented 2 years ago

Calling Screen::new() on non ev3 device was causing stack overflows instead of returning an Error. It seems to happen because FramebufferError doesn't implement Display but gets formatted with a "{}", but I don't understand why this would not be caught by the compiler. But switching to using "{:?}" or printing err.details fixes the Problem

pixix4 commented 2 years ago

Thank you for finding this strange bug. For the next version I will also increase the version of the framebuffer dependency to include some bug fixes in the library itself.