Pathing displacement bug. As you said it is near corners of unpathability, the unit must be failing to be displaced when leaving the mine. Thus it crashes as WC3 likes to do that if it can not displace a unit somewhere pathable for it. Generally the crash is purly chance based, and although avoidable by minimizing the ammount of unit displacement occuring, it can happen at any time, if even never.
My proof for this bug? Well I often observed WC3 crash with units doing heavy movement into areas they should not or being placed into a crowd. Like I said generally it does not occur but I have linked many spontanious crashes down to pathing displacement.
Try giving your gold mine more breathing space (a layer of pathable tareain around it), or havesting from it via a method like that of the undead mines or night elf mines.