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:
#include <iostream> 
#include <Ice/Ice.h>

 using namespace std; 

int main(int argc, char *argv[]){
    Ice::StringSeq args = Ice::argsToStringSeq( argc, argv );
    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?