You might consider adding unhandled exception handler to your application which write the exception to a log file to assist in determining the issue then once know write assertion to address the issue generating the exception.

MSDN article which will assist with adding an unhandled exception handler that writes to a log file.