Quantcast
Channel: Heap corruption C++ - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Heap corruption C++

$
0
0

I am getting a heap corruption error when trying to compile my program. The code in question is a pointer

cparticle * particles. 

It is initialized to NULL and then set to

particles = new cparticle[amount]

I am only using delete once in the destructor, and it is causing windows to trigger a breakpoint. I have attempted to use application verifier, and it give me this info:

===========================================================VERIFIER STOP 0000000000000013: pid 0x17C0: first chance access violation for current     stack trace 000000001D54A0A4 : Invalid address being accessed0000000055741DC6 : Code performing invalid access000000000025E9D0 : Exception record. Use .exr to display it.000000000025E4E0 : Context record. Use .cxr to display it.===========================================================This verifier stop is continuable. After debugging it use `go' to continue.==================================================================================================VERIFIER STOP 00000013: pid 0x17C0: First chance access violation for current stack trace. 1D54A0A4 : Invalid address causing the exception.55741DC6 : Code address executing the invalid access.001DF30C : Exception record.001DF35C : Context record.=======================================This verifier stop is continuable.After debugging it use `go' to continue.=======================================

I am unsure what I am doing wrong, so any help will be appreciated.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images