Skip to main content
GameDev.net gamedev.net
🔒 Locked

Assert error

Started by Hedos Jul 18, 2003 at 10:48 PM 3 replies 700+ views
Original Post
Hedos
Hedos
Hello, I have a problem in my game.. This problem was happening since a lot of time, it was just sometimes ( maybe 40% of the time ) when closing my game, I had an assertion error:
quote:
Debug Assertion Failed! Program: ...ctXprogrammation\FireMage\FireMage___Win32_Debug\FireMage.exe File: dbgheap.c Line: 1017 Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
But now, I just implemented a function to detect the collision of the FireBalls and the monsters... and sometimes ( maybe 1/3 times ) when I hit a monster with a fireball, I have this assert error, and even if I "Ignore" it, the program close... I use the same algorithm to detect the collision on other things and it works fine, so the problem may come from the STD vector I use with my monsters ? And the problem would happen when erasing the monster ? (I also use a STD vector with my fireballs, but there is no problems in the other fireball collision detections(ex, when the fireball hit a wall, there is no problems) ) So I don''t know what to do with this error :\ Thx
Namethatnobodyelsetook
Namethatnobodyelsetook
You''re corrupting the memory pool via:

1) Freeing a pointer, and then still writing to it.
2) Writing past the end of an array
3) Freeing a pointer, and then attempting to free it again.

There are other ways, but those are the three common ones.
Hedos
Hedos
Ok, thx, I haven''t used pointers a lot, I''ll revise again my work to see what is wrong with my damn pointers

Thanks
Hedos
Hedos
what is BoundsChecker ?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.