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

Nuclear freezes (with electron glitches) when refreshing the large local library #745

Closed
mYnDstrEAm opened this issue Jul 23, 2020 · 6 comments
Labels
bug This issue identifies a bug in Nuclear.

Comments

@mYnDstrEAm
Copy link

mYnDstrEAm commented Jul 23, 2020

When clicking on the refresh button in Local Library after successfully having folders with many files Nuclear often freezes with glitches. Sometimes it works. I think this is because the local library is large.

Here is an exemplary screenshot of parts of Nuclear when it freezes.

Then, if one closes nuclear (the close button in the upper right still works sometimes and if not one can right click the tab->Close) it does not shut down nuclear entirely: 2 of 3 nuclear processes remain running.

Furthermore, it did not detect a .wav file I recently placed in one of the folders of the Local Library. But that might be a separate issue.
I tried playing the file from within the folder that was added to the Local Library during the library scan by Nuclear and it had errors so it didn't play. I copied the file in another time (to replace the file with the same filesize) and the refresh went through and the file can get played from within the folder. But it does not show up in the search results. I also removed the folder where the file is located in and added it again and then pressed refresh with the same result.
Then I removed a mp3 file from one of the folders of the local library, did a refresh but it still shows up in the search results (and can't get played).

Sometimes Nuclear does not freeze when these glitches occur after refreshing the local library. The newly added .wav file was detected but after refreshing (not during) it still had errors when trying to play it with another audio player.

I did some further experimentation and the file does still play with the mpv Media Player, but not the VLC player even though the same file in another folder, that is not part of the Local Library, can still be played with the VLC player (it only gets these errors with the file in the local library folder after refreshing the local library). Update: the file not playing anymore seems to be related to firejail. It's strange that I can play files with right click->Open with->VLC but not anymore after the library scanning. The text that I have stroke through is caused by a firejail problem with symbolic links: netblue30/firejail#836

@mYnDstrEAm mYnDstrEAm added the bug This issue identifies a bug in Nuclear. label Jul 23, 2020
@mYnDstrEAm mYnDstrEAm changed the title Nuclear freezes (with electron glitches) when refreshing the local library (if it is large) Nuclear freezes (with electron glitches) when refreshing the large local library Jul 23, 2020
@nukeop
Copy link
Owner

nukeop commented Jul 23, 2020

What's the size of the library you're trying to load?

@mYnDstrEAm
Copy link
Author

About 50 GB in 3 folders. I think Nuclear should ultimately work with libraries far larger than that too.

Something else I forgot to mention in the issue: it would be great if there was a way to keep the library in sync without having to manually refresh it. Maybe something like fswatch could be used as a directory-monitor.
One idea would be creating "hashes for directories" that automatically change whenever a file within it is changed or removed or added - I'm not sure if this has been implemented yet (probably in one way or another), if it would be hard to implement (in external software, probably not in Nuclear) and if it would be really useful.
Maybe other music players have already built some solutions for this that could improve the synchronization of the library here.

@nukeop
Copy link
Owner

nukeop commented Jul 25, 2020

Our implementation of library crawling is very naive. I'm sure there's lots of room for improvement. I don't really have the knowledge to implement this is in an efficient way, will need to read up on this topic.

@mYnDstrEAm
Copy link
Author

mYnDstrEAm commented Jul 26, 2020

Okay. Maybe the methodology of library scanning by Mixxx, which works fairly well and fast with larger libraries, could be useful: https://github.com/mixxxdj/mixxx/blob/master/src/library/scanner/libraryscanner.cpp
I updated the file not playing anymore issue above.

@mYnDstrEAm
Copy link
Author

mYnDstrEAm commented Aug 1, 2020

Once when I ran nuclear without firejail it froze to a white rectangle had these two errors in the console:

[number/number:FATAL:memory.cc(22)] Out of memory. size=65536
[number/number:FATAL:memory.cc(22)] Out of memory. size=262144

The other times it also had glitches (as in the screenshot) without any error messages after the loading went as usual for a few seconds (rotating loading icon in the refresh button).

I changed the 3 directories to be the direct filepaths instead of links to the directories (created in KDE by dragging a folder->"Link Here").

After a refresh went through (with glitches) it now says "The library is empty".
It went through fairly quickly when scanning a folder on the local hard drive with only few files in it.

@nukeop
Copy link
Owner

nukeop commented May 17, 2024

New scanner will solve that

@nukeop nukeop closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue identifies a bug in Nuclear.
Projects
None yet
Development

No branches or pull requests

2 participants