Skip to content

Thread 'main' panicked when trying to display a greyscale image #107

Open
@cyber199

Description

@cyber199

Trying out the LED modules and I get an issue when trying to show a greyscale image and I don't know if I'm encountering a bug or just being an idiot. It happens with both my own image and the examples found in this repo ("/res/greyscale.gif", "/res/stripe.gif", and "/res/stripe.png").
With RUST_BACKTRACE=full set I get the following:

$ ./Downloads/inputmodule-control_cli_linux led-matrix --image-gray ~/Pictures/greyscale.gif 

thread 'main' panicked at 'Write failed!: Custom { kind: TimedOut, error: "Operation timed out" }', inputmodule-control/src/inputmodule.rs:430:10
stack backtrace:
   0:     0x58f52d0b4ad0 - std::backtrace_rs::backtrace::libunwind::trace::ha9053a9a07ca49cb
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x58f52d0b4ad0 - std::backtrace_rs::backtrace::trace_unsynchronized::h9c2852a457ad564e
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x58f52d0b4ad0 - std::sys_common::backtrace::_print_fmt::h457936fbfaa0070f
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x58f52d0b4ad0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5779d7bf7f70cb0c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x58f52d05501e - core::fmt::write::h5a4baaff1bcd3eb5
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17
   5:     0x58f52d090ae4 - std::io::Write::write_fmt::h4bc1f301cb9e9cce
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/io/mod.rs:1684:15
   6:     0x58f52d0b5fd7 - std::sys_common::backtrace::_print::h5fcdc36060f177e8
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x58f52d0b5fd7 - std::sys_common::backtrace::print::h54ca9458b876c8bf
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x58f52d0b5d75 - std::panicking::default_hook::{{closure}}::hbe471161c7664ed6
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:271:22
   9:     0x58f52d0b635a - std::panicking::default_hook::ha3500da57aa4ac4f
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:290:9
  10:     0x58f52d0b635a - std::panicking::rust_panic_with_hook::h50c09d000dc561d2
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:692:13
  11:     0x58f52d0b6184 - std::panicking::begin_panic_handler::{{closure}}::h9e2b2176e00e0d9c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:583:13
  12:     0x58f52d0b60e6 - std::sys_common::backtrace::__rust_end_short_backtrace::h5739b8e512c09d02
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:150:18
  13:     0x58f52d0b60d1 - rust_begin_unwind
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
  14:     0x58f52cfb6d32 - core::panicking::panic_fmt::hf33a1475b4dc5c3e
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
  15:     0x58f52cfb70a2 - core::result::unwrap_failed::hdff5465d74574b44
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/result.rs:1750:5
  16:     0x58f52cfe887c - core::result::Result<T,E>::expect::h09ad2071d782a90c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/result.rs:1047:23
  17:     0x58f52cfe887c - inputmodule_control::inputmodule::simple_cmd_port::h02da7342bdc230ca
                               at /home/runner/work/inputmodule-rs/inputmodule-rs/inputmodule-control/src/inputmodule.rs:429:5
  18:     0x58f52cfe887c - inputmodule_control::inputmodule::send_col::hd125100e375920d3
                               at /home/runner/work/inputmodule-rs/inputmodule-rs/inputmodule-control/src/inputmodule.rs:518:5
  19:     0x58f52cfe887c - inputmodule_control::inputmodule::display_gray_image_cmd::hece8238746f38c60
                               at /home/runner/work/inputmodule-rs/inputmodule-rs/inputmodule-control/src/inputmodule.rs:656:9
  20:     0x58f52cfe887c - inputmodule_control::inputmodule::serial_commands::haded42d84a5f6028
                               at /home/runner/work/inputmodule-rs/inputmodule-rs/inputmodule-control/src/inputmodule.rs:203:21
  21:     0x58f52cfef147 - inputmodule_control::main::hd73c270150b5884e
                               at /home/runner/work/inputmodule-rs/inputmodule-rs/inputmodule-control/src/main.rs:63:20
  22:     0x58f52cfd18c3 - core::ops::function::FnOnce::call_once::h60cafe144945ca54
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/ops/function.rs:250:5
  23:     0x58f52cfd18c3 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf44eaa5f7d26e481
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:134:18
  24:     0x58f52d007789 - main
  25:     0x75a9dc229d90 - __libc_start_call_main
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  26:     0x75a9dc229e40 - __libc_start_main_impl
                               at ./csu/../csu/libc-start.c:392:3
  27:     0x58f52cfb9d55 - _start
  28:                0x0 - <unknown>

I am running Linux Mint 21.3, which I know isn't officially supported, but being based on Ubuntu Jammy I didn't think it would be a vast departure. Everything else I've tried works, including --image-bw, so I'm hoping the problem isn't with my machine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions