On Wed, Apr 15, 2009 at 1:29 AM, Neil Groves
Jared,
On Wed, Apr 15, 2009 at 1:04 AM, Jared Lee Richardson
wrote: Hmm, ok then. I have a few more things I'll try tonight(go through the code by hand checking every pointer, etc.)
Even though the Debug build appears to be symptom free you might want to try the _CrtSetDbgFlag(_CRTDBG_CHECK_ ALWAYS_DF); approach. If your code is single threaded it should find any heap corruption within your code.
I tried this, and unfortunately no errors came up in debug. While thinking through how my code works, I did realize that I am probably using a bad pointer somewhere- This is my first project with a very heavy use of the STL, and I was maintaining pointers to objects inside vectors. Bad if the vector resizes and moves them elsewhere. However, none of that code is being hit or touched before this crash happens.
If this is truly a Release build only issue then you might want to check the myriad of debug iterator preprocessor defines to ensure they are consistent between your project and the Boost.DateTime version you are using. Have you ensured that _SECURE_SCL=1 in your project for the Release configuration?
As far as I know, I'm not using any iterators at all before this is hit. I added _SECURE_SCL 1 to my global defines, but no help.
If your project is fairly small and you are allowed, I would be happy for you to send the Visual Studio solution to my personal email address so that I can take a quick look at it. This might be the fastest way to proceed.
Sure- I tried everything I knew how this morning, and nothing fixed it. Sending you a separate email with that. Thanks for that Neil, much appreciated. :)
I'm not able to use the crtdbg.h to solve this it looks like- crtdbg is only useful in debug, and the error does not seem to happen in debug(at least, not the same). I tried forcing it to run in debug by changing only the settings required for it - #undef _RELEASE, #define _DEBUG, changed runtime library from Multi-Threaded(/MT) to Multi-Threaded Debug(/MTd), however the program ran fine, no crash(or at least, not in that spot- my assertions triggered because I've removed so much code).
Did you mean Multi-Threaded DLL (/MD) and Multi-Threaded Debug DLL (/MDd)? IIRC the Boost shared libraries build against the shared C runtime by default and these should not be mixed.
I had used the BoostPro downloader to specifically download the static link libraries. However, on the chance it would help, I re-downloaded the DLL's and changed it to /MD and /MDd. The crash simply jumped to a later spot in code. Thanks, Jared