It's happens on different libraries. I can get over it sometimes by opening from a recent backup - Or if I reinstall the app it seems to sort it (for a while). Trashing preferences / generated files sometimes helps. I'm not an expert at reading the crash reports - but wondered if there was any info in there that could point to a cause?
The call stack of the hanging thread is very deep and goes through several audio layers. Have you used any unique audio effects or are you using any 3rd party audio plugins? This is just an observation, doesn't mean the problem is related to audio.
What year and type of Mac is this, and what hard drive? Are the drives locally connected or are any or network drives? Were these problem libraries upgraded from an older version of FCPX? If so did the problem happen there or only after the 10.4 upgrade? What version of macOS? In general you want to run FCPX 10.4 on High Sierra, not Sierra.
Since it happens on more than one library, that implies a broader problem. Do you have plenty of free disk space on the system drive? If you don't have, say, 20% free disk space when FCPX loads the libraries and demands more memory, it could destabilize the app or the entire OS.
When doing any testing of problems like this, only open a single library. Otherwise it complicates troubleshooting.
After making good backups, including duplicating the library files themselves, you could try this using your smallest library which has this problem:
(1) In FCPX, select the library in the pane at left, IOW the blue bar is on the library name
(2) File>Export XML. This exports a library XML with all the definitions and locations of all objects in the library
(3) Close that library
(4) Create a new empty test library
(5) Double-click on the .fcpxml file you created, and tell it load this into your new test library. That will recreate using XML all metadata from the original library and point each file to the original location.
(6) In the Inspector at right, select Consolidate, which will pull over all the media to the new library
If that is successful, do several tests to determine if the new library still has the problem. The idea is something in the original library is corrupted and this rebuilds all the metadata in the new library. However if the media files themselves are damaged it won't fix that.
If you have any AVCHD media which you imported as bare .MTS files using "leave files in place", this could cause various problems, although I haven't see it cause a hang or crash.
If everything else fails some users have reported that deleting the flexolibrary file inside the library bundle has fixed some possible data corruption issues. Never do anything like this except as a last resort and only after making thorough verified backups.