Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 6

Author Topic: SoundSense-RS: SoundSense clone, written in Rust  (Read 11302 times)

jecowa

  • Bay Watcher
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #30 on: February 19, 2020, 02:27:54 am »

Yeah, that looks sharp.
Logged

prixt

  • Bay Watcher
  • has been taken by a fey mood.
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #31 on: February 19, 2020, 09:18:18 pm »

...
Right, other dependecies :P. So far, the dependencies need are: libasound2, libgtk-3, libwebkit2gtk-4.0
There may be other dependencies hidden somewhere, but these are the libraries I had to instruct CI builders like travis and github actions to install to get it to compile.

$ dpkg -l | grep asound
ii   libasound2:amd64         1.1.9-0ubuntu1      amd64    shared library for ALSA applications
ii   libasound2:i386         1.1.9-0ubuntu1      i386    shared library for ALSA applications
ii   libasound2-data         1.1.9-0ubuntu1      all    Configuration files and profiles for ALSA drivers
ii   libasound2-plugins:amd64         1.1.9-0ubuntu1      amd64    ALSA library additional plugins
ii   libasound2-plugins:i386         1.1.9-0ubuntu1      i386    ALSA library additional plugins
Moved discussion about linux compatibility here.
Logged
SOUNDSENSE-RS - SoundSense alternative written in Rust

feelotraveller

  • Bay Watcher
  • regurgitating the world, one bite at a time
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #32 on: February 20, 2020, 01:13:29 am »

I can't get it to run on linux.  I think this is the same error jecowa had in the other thread but I'm surely out of my depth.

Full backtrace

Code: [Select]
./soundsense-rs-v1.4.4-linux
thread 'sound_thread' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:1188:5
stack backtrace:
   0:     0x5567aca30336 - backtrace::backtrace::libunwind::trace::heb43798aede8bd30
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1:     0x5567aca30336 - backtrace::backtrace::trace_unsynchronized::had2ba7dec4bd2732
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2:     0x5567aca30336 - std::sys_common::backtrace::_print_fmt::hda61f46e822731b2
                               at src/libstd/sys_common/backtrace.rs:84
   3:     0x5567aca30336 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hfe37fa5de6572965
                               at src/libstd/sys_common/backtrace.rs:61
   4:     0x5567ac9cd15c - core::fmt::write::h74887d18db27282c
                               at src/libcore/fmt/mod.rs:1025
   5:     0x5567aca2fc56 - std::io::Write::write_fmt::h6808f3d5eceed5e5
                               at src/libstd/io/mod.rs:1426
   6:     0x5567aca2f938 - std::sys_common::backtrace::_print::hcc0fd4b3552039ef
                               at src/libstd/sys_common/backtrace.rs:65
   7:     0x5567aca2f938 - std::sys_common::backtrace::print::h1c9c5c1c0505592d
                               at src/libstd/sys_common/backtrace.rs:50
   8:     0x5567aca2f938 - std::panicking::default_hook::{{closure}}::hefb6085c1ab83a59
                               at src/libstd/panicking.rs:193
   9:     0x5567aca2f2e1 - std::panicking::default_hook::h1b037d2bf0657ab3
                               at src/libstd/panicking.rs:210
  10:     0x5567aca2f2e1 - std::panicking::rust_panic_with_hook::h787d7f532b084b9a
                               at src/libstd/panicking.rs:471
  11:     0x5567aca2eead - rust_begin_unwind
                               at src/libstd/panicking.rs:375
  12:     0x5567ac9cb47d - core::panicking::panic_fmt::h76b979c035808e69
                               at src/libcore/panicking.rs:84
  13:     0x5567ac9cdba6 - core::result::unwrap_failed::hca6a012bfa3eb903
                               at src/libcore/result.rs:1188
  14:     0x5567ac99579c - core::result::Result<T,E>::unwrap::h26c7f1f119097740
  15:     0x5567ac9aeb57 - soundsense_rs::sound::sound_manager::SoundManager::new::{{closure}}::hf34f98142644c281
  16:     0x5567ac9af7ac - soundsense_rs::sound::sound_manager::SoundManager::new::visit_dir::hcd7efecf9ac2fe5b
  17:     0x5567ac9af723 - soundsense_rs::sound::sound_manager::SoundManager::new::visit_dir::hcd7efecf9ac2fe5b
  18:     0x5567ac9b4cf4 - soundsense_rs::sound::run::{{closure}}::h89aecbd80bb9d859
  19:     0x5567ac98db8a - std::sys_common::backtrace::__rust_begin_short_backtrace::h3c80febc8ed33890
  20:     0x5567ac990613 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h6367b8115e412243
  21:     0x5567aca3cbde - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h7bfd6e98bcf6c67e
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
  22:     0x5567aca3e138 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h9979661149bbc525
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
  23:     0x5567aca3e138 - std::sys_common::thread::start_thread::had0bb4166c065276
                               at src/libstd/sys_common/thread.rs:13
  24:     0x5567aca3e138 - std::sys::unix::thread::Thread::new::thread_start::hbc75223688f972da
                               at src/libstd/sys/unix/thread.rs:80
  25:     0x7ff3e7ab946f - start_thread
  26:     0x7ff3e79cf3d3 - clone
  27:                0x0 - <unknown>
