Hi,
The error message means that there is corruption at Frame no. 5824 in the movie. Usually it is a black frame, but could be other things. What you need to do is to expand you timeline and scroll to frame 5824. Scroll around the area looking for black frames, white flashes, aritifacts -- anything that might indicate corruption. Sometimes corruption hides in transitions or titles.
You can find where frame No. 5824 is located by dividing the frame rate of your project into 5824. So, if you have a 30 fps project, divide 30 into 5824 to get 194.13 seconds. Then divide 194.13 by 60 seconds/minute to get 3.25 minutes as the point in time on the timeline that frame 5824 appears.
If you want to preserve your original project, you can duplicate the project and work with the duplicate.
Another thing that you can try is deleting preferences. Open iMovie while holding down the Option and Command keys and select to delete preferences in the box that appears. iMovie will open in a new blank library. Reopen your old library to get back to your projects. It is a safe procedure. Now see if you can export.
-- Rich