It sounds like you have a problem-- some application on your computer, very possibly RMXP, quit unexpectedly.
If it does this every time... I dunno. Normally, for errors, I'd say things like "Check for script conflicts-- are you using any scripts, anyway?" or "Make sure that you aren't using anything that refers to resources or events that you have removed" or "What maker are you using? What OS are you using?", but this one's new on me.