Welcome Guest

Pages: 1
AMPLIbraryAgent issues
rh2021PostMay 6, 2021, 03:16
Newbie
Posts: 6
Registered:
May 3, 2021, 03:41
Normal topicAMPLIbraryAgent issues

Hi Folks

I'm a new comer to Yate and am enjoying it, especially it's integration potential.

However, I was wondering if anyone else has issues with AMPLIbraryAgent?

AMPLibraryAgent is a Mac system level app that handles library file updates from AppleMusic Apps. If Yate is writing back to the AppleApp, then AMPLibraryAgent is invoked.

From what I can gather: (I could be wrong)
1 Yate tells AppleApp to update
2 AppleApp updates it’s database
3 AppleApp instructs AMPLibraryAgent to update the file metadata and location.

If the music is stored externally (EG NAS with HDD) then AppleApp can update itself faster than AMPLibraryAgent can keep up. I have run updates for 6 hours: 2 hours updating AppleApp and 4 hours waiting for AMPLIbraryAgent to complete! To see this in operation, open Activity Monitor and watch the CPU usage of AMPLIbraryAgent when updating AppleApp from Yate.

The danger is that if the AppleApp is closed, it will close AMPLIbraryAgent and metadata changes will NOT be saved to the files. This can cause missing files (eg where a change in location is scheduled). Ideally the AMPLibraryAgent CPU usage should drop to 0% before closing the AppleApp to avoid this.

Any other experiences ?

Cheers
Ralph

Ralph H

2MR2PostMay 6, 2021, 09:00
Administrator
Posts: 1763
Registered:
August 23, 2012, 19:27
Normal topicAMPLIbraryAgent issues

You're not wrong. It's just bad design ... and it's been that way since betas of Catalina.

There seems to be an internal lock in the Apple App but it doesn't always seem to work. I've had Music get into a state where it cannot be closed until AMPLibrary settles down. One would image that that's the way it should work.

Using a background process to insure the integrity of your application's data is fine... however then silently losing everything because the application closed is not so fine. It's also not so fine to eat 100% of the CPU.

There are lot's of other cases like this with Music. When an album is added to Music, Yate waits after every track is added for the acknowledgement that everything worked. At that time it gets a PID. However, there is a timing window, if Music has just opened, that the PID returned is in fact discarded by Music and another is internally issued ... or not.

I don't expect any of this to be fixed. Sadly none of these issues seem to matter anymore. 10.14 had a bug where a port was lost after every Apple Event issued on a background thread. This bug was around since 10.14 betas and was only fixed in 10.15.

All of this has been reported, numerous times, but I can't remember the last time a bug was fixed. 10.15 had a bug where file save panels would internally crash if you were saving a non standard Apple filetype, (such as m3u or cue), and the file already existed. The application would soft crash and the user could not be notified ... and the existing file was not replaced. I reported it a number of times and used paid developer accesses to try to get it fixed. At one point the bug was marked as closed (fixed). Turns out that it wasn't and I had to use more paid credits to get it re-activated. I sent them sample code, detailed documentation and a video ... and it still took months to get anyone to even look at it.

The point of all this ranting and raving is that regardless of what AMPLibraryAgent is doing ... we'll have to live with it.

There are lots of potential fixes for AMPLibraryAgent on the web ... some of them amusing.

rh2021PostMay 6, 2021, 21:32
Newbie
Posts: 6
Registered:
May 3, 2021, 03:41
Normal topicAMPLIbraryAgent issues

Thanks for the comprehensive reply
I have seen some of the potential fixes and some are outright dangerous to your data.

In your estimation, would the AMPLibraryAgent respond better if the music files were local or if the NAS drive had SSD instead of HDD?

Cheers

Ralph H

2MR2PostMay 6, 2021, 21:39
Administrator
Posts: 1763
Registered:
August 23, 2012, 19:27
Normal topicAMPLIbraryAgent issues

I can't say for sure. My NAS is definitely HDD. I always recommend that the iTunes/Music library should be local. It seems to work much better. However, I do not think that the location of the files should matter. It's been about 10 years since I've had any local audio files.

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.125 seconds.