Tracking down memory access violation errors

BlitzPlus Forums/BlitzPlus Programming/Tracking down memory access violation errors

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Yes, but do you re-use any image handles during your game.

IMtemp=LoadImage "gfx/talt.bmp"
freeimage IMtemp
IMtemp=LoadImage "gfx/fume.bmp"


Calling freeimage alone is not enough, you have to zero out it's handle as well. Otherwise you get VERY unpredictable errors (usually missing images) that occur randomly in future graphics operation.

Use this logic (probably best to make a function) and see if it helps
if IMtemp<>false then freeimage IMtemp : IMtemp=false


According to Mark this is expected behaviour and not a bug, but he did concede it should have been mentioned in the manual.