This project is read-only.

GDIPlus out of memory error

Topics: Bug Information
Mar 6, 2012 at 4:05 PM

Hi all,

I've been using Doug Hennig's lightbox.prg (contributed a while back via FoxRockX) and it has generally worked well. However, I have one form where I get a GDIPlus out of memory error when the following line is executed:

loBmp = .Bitmap.FromScreen(toForm.imgLightBox)

The error dialog appears as an assert style messagebox with a caption of GDIPlus:Error Out of memory.

I can see that the toForm object is in scope and referring to the appropriate form reference. The imgLightBox object was successfully added. The error appears to be occurring in xfcdrawing:bitmap_access but I get a source not available message in the debugger. I'm going in circles trying to debug this and would appreciate any insight that can be offered on figuring out what is causing the out of memory error.



Mar 7, 2012 at 2:43 PM

Hi Richard.

I've seen that error too but wasn't able to resolve it, so I wrapped that statement in a TRY.


Mar 7, 2012 at 5:50 PM

Thanks for the reply, Doug. I appreciate it. This is basically what I’ve done, too.

Did you comment out the ASSERT in system.drawing.prg (~line 7124) or simply ignore this when it happens in the dev environment.



Mar 7, 2012 at 8:16 PM

I haven't actually had it happen in the IDE, just at runtime.