|
From: Jack on 11 Feb 2005 02:15 When I run _ASSERTE( _CrtCheckMemory( ) ) after each assignment in the constructors, I eventually get a heap corruption error when assigning data members in class B from a B method. I'm now trying to see what data is in the corrupted memory block. I get this same problem if I link MFC statically or dynamic. I'm starting to think the problem may have something to do with ActiveSync's interaction with my code, because I don't get a memory corruption error if I run the same code from a different parent application.
From: Jack on 11 Feb 2005 02:15 When I run _ASSERTE( _CrtCheckMemory( ) ) after each assignment in the constructors, I eventually get a heap corruption error when assigning data members in class B from a B method. I'm now trying to see what data is in the corrupted memory block. I get this same problem if I link MFC statically or dynamic. I'm starting to think the problem may have something to do with ActiveSync's interaction with my code, because I don't get a memory corruption error if I run the same code from a different parent application.
From: Doug Harrison [MVP] on 11 Feb 2005 02:50 Jack wrote: >When I run _ASSERTE( _CrtCheckMemory( ) ) after each assignment in the >constructors, I eventually get a heap corruption error when assigning >data members in class B from a B method. > >I'm now trying to see what data is in the corrupted memory block. > >I get this same problem if I link MFC statically or dynamic. > >I'm starting to think the problem may have something to do with >ActiveSync's interaction with my code, because I don't get a memory >corruption error if I run the same code from a different parent >application. Try setting a "data breakpoint" on the memory location that is changing so mysteriously. Once you determine where it's being changed, the problem will clarify itself. -- Doug Harrison Microsoft MVP - Visual C++
From: Jack on 11 Feb 2005 14:23 If I create the object as a local variable in a function, the object gets setup correctly, and CrtCheckMemory( ) reports no error. However, if I use the new operator, I get the errors as mentioned above. I've got the data breakpoints set on data memory addresses, and that is giving me more clues. Thanks.
First
|
Prev
|
Pages: 1 2 Prev: Problem: "Debug Assertion Failed", File:afxcmn.inl Next: Debug assertion in afxwin2.inl |