Aborted (core dumped)

Does that help at all?
Logged

prixt

  • Bay Watcher
  • has been taken by a fey mood.
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #33 on: February 20, 2020, 02:15:16 am »

I can't get it to run on linux.  I think this is the same error jecowa had in the other thread but I'm surely out of my depth.

Full backtrace

Code: [Select]
./soundsense-rs-v1.4.4-linux
thread 'sound_thread' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:1188:5
stack backtrace:
   0:     0x5567aca30336 - backtrace::backtrace::libunwind::trace::heb43798aede8bd30
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1:     0x5567aca30336 - backtrace::backtrace::trace_unsynchronized::had2ba7dec4bd2732
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2:     0x5567aca30336 - std::sys_common::backtrace::_print_fmt::hda61f46e822731b2
                               at src/libstd/sys_common/backtrace.rs:84
   3:     0x5567aca30336 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hfe37fa5de6572965
                               at src/libstd/sys_common/backtrace.rs:61
   4:     0x5567ac9cd15c - core::fmt::write::h74887d18db27282c
                               at src/libcore/fmt/mod.rs:1025
   5:     0x5567aca2fc56 - std::io::Write::write_fmt::h6808f3d5eceed5e5
                               at src/libstd/io/mod.rs:1426
   6:     0x5567aca2f938 - std::sys_common::backtrace::_print::hcc0fd4b3552039ef
                               at src/libstd/sys_common/backtrace.rs:65
   7:     0x5567aca2f938 - std::sys_common::backtrace::print::h1c9c5c1c0505592d
                               at src/libstd/sys_common/backtrace.rs:50
   8:     0x5567aca2f938 - std::panicking::default_hook::{{closure}}::hefb6085c1ab83a59
                               at src/libstd/panicking.rs:193
   9:     0x5567aca2f2e1 - std::panicking::default_hook::h1b037d2bf0657ab3
                               at src/libstd/panicking.rs:210
  10:     0x5567aca2f2e1 - std::panicking::rust_panic_with_hook::h787d7f532b084b9a
                               at src/libstd/panicking.rs:471
  11:     0x5567aca2eead - rust_begin_unwind
                               at src/libstd/panicking.rs:375
  12:     0x5567ac9cb47d - core::panicking::panic_fmt::h76b979c035808e69
                               at src/libcore/panicking.rs:84
  13:     0x5567ac9cdba6 - core::result::unwrap_failed::hca6a012bfa3eb903
                               at src/libcore/result.rs:1188
  14:     0x5567ac99579c - core::result::Result<T,E>::unwrap::h26c7f1f119097740
  15:     0x5567ac9aeb57 - soundsense_rs::sound::sound_manager::SoundManager::new::{{closure}}::hf34f98142644c281
  16:     0x5567ac9af7ac - soundsense_rs::sound::sound_manager::SoundManager::new::visit_dir::hcd7efecf9ac2fe5b
  17:     0x5567ac9af723 - soundsense_rs::sound::sound_manager::SoundManager::new::visit_dir::hcd7efecf9ac2fe5b
  18:     0x5567ac9b4cf4 - soundsense_rs::sound::run::{{closure}}::h89aecbd80bb9d859
  19:     0x5567ac98db8a - std::sys_common::backtrace::__rust_begin_short_backtrace::h3c80febc8ed33890
  20:     0x5567ac990613 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h6367b8115e412243
  21:     0x5567aca3cbde - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h7bfd6e98bcf6c67e
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
  22:     0x5567aca3e138 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h9979661149bbc525
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
  23:     0x5567aca3e138 - std::sys_common::thread::start_thread::had0bb4166c065276
                               at src/libstd/sys_common/thread.rs:13
  24:     0x5567aca3e138 - std::sys::unix::thread::Thread::new::thread_start::hbc75223688f972da
                               at src/libstd/sys/unix/thread.rs:80
  25:     0x7ff3e7ab946f - start_thread
  26:     0x7ff3e79cf3d3 - clone
  27:                0x0 - <unknown>
Aborted (core dumped)

Does that help at all?

