Random OutOfMemoryException in .NET Windows App

R

rubixxcube

Randomly my application throws the following exception, and of course
it only happens in production and i can't reproduct it in Testing.
Does anyone know what causes the following exception:

An exception of the following type occurred:
System.OutOfMemoryException



Stack Trace From Exception:
at
System.Windows.Forms.DibGraphicsBufferManager.bFillBitmapInfo(IntPtr
hdc, IntPtr hpal, BITMAPINFO_FLAT& pbmi)
at
System.Windows.Forms.DibGraphicsBufferManager.CreateCompatibleDIB(IntPtr
hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
at System.Windows.Forms.DibGraphicsBufferManager.CreateBuffer(IntPtr
src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height)
at
System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(Graphics
targetGraphics, IntPtr targetDC, Rectangle targetBounds)
at System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(IntPtr
target, Rectangle targetBounds)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)


Exception Information:
Exception Message: Failed to create a bitmap compatible with the screen
to get information about screen bitmap format.
Exception Source: System.Windows.Forms
Exception Method:
[System.Windows.Forms]System.Windows.Forms.GraphicsBufferManager+DibGraphicsBufferManager::bFillBitmapInfo()
 
R

rubixxcube

No, that is what i don't understand, I am not doing any custom drawing
or GDI work. The only images in the application are on a Third Party
toolbar and on a few image buttons, the image buttons all contain 32
bit bitmaps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top