By changing the display from timeline to frames you can go to the exact frame number cited in the error message. Replace the shot. There may be other error. To optimize the media select the clips in the browser that are used in the project, right click on one, and choose Transcode media. Check Optimize.
Starfox wrote: Thanks for the tips. I right-clicked in the browser on the clip causing the issue and used the option 'analyze and fix' and it bounced straight away,
That option is to analyze and fix color or audio, not a corrupt file.
The error you encountered can be caused by a corrupt render file, a damaged source file, by damaged library metadata for that source clip or by bugs and incompatibilities in 3rd-party plugins.
In FCPX preferences, disable background rendering, then do File>Delete Generated Library Files>Delete Render Files>All. Then reboot entire machine, launch FCPX, open project, select all clips in timeline with CMD+A, render them with CTRL+R, and do not use machine while that runs.
If it completes without error, skim through the timeline and evaluate performance and behavior. If it runs OK, try to export the project using these settings: File>Share>Master File>Settings, Format: Computer, Video Codec: H.264 Faster Encode, Resolution: 1920 x 1080.
If at any point those steps cause errors, state the specifics.
If errors happen, make a snapshot copy of the timeline, open that, select all clips with CMD+A, then remove all effects with Edit>Remove Effects. See if you can navigate the timeline minus effects and export it using the above preset. If that works, repeat above procedure but remove effects from 1/2 the timeline, then the other 1/2, then 1/4, as needed to narrow down where the problematic effects are.