I'm developing a C# application that calls into an unmanaged (C++) dll. I've found a certain user operation that consistently leads to the application crashing when run from Windows Explorer. However, when launched from the Visual Studio debugger, the crash does not occur. I therefore cannot step into the code at the time of the crash and debug exactly what's going on.
What might cause the binary to crash when run from Explorer, but not from Visual Studio? Note that I'm using a Release build; Debug builds crash neither in Visual Studio nor in Explorer.
(If it's relevant, I can say that the crash has to do with manipulating a malloc-allocated array in the C++ DLL. I tracked it down by painstakingly commenting out blocks of code, rebuilding, running from Windows, & checking whether or not the crash occurs. However, I've reached a point where it's become very difficult to proceed without being able to properly break in the debugger).
I'm just interested in being able to recreate the crash within Visual Studio.