Got this error after I ran soundsense-rs on an ubuntu VM.
For some reason, the `emotion/emotion.xml` can't be read. If you remove the file or delete its contents soundsense-rs loads the pack no problem, but if you rename the file, or copy its content into another file, it fails. This is the case for both the original pack and jecowa's pack.
I have no idea why. This doesn't happen on Windows. I'm still looking into it.

However, don't think this and jecowa's error is the same. Their error is related to dependecy issue. This is... something else.
« Last Edit: February 20, 2020, 02:18:52 am by prixt »
Logged
SOUNDSENSE-RS - SoundSense alternative written in Rust

prixt

  • Bay Watcher
  • has been taken by a fey mood.
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #34 on: February 20, 2020, 03:39:57 am »

Found it! In emotion.xml, the playlist for bold voice lines is `voices/Bold.m3u`, but the actual file name is `voice/bold.m3u`.
On Windows, it ignored the case, but on Linux it borked. You should be able to fix this by editing emotion.xml accordingly.

...
Right, other dependecies :P. So far, the dependencies need are: libasound2, libgtk-3, libwebkit2gtk-4.0
There may be other dependencies hidden somewhere, but these are the libraries I had to instruct CI builders like travis and github actions to install to get it to compile.

$ dpkg -l | grep asound
ii   libasound2:amd64         1.1.9-0ubuntu1      amd64    shared library for ALSA applications
ii   libasound2:i386         1.1.9-0ubuntu1      i386    shared library for ALSA applications
ii   libasound2-data         1.1.9-0ubuntu1      all    Configuration files and profiles for ALSA drivers
ii   libasound2-plugins:amd64         1.1.9-0ubuntu1      amd64    ALSA library additional plugins
ii   libasound2-plugins:i386         1.1.9-0ubuntu1      i386    ALSA library additional plugins

I'm trying to find all the dependencies soundsense-rs needs. Give me some time.
« Last Edit: February 20, 2020, 03:43:30 am by prixt »
Logged
SOUNDSENSE-RS - SoundSense alternative written in Rust

feelotraveller

  • Bay Watcher
  • regurgitating the world, one bite at a time
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #35 on: February 20, 2020, 04:24:37 am »

Found it! In emotion.xml, the playlist for bold voice lines is `voices/Bold.m3u`, but the actual file name is `voice/bold.m3u`.
On Windows, it ignored the case, but on Linux it borked. You should be able to fix this by editing emotion.xml accordingly.

Thanks, this fixed it for me.  :)  So actually a soundpack issue...

Can't help with the dependencies since it ran for me without needing anything additional on my archlinux setup - but I already have a lot installed for other applications.

As a data point here is my ldd:

Spoiler (click to show/hide)

The names of some libraries are slightly different (e.g. libasound).

Edit: running 'objdump -p /path/to/app | grep NEEDED' gives a more concise list

Code: [Select]
  NEEDED               libwebkit2gtk-4.0.so.37
  NEEDED               libgtk-3.so.0
  NEEDED               libgdk-3.so.0
  NEEDED               libjavascriptcoregtk-4.0.so.18
  NEEDED               libgobject-2.0.so.0
  NEEDED               libglib-2.0.so.0
  NEEDED               libasound.so.2
  NEEDED               libdl.so.2
  NEEDED               librt.so.1
  NEEDED               libpthread.so.0
  NEEDED               libgcc_s.so.1
  NEEDED               libc.so.6
  NEEDED               libm.so.6


« Last Edit: February 20, 2020, 04:34:06 am by feelotraveller »
Logged

prixt

  • Bay Watcher
  • has been taken by a fey mood.
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #36 on: February 20, 2020, 08:11:51 am »

Found it! In emotion.xml, the playlist for bold voice lines is `voices/Bold.m3u`, but the actual file name is `voice/bold.m3u`.
On Windows, it ignored the case, but on Linux it borked. You should be able to fix this by editing emotion.xml accordingly.

Thanks, this fixed it for me.  :)  So actually a soundpack issue...

Can't help with the dependencies since it ran for me without needing anything additional on my archlinux setup - but I already have a lot installed for other applications.

As a data point here is my ldd:

Spoiler (click to show/hide)

The names of some libraries are slightly different (e.g. libasound).

Edit: running 'objdump -p /path/to/app | grep NEEDED' gives a more concise list

Code: [Select]
  NEEDED               libwebkit2gtk-4.0.so.37
  NEEDED               libgtk-3.so.0
  NEEDED               libgdk-3.so.0
  NEEDED               libjavascriptcoregtk-4.0.so.18
  NEEDED               libgobject-2.0.so.0
  NEEDED               libglib-2.0.so.0
  NEEDED               libasound.so.2
  NEEDED               libdl.so.2
  NEEDED               librt.so.1
  NEEDED               libpthread.so.0
  NEEDED               libgcc_s.so.1
  NEEDED               libc.so.6
  NEEDED               libm.so.6

