Well, it’s possible that there’s a bug in the driver related to select mode. But my guess remains that you’re corrupting memory somewhere and in previous builds it either didn’t happen didn’t manifest.
My usual approach to suspected memory corruption is to port the code to Linux and use valgrind. But for a MFC application, that’s not a realistic option. Unfortunately, valgrind isn’t available for Windows and equivalent tools for Windows are either expensive or less functional (or both).
Assuming that it is a memory corruption issue, the source of the problem is unlikely to be anywhere near where the crash occurs.