Release Build Exceptions not present in Debug Build
I was wondering if there are any common mistakes that allow code to work perfectly (more or less) in a debug build, and blow out on a 0xC0000005 Access Violation in a release build.
I''m tracking down the null pointer now, but how can this be?
I''ve set optimizations to None (disabled), per LaMothe''s suggestion...
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
The most common mistake I know of is buffer overruns in string routines. Debug mode gives you a little more rope to hang yourself with when allocating arrays, especially with adding zero initialized data as padding on the end of arrays. Then when a piece of string code doesn''t properly null-terminate itself, in debug mode it runs into the nice happy debug mode zeros and terminates, but in release mode the pointer traversal goes happily into memory that has no virtual paging.
The debugger''s pretty good at detecting string leaks, I think I fixed all of those :-)
It seems that the D3D init fails in release mode
I added a couple of if(PointNotNull){} blocks and there''s no more crashes, now the program just doesn''t do anything
ah well, that''s someone elses code not mine...
Anyone lese have problems initializing d3d in a release build?
It seems that the D3D init fails in release mode
I added a couple of if(PointNotNull){} blocks and there''s no more crashes, now the program just doesn''t do anything
ah well, that''s someone elses code not mine...
Anyone lese have problems initializing d3d in a release build?
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Are you zeroing the structures you pass to the intialization functions before filling in the data?
Yeah, I checked and the graphics guy did his job perfectly well..
His code compiiles and runs fine in release mode, running in a dialog winodw created calling win32 api commands.
The problem surfaces when using a window from an MFC class.
I'm trying to render to a static frame (like the MFC/directX examples)
I made sure to use GetSafeHwnd()
...
What does the /MD and/or /MDd compile switches do? It blows up with the first switch, but not the second...
Edited by - Magmai Kai Holmlor on October 25, 2000 2:06:04 AM
His code compiiles and runs fine in release mode, running in a dialog winodw created calling win32 api commands.
The problem surfaces when using a window from an MFC class.
I'm trying to render to a static frame (like the MFC/directX examples)
I made sure to use GetSafeHwnd()
//in class definition// Dialog Data //{{AFX_DATA(CInfinitumDlg) enum { IDD = IDD_INFINITUM_DIALOG }; CStatic m_RenderPortal; //...on and on//handle passed to D3DInitialize proceduresm_RenderPortal.GetSafeHwnd()
...
What does the /MD and/or /MDd compile switches do? It blows up with the first switch, but not the second...
Edited by - Magmai Kai Holmlor on October 25, 2000 2:06:04 AM
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Hi,
be sure to initialize ALL your variables... Some of the strangest bugs occuring in release mode are due to this...
Metron
be sure to initialize ALL your variables... Some of the strangest bugs occuring in release mode are due to this...
Metron
----------------------------------------http://www.sidema.be----------------------------------------
I'm beginning to think its a race condition...
/MD tells it to "Compile for Multi-Threaded Dynamically Linked Run-Time Support"
/MDd is the debug version...
Edited by - Magmai Kai Holmlor on October 25, 2000 12:36:04 PM
/MD tells it to "Compile for Multi-Threaded Dynamically Linked Run-Time Support"
/MDd is the debug version...
Edited by - Magmai Kai Holmlor on October 25, 2000 12:36:04 PM
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement