Home Help Center

Debug Assertion Failed! ... Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)".

int FlowCtrlClient::run(int argc, char* argv[])
{


Ice::PropertiesPtr properties = communicator()->getProperties();
const char* proxyProperty = "FlowCtrlClient.Proxy";
string proxy = properties->getProperty(proxyProperty);
if(proxy.empty())
{
cerr << argv[0] << ": property `" << proxyProperty << "' not set" << endl;
return EXIT_FAILURE;
}

try
{
//1. string proxy="FlowCtrlServer:tcp -h 10.130.204.81 -p 10000:udp -h 10.130.204.81 -p 10000:ssl -h 10.130.204.81 -p 10001";

MediaGateWayCtrlPrx towwayProxy = MediaGateWayCtrlPrx::checkedCast(
communicator()->stringToProxy(proxy)->ice_twoway()->ice_timeout(10)->ice_secure(false));
if(!towwayProxy)
{
cerr << argv[0] << ": invalid proxy" << endl;
return EXIT_FAILURE;
}

FlowCtrlService::MGIOPARA iopara;
iopara.KeyLength=6;
iopara.Keystring="NV";

iopara.IDDTime=6;
iopara.SilenceTime=30;
//::Ice::Int PlayVoice(::Ice::Int nResID, const ::std::string& szFileName, const ::FlowCtrlService::MGIOPARA& iopara, ::Ice::Int nRate)
towwayProxy->PlayVoice(0,"c:/temp/test.wav",iopara,6);

}
catch(const Ice::Exception& ex)
{
cerr << ex << endl;
}
return EXIT_SUCCESS;

}

when this function retuns ,it appears an assertion failed dialog "
file:dbgdel.cpp
line:52
Debug Assertion Failed! ... Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)".

but if I use the commented 1 line, the error never appear.

some one said that the problem is the debug and release library mixed ,but my vs2003 env project property is using "multithread debug dll".

so someone can help me?

thank you!

Comments

Sign In or Register to comment.