Re: "Debug" dll in "Release" application



Tom wrote:
The system crashes in delete of BITMAPINFO object.
This object has been created in debug dll and deleted in application
(compiled in Release)

What could be a problem?

Debug and release builds have different heaps and you must not allocate
memory on one heap and delete it on the other. This is by design, the debug
heap has additional checks.

If you only want to debug the release version, just activate generation of
debug information in the release build.

Uli

.



Relevant Pages

  • Re: VerQueryValue Bug?
    ... The heap corruption might have been happened in other cases, ... and onl;y in the debugger the same thing would happen. ... > call to verqueryvalue was not called there was not problem. ... > I believe that debug and verqueryvalue can have unexpected side effects. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Debug heap tracking
    ... You don't need a debug build of windows to use pageheap ... it doesn't look like pageheap is working. ... page heap enabled with flags ...
    (microsoft.public.vc.debugger)
  • Re: Memory corruption of DLL class object
    ... But for Debug: ... //create a buffer on the heap in nvImage.dll ... modules to share this CRT data is by linking to the exact same CRT DLL. ...
    (microsoft.public.vc.mfc)
  • Re: CString.Format causing memory corruption issues.
    ... It's only a visible consequence of a bug elsewhere.You have been told ... messages or debug breaks from the system coming to the debugger. ... I tried verifyingthe heap using gflags, however the second I enabled any ...
    (microsoft.public.vc.mfc)
  • RE: Thread exiting with code 1282 (0x502)
    ... You would like to know how to debug your MFC application now. ... If you had Visual Studio IDE, you can use breakpoint debugging as mentioned ... overrun of a stack-based buffer in this application. ... Were there many large objects allocated on stack rather than heap in your ...
    (microsoft.public.vc.mfc)