<jgdavies <at> ntlworld.com> writes: > > Having built the Calculator client on Win2000 I get the soap result OK but get an invalid heap pointer when cleaning up.
I now know what the problem is but still dont know how to fix it: Building a MAP file for HTTPChannel_D.dll shows it has a _crtheap variable and uses heapcreate Stepping into: operator new(unsigned int 444) CreateInstance(axiscpp::SOAPTransport * * 0x0012fc9c) axiscpp::SOAPTransportFactory::getTransportObject(axiscpp::AXIS_PROTOCOL_TYPE APTHTTP1_1) axiscpp::Call::Call() axiscpp::Stub::Stub(const char * 0x00419068 `string', axiscpp::AXIS_PROTOCOL_TYPE APTHTTP1_1) Calculator::Calculator() main() mainCRTStartup() brings _crtheap into scope = 0x002f0000 Stepping into: CreateInstance(HTTPChannel * * 0x0012fb08) axiscpp::ChannelFactory::createChannel(g_ChannelType UnsecureChannel) HTTPTransport::HTTPTransport() CreateInstance(axiscpp::SOAPTransport * * 0x0012fc9c) axiscpp::SOAPTransportFactory::getTransportObject(axiscpp::AXIS_PROTOCOL_TYPE APTHTTP1_1) axiscpp::Call::Call() axiscpp::Stub::Stub(const char * 0x00419068 `string', axiscpp::AXIS_PROTOCOL_TYPE APTHTTP1_1) Calculator::Calculator() main() mainCRTStartup() brings _crtheap into scope = 0x003d0000 This calls new which returns: res 0x003d2890 When cleaning up, stepping into: free(void * 0x003d2890) operator delete(void * 0x003d2890) axiscpp::ChannelFactory::UnLoadChannelLibrary(g_ChannelType UnsecureChannel) axiscpp::ChannelFactory::~ChannelFactory() axiscpp::ChannelFactory::`scalar deleting destructor'(unsigned int 1) + 37 bytes HTTPTransport::~HTTPTransport() HTTPTransport::`scalar deleting destructor'(unsigned int 1) DestroyInstance(axiscpp::SOAPTransport * 0x002f9090) axiscpp::SOAPTransportFactory::destroyTransportObject(axiscpp::SOAPTransport * 0x002f9090) axiscpp::Call::~Call() axiscpp::Call::`vector deleting destructor'(unsigned int 1) + 103 bytes axiscpp::Stub::~Stub() Calculator::~Calculator() main() mainCRTStartup() brings _crtheap into scope = 0x002f0000 with pUserData 0x003d2890 this is the wrong _crtheap, it should be 0x003d0000 if its to match the one used for allocation. Setting _crtheap = 0x003d0000 in the debugger allows the call to succeed though I have to reset = 0x002f0000 it for the rest of the program. Using this method all the clean up goes nicely and exits properly.
