Close the dialog box, heard a “boom” is heard

Last night to do the project, add a button event code, test, close the dialog box “boom” error sound, without any error dialog box pops up, but the process has not been closed.

This should be when debugging assertion is activated, appears the error sound.

Look at the results, no signs of error.

Last debugging found in an array loop, I do not care to -1 to do in order to index the cause of the error.

Found in the online search for this problem, if you have connected to the database is not closed, or application memory is not released, may have such a mistake. However, most of this error can be debugging out.