Polochon-street / blissify-rs

bliss bindings for MPD.
30 stars 6 forks source link

Keeps crashing on initial scan #74

Open iconoclasthero opened 2 months ago

iconoclasthero commented 2 months ago

It seems to keep stopping with:

[2024-09-19T17:08:07Z WARN  bliss_audio::temporal] Set tempo value to zero because no beats were found.
Error: error happened with the music library provider - NOT NULL constraint failed: feature.feature

I don't see errors documented anywhere.

I've gotten 2325/68000 songs finished.

Do I do update or init or rescan or what now?

iconoclasthero commented 2 months ago
[2024-09-20T12:12:29Z WARN  bliss_audio::song::decoder::ffmpeg] error while decoding file '/library/music/99-reggae/Pe
ter Tosh/Peter Tosh & Bob Marley -- Wisdom (1998) (mp3)/02-01 - Bob Marley & The Wailers -- More Axe.m4a': Invalid dat
a found when processing input
[2024-09-20T12:12:29Z WARN  bliss_audio::song::decoder::ffmpeg] error while decoding file '/library/music/99-reggae/Pe
ter Tosh/Peter Tosh & Bob Marley -- Wisdom (1998) (mp3)/02-01 - Bob Marley & The Wailers -- More Axe.m4a': Invalid dat
a found when processing input
[2024-09-20T12:12:29Z WARN  bliss_audio::temporal] Set tempo value to zero because no beats were found.
thread '<unnamed>' panicked at /home/$USER/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bliss-audio-0.9.1/src
/song/decoder.rs:278:61:
called `Result::unwrap()` on an `Err` value: SendError { .. }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: error happened with the music library provider - NOT NULL constraint failed: feature.feature
iconoclasthero commented 2 months ago

So the program keeps crashing. I've gotten through 2/3 of the database, but a couple of things I've noted. I was watching the progress by a tally of songs processed (watch blissify --list-db\|wc -l) and would occasionally see segmentation faults reported back from that.

Also, blissify would stall out and just leave all of my enlisted cores pegged doing something.

toofar commented 2 months ago

error while decoding file ... m4a

Oh, I might have had that issue too. I just stopped it from processing m4a files, since I don't have many of them :slightly_smiling_face: You can exclude files based on name by adding lines here like:

diff --git a/src/main.rs b/src/main.rs
index 4289c8389549..38ab56e71c04 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -631,6 +632,8 @@ impl MPDLibrary {
                                 .unwrap(),
                         )
                     })
+                    .filter(|s| !s.ends_with("mp4"))
+                    .filter(|s| !s.ends_with("m4a"))
                     .collect::<Vec<String>>(),
             );
             index += chunk_size;

Regarding segfaults, you can try applying this patch that I was too lazy to raise upstream. That's a patch to the bliss-rs library, not this repo. But you can just check that out and change the bliss-audio line in Cargo.toml to bliss-audio = { "path"="../bliss-rs" } to use a local checkout of that.

Polochon-street commented 2 months ago

hi! Fixing segfaults / errors that prevent the database from initializing is my utmost priority, but it's difficult for me to reproduce that one. Would it be possible for you to run blissify init /path/to/library --number-cores 1 and see if it consistently fails on the same song? If so, could you send me the song for further investigation? @toofar, I'm also interested in any failing .m4a file - I have none in my library, but I faintly remember something failing with those, and it would be nice to fix this once and for all :)

Polochon-street commented 1 month ago

Hi, Any news on this?