List:MySQL++« Previous MessageNext Message »
From:Stromek Date:October 14 2005 3:20pm
Subject:Destroying Query object causes unhandled exception
View as plain text  
Hello all,

right to the point. I have the following code in my application:

try
{
	mysqlpp::Connection sqlCon( db, host, user, passwd );

	mysqlpp::Query query = sqlCon.query( );
}
catch ( const mysqlpp::BadQuery &e )
{
	cerr << e.what( ) << endl;
	return;
}
catch ( const mysqlpp::Exception &e )
{
	cerr << e.what( ) << endl;
	return;
}

With this code it is possible to use the connection and the query object to manipulate
database.
But when the application is going out of the try block and tries to destroy Query
object it stops in "dbgheap.c" with unhandled exception or assert says:

Expression: _BLOCK_TYPE_IS_VALIDE(pHead->nBlockUse)

I have found this type of error on google but without any replyes. I've
been playing more with this code and tried to set up new project. In new
project it is without error.

Therefore I thought, I have problem with memory leaks. But it was
strange because the application runs without any error. So I've commented
everything before that try block but it haven't helped.

Does anybody have any idea what might be the problem? Thanks in advance!

-- 
Stromek
Thread
Destroying Query object causes unhandled exceptionStromek14 Oct
  • Re: Destroying Query object causes unhandled exceptionStromek14 Oct