Hi, Kathleen8739,
Crashing can be caused by a number of different things. It could be a corrupt preference. Or maybe not enough disk space for the iMovie app to function properly, or perhaps not enough space in the destination drive to receive the movie. It could also be a corrupt clip in the project that is triggering the crash. Or it could be an issue confined to just one project. Or there might be a conflict in the particular user account that you are using. Possibly it could be an issue with your computer, such as bad RAM or maybe a failing graphics card. No way to tell without doing some diagnostic procedures.
Start by checking your disk space. If all O.K. there, then try deleting preferences. To do that, open iMovie while holding down the Option and Command keys and selecting to delete preferences in the box that appears. iMovie will open in a new library. Reopen your old library to get back to your projects. Now see if you can share out properly.
Next try booting up in Safe Mode (see Finder help menu for instructions). After everything loads, immediately shut down and reboot in normal mode. See if that cures it.
To rule out that the issue is confined to just one project, try creating a new project, do an Edit/Select All, Edit/Copy, of the media in your project, and then an Edit/Paste paste of the media into the new project. Try to share out. If it shares out fine, the issue was confined to just the one project. If the share were unsuccessful, possibly there is a corrupt clip in the project that is causing the share failure. If that's the case, expand your timeline with the slider above and to the right of the timeline. Then scroll through the project, looking for white flashes, black frames, artifacts, and anything else that might indicate corruption. Cut out any that you find and try again to share out. You might first try scrolling around the 30 minute mark where you are getting the failure. Also, good to work with a duplicate of your movie so that you preserve the original.
If still no luck, you can try creating a new user account from Users and Groups in the System preferences pane, and opening iMovie there.
To rule out a computer issue, you can try running the Apple Diagnostics program on your Mac. See the Finder help menu for instructions.
All else failing, try calling Apple Support. Click on the Contact Support item in the upper right hand corner of this forum's screen and navigate to a place where you can input your phone number. The techs there are pretty savvy and have the capability of remotely accessing your computer.
-- Rich