Sign in to follow this  

[.net] C++/CLI Crash, Help Appreciated

This topic is 4206 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an application written in c++/cli, where I am linking to some native c++ libraries, which then in turn use some dlls. The native libraries are compiled with multi-threaded dll code generation setting just like the c++/cli application is. It all compiles/links, and runs fine until I start trying to call function in the dll(which is a networking library btw, ReplicaNet). I have an idle event handler that calls a function in the networking library to get the URL of any sessions that were found broadcasting on the local network.
std::string found;
found = m_pNetwork->SessionEnumerateFound();
while(!found.empty())
{
	 found = m_pNetwork->SessionEnumerateFound();
}



The function returns an std::string by value that is the session URL. The actual crash seems to be in the destructor of the std::string in the dll, here's the callstack.
Quote:
msvcr80d.dll!_free_dbg_nolock(void * pUserData=0x0065f978, int nBlockUse=1) Line 1240 + 0x21 bytes C++ msvcr80d.dll!_free_dbg(void * pUserData=0x0065f978, int nBlockUse=1) Line 1194 + 0xd bytes C++ msvcr80d.dll!operator delete(void * pUserData=0x0065f978) Line 54 + 0x10 bytes C++ msvcp80d.dll!std::allocator<char>::deallocate(char * _Ptr=0x0065f978, unsigned int __formal=64) Line 147 + 0x9 bytes C++ msvcp80d.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Tidy(bool _Built=true, unsigned int _Newsize=0) Line 2048 C++ msvcp80d.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string<char,std::char_traits<char>,std::allocator<char> >() Line 878 C++ DLLRNXPSessionDMDLL.dll!RNReplicaNet::XPSessionPrivate::EnumerateFound() + 0x23a bytes C++ DLLRNReplicaNetDMDLL.dll!RNReplicaNet::ReplicaNetPrivate::SessionEnumerateFound() + 0xdc bytes C++ DLLRNReplicaNetDMDLL.dll!RNReplicaNet::ReplicaNet::SessionEnumerateFound() + 0x2d bytes C++
The output window has the following
Quote:
HEAP[MultiTool.exe]: Invalid Address specified to RtlValidateHeap( 00660000, 0065F958 ) Windows has triggered a breakpoint in MultiTool.exe. This may be due to a corruption of the heap, and indicates a bug in MultiTool.exe or any of the DLLs it has loaded.
Anyone have an idea why this might happen?

Share this post


Link to post
Share on other sites

This topic is 4206 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this