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

Soulvaki lib panic Windows #93

Closed
brian6932 opened this issue Oct 26, 2022 · 8 comments
Closed

Soulvaki lib panic Windows #93

brian6932 opened this issue Oct 26, 2022 · 8 comments

Comments

@brian6932
Copy link

brian6932 commented Oct 26, 2022

I'm not sure how to do this on my end, is it possible to cargo install with some build flag?
Either way the Windows bins are literally unusable the moment.

❯ termusic
thread 'main' panicked at 'Windows media controls require an HWND in MediaControlsOptions.', C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\souvlaki-0.5.2\src\platform\windows\mod.rs:50:14
stack backtrace:
   0:     0x7ff7607e69af - <unknown>
   1:     0x7ff76080b65a - <unknown>
   2:     0x7ff7607de109 - <unknown>
   3:     0x7ff7607e965b - <unknown>
   4:     0x7ff7607e92d5 - <unknown>
   5:     0x7ff7607e9c09 - <unknown>
   6:     0x7ff7607e9b0d - <unknown>
   7:     0x7ff7607e75e7 - <unknown>
   8:     0x7ff7607e97e9 - <unknown>
   9:     0x7ff76097e535 - <unknown>
  10:     0x7ff760808d30 - <unknown>
  11:     0x7ff760808cdb - <unknown>
  12:     0x7ff76097e389 - <unknown>
  13:     0x7ff76036d8a4 - <unknown>
  14:     0x7ff7601654a3 - <unknown>
  15:     0x7ff760112c76 - <unknown>
  16:     0x7ff7602b54bb - <unknown>
  17:     0x7ff76014d4d6 - <unknown>
  18:     0x7ff7600a8750 - <unknown>
  19:     0x7ff7607d61cb - <unknown>
  20:     0x7ff7602b6317 - <unknown>
  21:     0x7ff7609600bc - <unknown>
  22:     0x7ffa5c14117e - BaseThreadInitThunk
  23:     0x7ffa5dfe42db - RtlUserThreadStart

Termusic version is: 0.7.5
https://github.com/Sinono3/souvlaki/blob/master/src/platform/windows/mod.rs#L50

@tramhao
Copy link
Owner

tramhao commented Oct 27, 2022

For windows, the binary is not tested. I need to figure out a way to test. Sorry for the problem.

@tramhao
Copy link
Owner

tramhao commented Oct 27, 2022

If you could compile under real windows, it'll be very helpful to diagnose the problem.

@tramhao
Copy link
Owner

tramhao commented Oct 27, 2022

a simple option is to disable mpris feature for windows, you can build with cargo build --release to check if the minimal version works or not.

@brian6932
Copy link
Author

Sure

@brian6932
Copy link
Author

brian6932 commented Oct 27, 2022

Ok it works, I found that setting a media path the program didn't like causes the following panic:

