Try deleting all render files, then select the entire timeline, render it with CTRL+R, then if rendered OK try exporting.
If it still crashes, right before you export, stop and restart FCPX, do nothing else then try to export.
If it still crashes, right before you export, restart macOS, then bring up FCPX and export.
You shouldn't have to do any of these, but I had an intermittent problem like this once and restarting FCPX before the export was a workaround. I don't remember the details but it finally quit happening all by itself.
Also verify you have plenty of extra hard disk space on the export drive, also on your system drive.
Hi there. When I first go my Mac Pro I couldn't export without crashing. I had a 50 min doco for TV stuck in the machine, which I finally managed to get out bit by bit. I was also getting glitches in the video. Turned out to be the graphics cards...AMD D700s, which were replaced by Apple free of charge. All good since then machine is late 2013 Mac Pro 3.5 GHz intel Xeon 32 gig 1866 Mhz DDR3 AMD firepro D700 6 GB
BJansch wrote: Yes I think the graphics cards could be an issue, wish I knew how to check!...
I suggest following FCPX.guru's advice.
Also you can try running Apple Diagnostics, but it's not guaranteed to find all problems. If it finds a problem you definitely have a hardware issue. If it does not find a problem that is no "clean bill of health", it only means this simple test didn't find anything. However it's available and easy to run:
At the Apple Store they have much more extensive diagnostics, including overnight or multi-day "bench diagnostics".
So I get the 'Prepare media for sharing' crash, on both my Mac Pro and Macbook Pro, so it can't be a hardware issue. Some kind of plugin conflict perhaps but I've already tried exporting without any grades or audio fx but that still brings up the same 'Prepare media for sharing' message.
If you haven't already done it try the Digital Anarchy removal tool, then re-install FCPX. If that doesn't work:
If this is a managed library, and you copied that or connected an external hard drive to the MBP, the cache and render files are still there. Can you create a test library on a separate hard drive, copy just the project itself to that library, and answer "no" the dialog about copying render or proxy files? Then consolidate that library, disconnect the other drives and verify the test library will load. Then try to render the timeline with CTRL+R, if that works then try to export to the problem codec. This copies over just the media for the project, and leaves behind any render, scratch or proxy files.
It's important to determine is it crashing in the render phase or the encode phase. If the timeline is not fully rendered, then exporting does both render plus encode, so we don't know which phase it crashed in.
A variation of the above is progressively cut down the project and see at what point the export stops hanging. This could help isolate it to a single clip or at least a small collection of clips.
If that still fails evaluate what plugins you have, whether applied or not. If you are using FxFactory run that and update it. Some possible steps:
1) Open the FxFactory application.
2) Select the "Show FxPlug Plug-Ins in Finder" command under the "Actions” menu:
3) The Finder will open a folder on your system that contains all legacy plug-ins for Final Cut Pro and Motion.
4) Look at each file in the folder, especially for items like these:
BJansch wrote: I also tried exporting just a single clip with no grade or fx applied and that failed too.
OK, I know this is frustrating but those are all useful tests and help narrow down the problem. If you cannot export even a single clip with no fx, that makes further isolation easier.
E.g, can you import that same clip to a new fresh library, and does export still fail? If so that eliminates the possibility of corrupt data within your existing library. If it works there's something in your original library causing the problem.
If it fails with a freshly imported single clip in a test library, then examine the codec of that clip. Does if fail with any clip or just clips using that codec. If you import a non-MXF ProRes clip, or other various H264 clips, does it hang on export to MXF?
If no, we need to examine the original clip characteristics. If yes, the next step is evaluating what export codecs it hangs on. You previously said MXF and ProRes above 422. Is that consistent? Are you certain you've installed the latest Apple Pro Video Formats?
MXF is a container format that can include various codecs. As Jonathan said, does it hang when exporting to a ProRes 422 (or higher) master in a non-MXF format? If no can you then convert an exported ProRes master to MXF with Compressor? That's not a long term solution but might help isolate the problem area.
I had the exact same problem too. Vers. 10.4.3 on High Sierra, crashed EVERY time I tried to export. I followed quite a few of the recommendations here, and felt like giving up. I was toying with getting more RAM for my ‘old’ 2012 MacBook, and maybe even another SSD (I’m running the system off an SSD in the DVD slot). I thought it might just be the poor performance of my laptop (Apple deem it ‘vintage’ now so you have to go to other sources for the hardware!)