Hi,
I´m working in a project that uses 3 dlls:
AutoLib.dll
CommLib.dll
GDCP.dll
and an .EXE.
MbConfigurator.
that uses those DLLs implictly linked.
It all compiled and linked fine, but when its running in Debug version, i´m getting this a "debug assertion failed!" when I call:
i´m getting:Code:func1(){ ... TArrayStream* channelNames; //TArrayStream is a class defined inside autolib.dll channelNames=mapChannels->ReturnChannelsNames(); //mapchannel is an instance of a class defined inside GDCP.dll delete channelNames; //when it try to destroy this object ... }
Debug Assertion Failed!
File: dbgheap.c
Line: 1132
Expression: _CrtIsValidHeapPointer(pUserData)
the code of ReturnChannelNames:
I´ve researched, and I´ve founded out that I must run all the project using the same DLL. I´ve made it all the same but the problem won´t go away. Is there any body than can help me?Code:TArrayStream* TMapChannels::ReturnChannelsNames(void){ size_t i, qtd; qtd=channels->GetElQty(); TArrayStream* vector; if(qtd>0){ TChannelDevices* pChanEncontrado; vector=new TArrayStream(MAX_CHANNEL_NAME,qtd); for(i=1;i<=qtd;i++){ char buffer[MAX_CHANNEL_NAME]; channels->Get(i,&pChanEncontrado); pChanEncontrado->ReturnChannelName(buffer); vector->Add(buffer); } return(vector); } return(NULL); }
Thanks,
Adrian




Reply With Quote