When your program looks to be running but stops functioning, you can glean a bit a information from the "more information" Windows supplies:
AppHangB1 can happen with a program stuck in an inifinite loop
AppHangB2 can happen if your code references an array element out of the bounds of the array, and you have compiled the exe with the "Remove Array Bounds Checks" Advanced Optimization enabled