poorly coded "triggers" can cause a crash to desktop.
Exceeding the op limit will cause a thread crash (in other words, the function running will stop running and not return, thus the whole chain of execution from the start of the thread will die.) if the main thread crashes, well, you're fucked.
Memory leaks will only cause a crash if you are leaking more memory then you should ever leak. Ever.
Moving units outside of the actual map via SetUnitX() or SetUnitY() will cause a crash to desktop.
Using an uninitialized variable in an expression will cause a thread crash.
Division by 0 will cause a thread crash.
There are hundreds of other reasons a crash or thread crash may happen.