Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Corrosive

Jpeg function crashing or doing nothing!!!

This topic is 5819 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!