Any one up to a challenge
*EDIT
by using a mem profiler i was able to find out why the error was happening and then made changes
turned out i was using a char array of size 20, and some of my texture names were a bit longer than this.
The rest of the name overwrite the guard bytes, so hence the error.
I should have taken the size into condideration, but it was overlooked bacause of the cryptic errors that came up.
"Memory overruns can be one of the most difficult problems to isolate"
haha yes this is so true, and i hope my problem will give you an idea on what to look for if you ever run into a similar problem.
*/Edit
...
of debugging a heap memory problem from visual c++ and directx 9?
in debug build:
DAMAGE: after Normal block (#185) at 0x00bc1288
in release build:
HEAP[game.exe]: Heap block at 009861B8 modified at 009861DC past requested size of 1c
and during a run in with a mem profiler
Overrun Detected During Execution: In block 0x019F7278 (28) allocated by global_operator_new.
i get that when the node is being deleted.
Description
Your program has overrun a block of memory and written into the guard bytes. The memory overrun error occurred before the current API.
Memory overruns occur when an application writes beyond the allocated length of the block and overwrites the guard bytes. The overrun will write over a portion of the heap that was not allocated to the application and will corrupt the heap.
after enabling another setting in the profiler
the error happens here:
Temp = new TextureNode(string);
I have a ImageManager class which is a linked list used to manage texture files.
I can add as many items to the list as i want with no problem.
The problem starts when i have over 15 items in it and want to delete everything in the list
the list is deleted in the destructer. If i comment out the functioncall to delets the list i have no memery errors, but alot of mem leaks then.
During debug build i get this error
DAMAGE: after Normal block (#185) at 0x00bc1288
it is a debug error in dbgheap.c
and in relase build i get
HEAP[game.exe]: Heap block at 009861B8 modified at 009861DC past requested size of 1c
these happen when the 15th node in the link list is deleted.
You can download the project http://chazcross.phase9studios.com/files/Game.zip
rember its the ImageManager.cpp and .h file
or you can just go here http://chazcross.phase9studios.com/files/ImageManager.cpp and http://chazcross.phase9studios.com/files/ImageManager.h to get the file itself.
BTW the number of textures that get loaded into the linked list os defined in the map01.txt file under the maps dir. Just increase it by 1 and the errors start. The number to increase is just above the texture names.
any help would be appreciated, cuz i am banging my head on this one.
by using a mem profiler i was able to find out why the error was happening and then made changes
turned out i was using a char array of size 20, and some of my texture names were a bit longer than this.
The rest of the name overwrite the guard bytes, so hence the error.
I should have taken the size into condideration, but it was overlooked bacause of the cryptic errors that came up.
"Memory overruns can be one of the most difficult problems to isolate"
haha yes this is so true, and i hope my problem will give you an idea on what to look for if you ever run into a similar problem.
*/Edit
...
of debugging a heap memory problem from visual c++ and directx 9?
in debug build:
DAMAGE: after Normal block (#185) at 0x00bc1288
in release build:
HEAP[game.exe]: Heap block at 009861B8 modified at 009861DC past requested size of 1c
and during a run in with a mem profiler
Overrun Detected During Execution: In block 0x019F7278 (28) allocated by global_operator_new.
i get that when the node is being deleted.
Description
Your program has overrun a block of memory and written into the guard bytes. The memory overrun error occurred before the current API.
Memory overruns occur when an application writes beyond the allocated length of the block and overwrites the guard bytes. The overrun will write over a portion of the heap that was not allocated to the application and will corrupt the heap.
after enabling another setting in the profiler
the error happens here:
Temp = new TextureNode(string);
I have a ImageManager class which is a linked list used to manage texture files.
I can add as many items to the list as i want with no problem.
The problem starts when i have over 15 items in it and want to delete everything in the list
the list is deleted in the destructer. If i comment out the functioncall to delets the list i have no memery errors, but alot of mem leaks then.
During debug build i get this error
DAMAGE: after Normal block (#185) at 0x00bc1288
it is a debug error in dbgheap.c
and in relase build i get
HEAP[game.exe]: Heap block at 009861B8 modified at 009861DC past requested size of 1c
these happen when the 15th node in the link list is deleted.
You can download the project http://chazcross.phase9studios.com/files/Game.zip
rember its the ImageManager.cpp and .h file
or you can just go here http://chazcross.phase9studios.com/files/ImageManager.cpp and http://chazcross.phase9studios.com/files/ImageManager.h to get the file itself.
BTW the number of textures that get loaded into the linked list os defined in the map01.txt file under the maps dir. Just increase it by 1 and the errors start. The number to increase is just above the texture names.
any help would be appreciated, cuz i am banging my head on this one.
