Does MT4 close on its own for any reason related to MQL code?

 
My MT4 when running my EA will sometimes close as soon as the connected to server sound is heard. I will re-open MT4 many times and it will happen many times until magically it works one time. This can be 2 opens or 20 opens. My EA has no errors when compiled. There are no uninit codes or any messages under the Experts or Journal tabs. I've reinstalled MT4 and it doesn't work. How do I go about troubleshooting this? When I go to the next chart layout using hotkey Ctrl+F5 to a blank layout without my EA, this bug will go away. Therefore, it must be the EA. I just can't figure out what it is to crash the program completely. With a previous broker, this has never happened even with this EA.