This is extremely unusual.
Start by deleting preferences, and repeat whenever the application does not behave normally, or crashes.
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, cancel the export and tell us more about your system:
Please run Etrecheck and post its full report here.
Use the "additional text" button and paste the report into the text box.
In the meantime, if you try to convert the ProRes file to H264 directly in the Finder (control-click,Services,Encode Selected Video Files), does it similarly take an inordinate amount of time?