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

Crashing during Scan #496

Closed
epoupon opened this issue Jul 14, 2024 Discussed in #495 · 44 comments
Closed

Crashing during Scan #496

epoupon opened this issue Jul 14, 2024 Discussed in #495 · 44 comments
Labels
Milestone

Comments

@epoupon
Copy link
Owner

epoupon commented Jul 14, 2024

Discussed in #495

Originally posted by Bigmack3000 July 14, 2024
I don't know if this is the right place to ask, but can someone help with why LMS keeps crashing during scanning? These are the errors that pop up:

terminate called after throwing an instance of 'Wt::Dbo::NoUniqueResultException'
and
what(): Query: resultValue(): more than one result

any ideas? I have the logs, if it would help to post them

@epoupon
Copy link
Owner Author

epoupon commented Jul 14, 2024

@Bigmack3000 there is a logic error somewhere in lms, this is an issue that must be fixed.
Logs in debug mode would help (see

log-min-severity = "info";
)
Showing the last queries would help too (see
db-show-queries = false;
), note queries are not output in the log file but on stdout.

Can you remember what triggered this crash?
Was it crashing just after a lms update? The second time you scaned maybe? After adding some songs?

@epoupon epoupon added the bug label Jul 14, 2024
@Bigmack3000
Copy link

Hey, I just installed this on my synology today. This was during my first scan. It was a large libary, over 200k songs, so I don't know if that was part of the issue. I've included the logs here. If there's a specific way to get debugging logs, I can scan it again to get those as well.
LMS (2).csv

@epoupon
Copy link
Owner Author

epoupon commented Jul 14, 2024

Thanks! I am not sure debug logs would help, I think showing queries is the way to go.
You have to copy/paste the default lms.conf file, and edit the db-show-queries entry to put it to true.
Then you can paste the file in the mounted volume (where lms stores the db) and run the image with the path of the file as first parameter (something like /var/lms/lms.conf)

@Bigmack3000
Copy link

any ideas on how i get to those files on a synology?

@Bigmack3000
Copy link

I've been talking to synology help for a bit now. I'm sorry, I cannot figure out on my own how to access these files. And they couldn't find that directory either.

@epoupon
Copy link
Owner Author

epoupon commented Jul 14, 2024

Ok I will make a test image for you, but you will have to wait for a week. I will keep you updated!

@Bigmack3000
Copy link

ok great. Thanks!

@Bigmack3000
Copy link

i followed the steps here:
https://drfrankenstein.co.uk/category/plex-7-2/

to properly set up a restricted user for docker containers. I'm still having the same error pop up when scanning my library.
I was able to finally find the conf file, but it is "read only" because of the restricted docker usr the container runs under.

@epoupon
Copy link
Owner Author

epoupon commented Jul 20, 2024

Don't worry, I will craft you a docker image soon. Do you know the arch of your nas? (What is the model?)

@Bigmack3000
Copy link

the nas is a DS1618+. Synology says the package arch is Denverton.

@epoupon
Copy link
Owner Author

epoupon commented Jul 21, 2024

Can you please test with epoupon/lms:7befa739 and paste the output?

@Bigmack3000
Copy link

Hey I'm getting the same error messages. I'm trying to post the logs here, but it's over the size limit. One scan created a log that's 600+pages. the previous logs were just a few pages.

@Bigmack3000
Copy link

lms1.csv.zip

i zipped the file and included it here.

@epoupon
Copy link
Owner Author

epoupon commented Jul 22, 2024

