Start by deleting all render files.
Also, whenever the application misbehaves, delete its preferences.
To delete preferences, hold down command and option while starting FCP X and click Delete Preferences. The application will start in a default state, and open an "Untitled" library.
Reopen the library you were working on, set the preferences the way you like them, and try again.
If the problem persists, tell us more about your project settings, and the type of media involved.
For more details about your setup, please run Etrecheck and post its full report here.
Use the "additional text" button and paste the report into the text box.