As far as I know, this is an odd bug of AoE. It happened to me several times, the last one during the creation of the HUGE 6th map of my Hittite campaign. It was about 50% complete when it happened, but luckily I had saved a previous version.
This seems to happen only with the 1.0c patch and sorry, there's nothing you can do to prevent this.
The only thing you can do is to save your maps often and with different names, so if the game shuts down you can recover a previously saved map.