release mode crashes when creating tool bar
-
BOOL result = tb->CreateEx( this ,TBSTYLE_TRANSPARENT | TBSTYLE_FLAT ,WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ,toolBarBorder ,TB_ID); For some reason this crashes in release mode but not debug, where should I be looking for some un-initialized pointers. I can't seem to isolate where it is happening. Can anyone give me some pointers? Using VS2008, by the way no crashes in release or debug in VS2003 Thanks Ray
-
BOOL result = tb->CreateEx( this ,TBSTYLE_TRANSPARENT | TBSTYLE_FLAT ,WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ,toolBarBorder ,TB_ID); For some reason this crashes in release mode but not debug, where should I be looking for some un-initialized pointers. I can't seem to isolate where it is happening. Can anyone give me some pointers? Using VS2008, by the way no crashes in release or debug in VS2003 Thanks Ray
First thing, when you build a release build you should still include debug information. Using Visual Studio 2008: the "Debug Information Format" setting in C++ node of the project properties should be set to "Program Database (/Zi)" for release builds (and "Program Database for Edit & Continue(/ZI)" on debug builds); On the "Linker->Debugging" node set "Generate Debug Info" to "Yes". Once you've got all that set-up debug the program as you normally would - you can't trust the debugger as much as you can in a release build, but all generally works well.
Steve
-
BOOL result = tb->CreateEx( this ,TBSTYLE_TRANSPARENT | TBSTYLE_FLAT ,WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ,toolBarBorder ,TB_ID); For some reason this crashes in release mode but not debug, where should I be looking for some un-initialized pointers. I can't seem to isolate where it is happening. Can anyone give me some pointers? Using VS2008, by the way no crashes in release or debug in VS2003 Thanks Ray
You need this: Surviving the Release Version[^]