Unity builds crash when I exit.

Building to an EXE, The application crashes on Application.close(), or clicking the x or hitting alt-f4 “has stopped working: A problem has caused the program to stop working correctly” standard windows error. Any solution to this problem?

I got this in Unity 4.1.5f1 when generating a Windows EXE.

I found the solution here…

Fix it using System.Diagnostics.Process.GetCurrentProcess().Kill() instead of Application.Quit()

This worked for me. Credit goes to wushuang212

Maybe something throws an exception in “OnApplicationQuit()” or some other method on quit? On where to find standalone player logs you can check this:
Unity - Manual: Log files