Archived
This forum has been archived. Please start a new discussion on GitHub.
_BLOCK_TYPE_IS_VALID errors under Windows?
Hi There,
I've been working on trying to port an existing project to Windows. I am getting some very unpredictable behaviours, especially when compiling with Visual Studio .NET 2003.
Consider for example, the following simple bit of code that uses the Ice library:
Now, when I compile and run this, I get the following error message:
Any ideas why this is happening with what appears to be a well-written and simple program? Is it a bug in the Ice libraries, or am I missing something simple?
Regards,
Waleed.
I've been working on trying to port an existing project to Windows. I am getting some very unpredictable behaviours, especially when compiling with Visual Studio .NET 2003.
Consider for example, the following simple bit of code that uses the Ice library:
#include <iostream> #include <Ice/Ice.h> using namespace std; int main(int argc, char *argv[]){ Ice::StringSeq args = Ice::argsToStringSeq( argc, argv ); args.push_back("ExtraArg"); for(int i=0; i < args.size(); i++){ cout << "Arg " << i << " is " << args[i] << endl; } }
Now, when I compile and run this, I get the following error message:
Debug Assertion Failed! Error: dbgdel.cpp Line 52 Error: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
Any ideas why this is happening with what appears to be a well-written and simple program? Is it a bug in the Ice libraries, or am I missing something simple?
Regards,
Waleed.
0
Comments
-
Hi Waleed,
It's a simple problem: you're mixing /MD and /MDd libraries.
See http://www.zeroc.com/faq/windowsLibraryMixup.html
Best regards,
Bernard0 -
Thanks for the prompt and appropriate response. I really appreciate it!0