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

index out of bounds #140

Open
Konfekt opened this issue May 3, 2024 · 2 comments
Open

index out of bounds #140

Konfekt opened this issue May 3, 2024 · 2 comments

Comments

@Konfekt
Copy link

Konfekt commented May 3, 2024

This tool is really useful, thank you. I am not sure where this error comes from. This is on Opensuse 15.5 with display_switch 1.2.0 due to glibc dependencies:

RUST_BACKTRACE=full display_switch 

09:22:22 [INFO] Configuration loaded ("/home/konfekt/.config/display-switch/display-switch.ini"): Configuration { usb_device: "1a40:0101", default_input_sources: InputSources { on_usb_connect: Some(Hdmi1(0x11)), on_usb_disconnect: Some(DisplayPort1(0xf)), on_usb_connect_execute: None, on_usb_disconnect_execute: None }, monitor1: None, monitor2: None, monitor3: None, monitor4: None, monitor5: None, monitor6: None }
09:22:22 [ERROR] Failed to get current input for display 'DEL DELL U2719D BRK47R2 #1': DDC/CI I2C error: Remote I/O error (os error 121)
thread 'main' panicked at 'index out of bounds: the len is 11 but the index is 11', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/ddc-i2c-0.2.1/src/lib.rs:193:12
stack backtrace:
   0:     0x563f1232fb1d - std::backtrace_rs::backtrace::libunwind::trace::h8217d0a8f3fd2f41
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x563f1232fb1d - std::backtrace_rs::backtrace::trace_unsynchronized::h308103876b3af410
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x563f1232fb1d - std::sys_common::backtrace::_print_fmt::hc208018c6153605e
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x563f1232fb1d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf89a7ed694dfb585
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x563f123544ac - core::fmt::write::h21038c1382fe4264
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/fmt/mod.rs:1197:17
   5:     0x563f1232c711 - std::io::Write::write_fmt::h7dbb1c9a3c254aef
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/io/mod.rs:1672:15
   6:     0x563f12331295 - std::sys_common::backtrace::_print::h4e8889719c9ddeb8
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x563f12331295 - std::sys_common::backtrace::print::h1506fe2cb3022667
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x563f12331295 - std::panicking::default_hook::{{closure}}::hd9d7ce2a8a782440
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:295:22
   9:     0x563f12330fb6 - std::panicking::default_hook::h5b16ec25444b1b5d
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:314:9
  10:     0x563f12331826 - std::panicking::rust_panic_with_hook::hb0138cb6e6fea3e4
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:698:17
  11:     0x563f12331717 - std::panicking::begin_panic_handler::{{closure}}::h4cb67095557cd1aa
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:588:13
  12:     0x563f1232ffd4 - std::sys_common::backtrace::__rust_end_short_backtrace::h2bfcac279dcdc911
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:138:18
  13:     0x563f12331449 - rust_begin_unwind
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
  14:     0x563f122b9e63 - core::panicking::panic_fmt::h1de71520faaa17d3
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
  15:     0x563f122b9da2 - core::panicking::panic_bounds_check::hfef1f84c4a547e72
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:84:5
  16:     0x563f1230afd2 - <ddc_i2c::I2cDdc<I> as ddc::DdcCommandRaw>::execute_raw::h41ca83617045809a
  17:     0x563f1230a392 - <D as ddc::Ddc>::get_vcp_feature::he5bfc331b08c94d9
  18:     0x563f12307fc0 - <ddc_hi::Handle as ddc::Ddc>::get_vcp_feature::hd8a5fbe5b2b823a5
  19:     0x563f122d0802 - display_switch::display_control::log_current_source::h486a2e84e0390f2e
  20:     0x563f122d8e04 - display_switch::app::App::run::h3b0265400dc23518
  21:     0x563f122cd687 - display_switch::main::hff032dbeee256484
  22:     0x563f122be353 - std::sys_common::backtrace::__rust_begin_short_backtrace::h7b449f31faecdb52
  23:     0x563f122c26cd - std::rt::lang_start::{{closure}}::h0909be8c9da73720
  24:     0x563f1232721e - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h4937aaa125c8d4b2
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:280:13
  25:     0x563f1232721e - std::panicking::try::do_call::h6f5c70e8b0a34f92
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40
  26:     0x563f1232721e - std::panicking::try::h68766ba264ecf2e2
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19
  27:     0x563f1232721e - std::panic::catch_unwind::hc36033d2f9cc04af
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14
  28:     0x563f1232721e - std::rt::lang_start_internal::{{closure}}::h78c037f4a1a28ded
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:128:48
  29:     0x563f1232721e - std::panicking::try::do_call::he6e1fffda4c750ee
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40
  30:     0x563f1232721e - std::panicking::try::h48a77ddbb2f4c87a
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19
  31:     0x563f1232721e - std::panic::catch_unwind::hfa809b06a550a9e7
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14
  32:     0x563f1232721e - std::rt::lang_start_internal::h4db69ed48eaca005
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:128:20
  33:     0x563f122cd7d2 - main
  34:     0x7f908ac8c24d - __libc_start_main
  35:     0x563f122ba0be - _start
  36:                0x0 - <unknown>
@Konfekt
Copy link
Author

Konfekt commented May 4, 2024

