I have a strange problem where I suffer from crashes when deleting objects in my code. The objects are valid, there are no memory leaks that could overwrite them and it happens only in debug mode. The same code compiled with Linux works fine in both, debug and release builds. So I'd guess it is some strange problem with the Visual Studio debug-CRTs.
My software is structured as follows:
Two static libraries are compiled in mode "Multi threaded (debug) DLL" and are linked with: A shared library (DLL) that is compiled in mode "Multi threaded (debug)". From logic I'd say it should be the other way round but then I get HUGE amounts of unresolved symbols.
Finally there is an executable that is compiled in mode "Multi threaded (debug) DLL" which calls the DLL mentioned above. Here it does not make a difference when I switch to "Multi threaded (debug)".
The crash on object deletion happens in dbgheap.c / _heap_alloc_dbg_impl() -> mlock.c / _unlock() - a function of
So: what could be the problem? Is it really some CRT-incompatibility in debug mode or what else could be the reason? I'm quite sure that it is not a typical memory leak since it works smoothly with Linux and in release build.