Thanks!
Unfortunately, this is not enough for me to understand :(
Can you please test again with epoupon/lms:27eae19b ?
No need to put everything, you can stop a few hundred lines below the terminate called after throwing an instance of 'Wt::Dbo::NoUniqueResultException' line

@Bigmack3000
Copy link

Ok. the error hit again on that one. attached is an excerpt from the log.
lms log excerpt.pdf

@epoupon
Copy link
Owner Author

epoupon commented Jul 22, 2024

Ok thanks, now I see the problem.
This is because you have many genres in one single value, separated with ;
I will make a patch to fix this, because lms should handle this without crashing, but you may workaround this issue by specifying ; separator in the tags here:
image
in
image

@Bigmack3000
Copy link

that fixed it! thank you!

@Bigmack3000
Copy link

ok, so all of the songs are scanning now. My next question would be, why are a lot of albums missing artwork if I know they have it?

@epoupon
Copy link
Owner Author

epoupon commented Jul 23, 2024

Are the image embedded into audio files? Is there an external cover image?

@Bigmack3000
Copy link

That seems to be it. Every file has an album cover embedded in it through picard. But the database is shared with emby, which seperetly downloaded pictures and stored them in the album folders for most albums. LMS seems to be defaulting to the downloaded pictures and then ignoring the embedded ones. Because a lot of albums are displaying a "back of cd" photo instead of the cover. Is there a away to have lms only read embedded covers?

@epoupon
Copy link
Owner Author

epoupon commented Jul 23, 2024

Lms reads both embedded and external covers.
Can you please send me a file so that I test on my side? You can mail @ tmp49-tmp49@yahoo.com

@Bigmack3000
Copy link

files sent. Thanks!

@epoupon
Copy link
Owner Author

epoupon commented Jul 24, 2024

Ah, this is aiff files. Indeed embedded images are not detected for this file format: will see to fix this.
For the back.jpg file, this is because for now LMS picks extern files before fallbacking to embedded covers, will change this to make it configurable, and have a better default behavior.

BTW, your tagger puts multi valued tags using ; separator.
If you use picard, you should better switch to v2.4 for Id3 tags
image

@Bigmack3000
Copy link

Ok, thanks. I'll update my picard. What should be used to separate tags?

Getting images out of aiff files would be great, like emby. Also having embedded images as the default.

Were you able to look at the other files i had attached? About multi artists bot showing up under songs in symfonium?

Thanks!

@epoupon
Copy link
Owner Author

epoupon commented Jul 24, 2024

Ok, thanks. I'll update my picard. What should be used to separate tags?

You don't need to specify a separator, as id3 v2.4 supports multi-valued tags

Were you able to look at the other files i had attached? About multi artists bot showing up under songs in symfonium?

I don't see something particular in these files, except you should also tick this:
image

@Bigmack3000
Copy link

So, when the files are loaded into symfonium through emby, the multi artist tags are displayed properly, like this:

Screenshot_20240724_192439

But when they're loaded through LMS, I'm not getting the secondary artists to show up:

Screenshot_20240724_192636

The files are tagged properly. I'm not sure what setting to change to get it.

Also, entire categories, like record labels, come up empty:

Screenshot_20240724_192716

@Bigmack3000
Copy link

It's interesting because it is reading the multi artist tags from LMS:

Screenshot_20240724_224109

It just isn't displaying them with the songs. The way it does for other providers.

@Tolriq
Copy link

Tolriq commented Jul 25, 2024

LMS does not support record labels yet.

The artist displayed under the songs is the display artist value that LMS returns, if you mix single value and multi value then it gives this.

@epoupon can explain how he generate the field

@Bigmack3000
Copy link

Bigmack3000 commented Jul 25, 2024

LMS does not support record labels yet.

oh, ok. I saw the "Record Labels" option in Symfonium and went off that.

For the multi-artists, here's the tags for the song above:

Screen Shot 2024-07-25 at 3 19 19 AM

So I'm guessing Emby reads the "Artists" tag for display purposes, and LMS is only reading the "Artist" tag?

@epoupon
Copy link
Owner Author

epoupon commented Jul 25, 2024

Oh, I forgot to add the record label, will add this.

@Bigmack3000 looks like I don't have the album you show, can you please send it to me so that I can have a look?

@Bigmack3000
Copy link

Ok, I've emailed the album over.

@epoupon
Copy link
Owner Author

epoupon commented Jul 26, 2024

Ok, LMS first tries to get the artists in the ARTISTS tag. Here this tag contains multiple values, separated by ; . By default LMS does not try to split, you either have to retag using id3 v2.4 or manually split LMS side here:
image

Then it considers the "nice" display artist string is set in the ARTIST tag. Here for some reason you just have "Kendrick Lamar".

Using picard on your album, I get this for the artist tag: "Kendrick Lamar ft. Bilal, Anna Wise, & Snoop Dogg"
And that displays like this in LMS:
image

@Bigmack3000
Copy link

I do have that option set up in LMS:

Screen Shot 2024-07-26 at 10 47 08 AM

And you can see above when it's read through emby that all of the artists are visible under each song in Symfonium.
LMS is reading the extra artists, I would just love for it to display them the same way.

@epoupon
Copy link
Owner Author

epoupon commented Jul 26, 2024

Yes, it solves the split issue, but not the "display artist" issue:

Then it considers the "nice" display artist string is set in the ARTIST tag. Here for some reason you just have "Kendrick Lamar".

Did you tag with picard?

@Bigmack3000
Copy link

yea everything in my library was tagged with picard.

Does LMS read the "artists" tag as well for display?

@epoupon
Copy link
Owner Author

epoupon commented Jul 27, 2024

yea everything in my library was tagged with picard.

Does LMS read the "artists" tag as well for display?

No since it expects it to be a multi-valued tag, containing all track artists, but with no join strings

@epoupon
Copy link
Owner Author

epoupon commented Jul 27, 2024

But I still wonder why I don't get the same tags as you.
Even on the web interface of the release: https://musicbrainz.org/release/88ab7a5c-fd27-421e-85f0-f107ed86a43f , the 4rth track's title is "Institutionalized", not "Institutionalized feat. etc."

I don't find any relevant option in picard to get the same result as you

@Bigmack3000
Copy link

There's a plugin for picard that puts feat artists in the track title. But the song title itself should have no effect on the artists being displayed underneath, right? The artists tag itself is tagged properly, no? It has the track artist and the featured artists all listed, and they match the order of the mbid artist tags.

I think if LMS just displayed the artists tag it would fix the problem

@epoupon
Copy link
Owner Author

epoupon commented Jul 27, 2024

Ah, maybe this plugin also keeps a single artist in the artist tag then? Not sure to understand the benefit of this plugin (why repeating the artists in the title, since it is already properly encoded in the artist and artists tag? (see my last screenshot using a vanilla picard)

Anyway, it would fix the display artist problem for this plugin, but unfortunately it would break all the other use cases.

@epoupon epoupon added this to the v3.56.0 milestone Jul 27, 2024
@Bigmack3000
Copy link

Sorry, I'm getting a little confused. I'm referring to these two tags:

Screenshot_20240727_120202_Chrome

I use the plug in because i just like having the feat artists listed in the song title. But the song title should have no affect on anything else. However, if i didn't use the plugin, the artist tag would read "Kendrick Lamar fts. Xyz" and that xyz would change for every artist.

Most apps (like emby) would then unfortunately treat every variation as a new artist because the artist tag was different for all of them. The way i do it. "Kendrick Lamarr" is a uniform artist tag. Then the "artists" tag lists kendrick lamarr and everyone featured on the song

Then the mbid artist tag lists all the mbids connecting to everyone in the artist tag.

Putting every feat artist in the regular "artist" tag ends up breaking a lot of other apps.

LMS, i think, is already reading the "artists" tag because if i click more options to a song, I can go to any of the feat artist pages.

It would just help immensely if LMS could have the option display the "artists" tag under a song title. So i could see everyone in it without clicking more options.

@epoupon
Copy link
Owner Author

epoupon commented Jul 27, 2024

I use the plug in because i just like having the feat artists listed in the song title. But the song title should have no affect on anything else. However, if i didn't use the plugin, the artist tag would read "Kendrick Lamar fts. Xyz" and that xyz would change for every artist.

Does the plugin affect the artist tag or did you chose to erase the artist tag yourself? You are right, LMS already parses artists using the artists tags, it also already extracts the corresponding mbids in the music brainz artist id tag.

Now, as picard puts a string with "nice" joins on the artist tag, LMS uses it to display this:
image

Basically, what you want is an option to ignore this artist tag and always reconstruct the artist display name from the list in the artists tag. This could be added, but this will not likely be the default behavior.

@Bigmack3000
Copy link

Does the plugin affect the artist tag or did you chose to erase the artist tag yourself? You are right, LMS already parses artists using the artists tags, it also already extracts the corresponding mbids in the music brainz artist id tag.

If an artist has feat or ft in it, the plugin moves everything after that to the song title so the artist tag is uniform throughout. If its "&" "/" or anything like that, everything stays as is.

Basically, what you want is an option to ignore this artist tag and always reconstruct the artist display name from the list in the artists tag. This could be added, but this will not likely be the default behavior.

It sounds like that would solve the issue. I guess when there's an "artists" tag, the artist tag becomes redundant. But i think it organizes it well.

@Bigmack3000
Copy link

Hey, just curious if the "featured artist" part of this was figured out yet? Thanks!

@epoupon
Copy link
Owner Author

epoupon commented Sep 28, 2024

Hello!
If I remember your problem correctly, you wanted all the track artists be displayed on Symfonium?
With the latest changes in 3.58, I think it should be ok.

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

No branches or pull requests

3 participants