The Old New Thing

A process shutdown puzzle, Episode 2

A customer reported that their program would very sporadically crash in the function . The customer was kind enough to provide a stack trace at the point of the crash: The customer wondered, "Could the problem be that my cleanup group does not have a callback? MSDN seems to suggest that this is okay." The exception being thrown is , but...