wow those are some useful commands I didn't know about. Thank you!
Logged
SOUNDSENSE-RS - SoundSense alternative written in Rust

PeridexisErrant

  • Bay Watcher
  • Dai stihˇ, Hrasht.
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #37 on: February 20, 2020, 08:35:15 am »

Nice!  I'll add this to my pack in a future version  :D
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

prixt

  • Bay Watcher
  • has been taken by a fey mood.
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #38 on: February 20, 2020, 09:04:07 am »

Woot! Thank you for the inclusion!
Logged
SOUNDSENSE-RS - SoundSense alternative written in Rust

jecowa

  • Bay Watcher
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #39 on: February 20, 2020, 09:24:16 am »

Found it! In emotion.xml, the playlist for bold voice lines is `voices/Bold.m3u`, but the actual file name is `voice/bold.m3u`.
On Windows, it ignored the case, but on Linux it borked. You should be able to fix this by editing emotion.xml accordingly.

Thanks for the report! Macs ignore case by-default too. I used to run it in case-sensitive mode, but it caused problems with some apps.
Logged

feelotraveller

  • Bay Watcher
  • regurgitating the world, one bite at a time
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #40 on: February 21, 2020, 06:33:00 am »

I'm trying to find all the dependencies soundsense-rs needs. Give me some time.

I think you have already more or less stated them correctly.  My reasoning follows, someone can feel free to point out my mistake if I've made one  :).

The concise list I posted above contains the libraries that the soundsense-rs executable (linux 144 version) calls directly.  Working through them on my system (archlinux) gives me:

  libm, libc, libpthread, librt and libdl are provided by glibc
  libcc_s is provided by gcc-libs
  libglib-2 and libgobject-2.0 are provided by glib2

These can be be taken for granted as being present on (nearly?) all linux systems - a problem here, though rare, is likely one of version compatibility.

  libasound2 is provided by alsa-libs
  libjavascriptcregtk-4.0 and libwebkit2gtk-4.0 are provided by webkit2gtk
  libgdk-3 and libgtk-3 are provided by gtk3

Though it should be noted that these libraries could be provided by different packages (or differently named packages) on other distributions, for an arch system - and I think also debian-based systems - the dependent packages are alsa-libs, webkit2gtk and gtk3.  And that is pretty much what the intial post says.  8)



Logged

prixt

  • Bay Watcher
  • has been taken by a fey mood.
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #41 on: February 21, 2020, 07:42:45 am »

I think you have already more or less stated them correctly.  My reasoning follows, someone can feel free to point out my mistake if I've made one  :).

The concise list I posted above contains the libraries that the soundsense-rs executable (linux 144 version) calls directly.  Working through them on my system (archlinux) gives me:

  libm, libc, libpthread, librt and libdl are provided by glibc
  libcc_s is provided by gcc-libs
  libglib-2 and libgobject-2.0 are provided by glib2

These can be be taken for granted as being present on (nearly?) all linux systems - a problem here, though rare, is likely one of version compatibility.

  libasound2 is provided by alsa-libs
  libjavascriptcregtk-4.0 and libwebkit2gtk-4.0 are provided by webkit2gtk
  libgdk-3 and libgtk-3 are provided by gtk3

Though it should be noted that these libraries could be provided by different packages (or differently named packages) on other distributions, for an arch system - and I think also debian-based systems - the dependent packages are alsa-libs, webkit2gtk and gtk3.  And that is pretty much what the intial post says.  8)

Thank you for the concise list and reasonings! Just to be sure, I updated the dependency list to include libgdk-3 and libjavascriptcregtk-4.0.
Logged
SOUNDSENSE-RS - SoundSense alternative written in Rust

Nopenope

  • Bay Watcher
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #42 on: February 21, 2020, 07:58:13 am »

I'm interested to try this instead of the traditional soundsense. Does it support the extra gamelog events from DFHack?
Logged

prixt

  • Bay Watcher
  • has been taken by a fey mood.
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #43 on: February 21, 2020, 08:01:04 am »

I'm interested to try this instead of the traditional soundsense. Does it support the extra gamelog events from DFHack?
As long as the soundpack you're using includes dfhack patterns, sure! I've been using it with the Windows Starter Pack, and it works with no problems.
Logged
SOUNDSENSE-RS - SoundSense alternative written in Rust

thurin

  • Bay Watcher
    • View Profile
Re: SoundSense-RS: SoundSense clone, written in Rust
« Reply #44 on: February 27, 2020, 12:46:23 am »

I'm having an issue on both windows and macos where soundsense-rs is grabbing 100% of a cpu core.  Is this unique to me or is anyone else also experiencing?

Any info I can provide to try and track the issue down?
Logged
Pages: 1 2 [3] 4 5 6