panic
thread 'main' panicked at 'byte index 18446744073709551615 is out of bounds of ``', library\core\src\str\mod.rs:107:9
stack backtrace:
   0:     0x7ff6fa13ca1f - std::backtrace_rs::backtrace::dbghelp::trace
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98
   1:     0x7ff6fa13ca1f - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ff6fa13ca1f - std::sys_common::backtrace::_print_fmt
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\sys_common\backtrace.rs:66
   3:     0x7ff6fa13ca1f - std::sys_common::backtrace::_print::impl$0::fmt
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\sys_common\backtrace.rs:45
   4:     0x7ff6fa1619ca - core::fmt::write
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src\fmt\mod.rs:1197
   5:     0x7ff6fa133eb9 - std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\io\mod.rs:1672
   6:     0x7ff6fa13f6bb - std::sys_common::backtrace::_print
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\sys_common\backtrace.rs:48
   7:     0x7ff6fa13f6bb - std::sys_common::backtrace::print
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\sys_common\backtrace.rs:35
   8:     0x7ff6fa13f6bb - std::panicking::default_hook::closure$1
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:295
   9:     0x7ff6fa13f33b - std::panicking::default_hook
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:314
  10:     0x7ff6fa13fc69 - std::panicking::rust_panic_with_hook
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:698
  11:     0x7ff6fa13fb6d - std::panicking::begin_panic_handler::closure$0
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:588
  12:     0x7ff6fa13d657 - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\sys_common\backtrace.rs:138
  13:     0x7ff6fa13f849 - std::panicking::begin_panic_handler
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:584
  14:     0x7ff6fa2c64c5 - core::panicking::panic_fmt
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src\panicking.rs:142
  15:     0x7ff6fa164f08 - core::str::slice_error_fail_rt
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src\str\mod.rs:107
  16:     0x7ff6fa159ac9 - core::ops::function::FnOnce::call_once<never$ (*)(str,usize,usize),tuple$<str,usize,usize> >
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src\ops\function.rs:248
  17:     0x7ff6fa15e81b - core::intrinsics::const_eval_select<tuple$<str,usize,usize>,never$ (*)(str,usize,usize),never$ (*)(str,usize,usize),never$>
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src\intrinsics.rs:2376
  18:     0x7ff6fa2c6752 - core::str::slice_error_fail
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src\str\mod.rs:86
  19:     0x7ff6f9c63f82 - termusic::ui::components::config_editor::general::MusicDir::new::h4e9045c8dfe11413
  20:     0x7ff6f9ab800e - termusic::ui::components::config_editor::view::<impl termusic::ui::model::Model>::view_config_editor_commons::h6ef5eb057c508992
  21:     0x7ff6f9ab7207 - core::ptr::drop_in_place<std::sync::mpsc::Receiver<alloc::vec::Vec<termusic::songtag::SongTag>>>::h9dece6e67e682e69
  22:     0x7ff6f9ad4173 - termusic::ui::model::update::<impl tuirealm::core::Update<termusic::ui::Msg> for termusic::ui::model::Model>::update::h22b0edd9e5a06f8f
  23:     0x7ff6f9cca8a3 - termusic::ui::UI::run::hdbac4b514f06c070
  24:     0x7ff6f9c6bdb8 - <termusic::ui::components::tag_editor::te_select_lyric::TESelectLyric as tuirealm::core::component::Component<termusic::ui::Msg,tuirealm::core::event::NoUserEvent>>::on::he5b5220bcc95e753
  25:     0x7ff6f9b42d06 - std::sys_common::backtrace::__rust_begin_short_backtrace::h5d9fdc6d9aee1135
  26:     0x7ff6f9a7a940 - std::rt::lang_start::{{closure}}::h67dfc54b0275ca67
  27:     0x7ff6fa12c181 - core::ops::function::impls::impl$2::call_once
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src\ops\function.rs:280
  28:     0x7ff6fa12c181 - std::panicking::try::do_call
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:492
  29:     0x7ff6fa12c181 - std::panicking::try
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:456
  30:     0x7ff6fa12c181 - std::panic::catch_unwind
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panic.rs:137
  31:     0x7ff6fa12c181 - std::rt::lang_start_internal::closure$2
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\rt.rs:128
  32:     0x7ff6fa12c181 - std::panicking::try::do_call
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:492
  33:     0x7ff6fa12c181 - std::panicking::try
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:456
  34:     0x7ff6fa12c181 - std::panic::catch_unwind
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panic.rs:137
  35:     0x7ff6fa12c181 - std::rt::lang_start_internal
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\rt.rs:128
  36:     0x7ff6f9c6e447 - main
  37:     0x7ff6fa2aa63c - invoke_main
                               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  38:     0x7ff6fa2aa63c - __scrt_common_main_seh
                               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  39:     0x7ffc8272117e - BaseThreadInitThunk
  40:     0x7ffc833642db - RtlUserThreadStart

Deleting ~\Appdata\Roaming\termusic\config.toml fixes the issue tho

One other thing I found was that you can't set the global pause/play media key to Pause Toggle in Keys Global

@tramhao
Copy link
Owner

tramhao commented Dec 22, 2022

About pause toggle, it's actually an empty space in the configuration. Maybe I should display it as space.

@hasezoey
Copy link
Contributor

is this still a issue with windows? because the github CI for windows seems to build and test fine (though it does not actually run the full program)

@brian6932
Copy link
Author

Just tested, no longer an issue

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

3 participants