Jpeg function crashing or doing nothing!!!

Started by
0 comments, last by Corrosive 21 years, 8 months ago
Im having some problem with this JpegLoad function for some time... in my last implementation, its just dont do nothing. I use an EraseBackground function that do guess what... and the i call the JpegLoad function and it does nothing, but i was using an 1024x768 image and a resolution of only 800x600! then i presumed that it had a surface with wrong size and i edited the image to make it 300x400!! Now when i execute my program it crasheswith this error: Debug Error Damage: after normal block(#47) at 0x00B80068 What is happening?? i just dont know anymore!!! Waiting for help... To code is to make things come to life
To code is to make things come to life ;)
Advertisement
That message means you are writing past the bounds of your allocated memory. In debug mode the CRT memory allocator (ie. new, delete, malloc, calloc, etc...) pad the amount of memory you request to make sure you don''t overwrite the memory bounds.

For example: suppose you create a poiter to an array of bytes like so...
unsigned char* pBytes = new unsigned char[256];

The actual memory layout would look something like:
pppppppp[bbbbb...bbbbb]pppppppp

where p = pad bytes added by the CRT Allocator, and b = the 256 bytes you requested.

If you write outside the bounds of the 256 bytes that you requested the CRT library catches the problem, and gives that message that you are seeing.

Hope this helps.


DLains
DLains

This topic is closed to new replies.

Advertisement