Catalina Music app crashes on launch

After some annoying trial and error which convinced me that the new Music app - at least in its current state - is even worse than iTunes, I was able to resolve this issue by

  1. Completely removing all files related to the Music app that App Cleaner was able to find, in particular including preference files and (maybe, see step 3) Music.app itself. Deleting the latter requires making the root volume writable via sudo mount -uw / and possibly disabling System Integrity Protection. I have that off always. Not sure if it's required.
  2. Move the library folder and the library file Music Library.musiclibrary to a new location, e.g. ~/Desktop.
  3. Delete the old Music.app and transfer a new copy from an unaffected Mac also running Catalina.

    Note: I think this step might be unnecessary. Just listing it here for completeness since that was one of the steps I took but don't care to repeat the process without it to see if it still works.

  4. Launch the new Music.app to confirm that it runs without crashing immediately, then close it again.
  5. Move the library folder and file Music Library.musiclibrary to its original location, usually ~/Music.
  6. Launch Music.app while holding alt to change libraries. Choose the original library location (not the library folder itself, i.e. in my case ~/Music).
  7. Done. I was now able to launch Music.app again with all my songs in it.