This is not an issue with the latest release on Ubuntu for the same screen

@Konfekt
Copy link
Author

Konfekt commented May 5, 2024

However, on latest Opensuse Leap after building latest master the issue persists:


07:56:11 [INFO] Configuration loaded ("/home/konfekt/.config/display-switch/display-switch.ini"): Configuration { usb_device: "1a40:0101", default_input_sources: InputSources { on_usb_connect: Some(Hdmi1(0x11)), on_usb_disconnect: Some(DisplayPort1(0xf)), on_usb_connect_execute: None, on_usb_disconnect_execute: None }, monitor1: None, monitor2: None, monitor3: None, monitor4: None, monitor5: None, monitor6: None }
07:56:11 [ERROR] Failed to get current input for display 'DEL DELL U2719D BRK47R2 #1': DDC/CI I2C error: Remote I/O error (os error 121)
thread 'main' panicked at /home/konfekt/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ddc-i2c-0.2.2/src/lib.rs:194:12:
index out of bounds: the len is 11 but the index is 11
stack backtrace:
   0:     0x55d09e7a4a47 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3a3e14066d08445b
   1:     0x55d09e7dd780 - core::fmt::write::h635b969b0c73ca1c
   2:     0x55d09e7af79f - std::io::Write::write_fmt::h32a392dc332161f1
   3:     0x55d09e7a4814 - std::sys_common::backtrace::print::haebafeedddb3c231
   4:     0x55d09e7a551a - std::panicking::default_hook::{{closure}}::hbe6b35352e97edda
   5:     0x55d09e7a5232 - std::panicking::default_hook::ha3d28f6760dc7873
   6:     0x55d09e7a5a28 - std::panicking::rust_panic_with_hook::hbe5a76d502748239
   7:     0x55d09e7a590a - std::panicking::begin_panic_handler::{{closure}}::h4d6ed894446a10f5
   8:     0x55d09e7a4c76 - std::sys_common::backtrace::__rust_end_short_backtrace::h5a53e39732234b5b
   9:     0x55d09e7a5654 - rust_begin_unwind
  10:     0x55d09e624955 - core::panicking::panic_fmt::h09f37a9c2cf6ceee
  11:     0x55d09e624b32 - core::panicking::panic_bounds_check::h44378b56e4bac3cd
  12:     0x55d09e7412fe - <ddc_i2c::I2cDdc<I> as ddc::DdcCommandRaw>::execute_raw::ha01dd50799f262ff
                               at /home/konfekt/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ddc-i2c-0.2.2/src/lib.rs:194:12
  13:     0x55d09e73ed28 - <D as ddc::DdcCommand>::execute::h5f9c711e7491527c
                               at /home/konfekt/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ddc-0.2.2/src/lib.rs:271:13
  14:     0x55d09e73e8e8 - <D as ddc::Ddc>::get_vcp_feature::hd26d1618930475af
                               at /home/konfekt/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ddc-0.2.2/src/lib.rs:213:3
  15:     0x55d09e743ccc - <ddc_hi::Handle as ddc::Ddc>::get_vcp_feature::hedbcf612f689bcb6
                               at /home/konfekt/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ddc-hi-0.4.1/src/lib.rs:564:38
  16:     0x55d09e66e18a - display_switch::display_control::log_current_source::he6b5110e91d4327c
                               at /home/konfekt/Downloads/display-switch/src/display_control.rs:100:15
  17:     0x55d09e699d11 - display_switch::app::App::run::hca9fe9d6043f10e5
                               at /home/konfekt/Downloads/display-switch/src/app.rs:49:9
  18:     0x55d09e636fd6 - display_switch::main::hf4e0259fa859e3da
                               at /home/konfekt/Downloads/display-switch/src/main.rs:43:5
  19:     0x55d09e630efb - core::ops::function::FnOnce::call_once::h5fbb8bbbcdb794d4
                               at /home/abuild/rpmbuild/BUILD/rustc-1.77.0-src/library/core/src/ops/function.rs:250:5
  20:     0x55d09e66946e - std::sys_common::backtrace::__rust_begin_short_backtrace::h266c0382a840cfda
                               at /home/abuild/rpmbuild/BUILD/rustc-1.77.0-src/library/std/src/sys_common/backtrace.rs:155:18
  21:     0x55d09e625fd1 - std::rt::lang_start::{{closure}}::h076bb12082621267
                               at /home/abuild/rpmbuild/BUILD/rustc-1.77.0-src/library/std/src/rt.rs:166:18
  22:     0x55d09e7a5554 - std::panicking::try::hc5e5e383d6239b2d
  23:     0x55d09e7c0f3b - std::rt::lang_start_internal::h84480a904ea3543b
  24:     0x55d09e625faa - std::rt::lang_start::h9057fa19dab2a8b2
                               at /home/abuild/rpmbuild/BUILD/rustc-1.77.0-src/library/std/src/rt.rs:165:17
  25:     0x55d09e63713e - main
  26:     0x7fd014a7024d - __libc_start_main
  27:     0x55d09e624fca - _start
                               at /home/abuild/rpmbuild/BUILD/glibc-2.31/csu/../sysdeps/x86_64/start.S:120
  28:                0x0 - <unknown>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant