Divide by zero doesnt cause a crash. Divide by zero will give you a warning "Integer divide by zero at line ##" or in the case of a float it will allow you code to continue with a float value of INF. Neither cause a crash to desktop. They are caught.
Specifically the use of Mod(a,0) does cause a crash. Theres no warning, error or anything else, so it is something to look for. Ive also got a couple of examples of bad data being passed to a memblock can also cause a crash with no warning.
Try using log("...") and debug mode to see where your code got to so you can find what section is causing the crash.