473,394 Members | 1,811 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Random OutOfMemoryException in .NET Windows App


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.bFil lBitmapInfo(IntPtr
hdc, IntPtr hpal, BITMAPINFO_FLAT& pbmi)
at
System.Windows.Forms.DibGraphicsBufferManager.Crea teCompatibleDIB(IntPtr
hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
at System.Windows.Forms.DibGraphicsBufferManager.Crea teBuffer(IntPtr
src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height)
at
System.Windows.Forms.DibGraphicsBufferManager.Allo cBuffer(Graphics
targetGraphics, IntPtr targetDC, Rectangle targetBounds)
at System.Windows.Forms.DibGraphicsBufferManager.Allo cBuffer(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(M essage& 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+DibGrap hicsBufferManager::bFillBitmapInfo()

Nov 22 '05 #1
4 3298
Are you creating your own Graphics objects for GDI?

"rubixxcube" <ab*******@juniper.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...

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.bFil lBitmapInfo(IntPtr
hdc, IntPtr hpal, BITMAPINFO_FLAT& pbmi)
at
System.Windows.Forms.DibGraphicsBufferManager.Crea teCompatibleDIB(IntPtr
hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
at System.Windows.Forms.DibGraphicsBufferManager.Crea teBuffer(IntPtr
src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height)
at
System.Windows.Forms.DibGraphicsBufferManager.Allo cBuffer(Graphics
targetGraphics, IntPtr targetDC, Rectangle targetBounds)
at System.Windows.Forms.DibGraphicsBufferManager.Allo cBuffer(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(M essage& 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+DibGrap hicsBufferManager::bFillBitmapInfo()

Nov 22 '05 #2
Are you creating your own Graphics objects for GDI?

"rubixxcube" <ab*******@juniper.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...

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.bFil lBitmapInfo(IntPtr
hdc, IntPtr hpal, BITMAPINFO_FLAT& pbmi)
at
System.Windows.Forms.DibGraphicsBufferManager.Crea teCompatibleDIB(IntPtr
hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
at System.Windows.Forms.DibGraphicsBufferManager.Crea teBuffer(IntPtr
src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height)
at
System.Windows.Forms.DibGraphicsBufferManager.Allo cBuffer(Graphics
targetGraphics, IntPtr targetDC, Rectangle targetBounds)
at System.Windows.Forms.DibGraphicsBufferManager.Allo cBuffer(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(M essage& 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+DibGrap hicsBufferManager::bFillBitmapInfo()

Nov 22 '05 #3
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.

Nov 22 '05 #4
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.

Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: solomon | last post by:
Hi, I have installed VS.Net(Ver:7.0.9466) & .Net_Frameword_1.0 (Ver: 1.0.3705). Until recently, I could develop and run applications using the IDE. A couple of days ago, I downloaded a sample...
1
by: king solomon | last post by:
Hi, I have installed VS.Net(Ver:7.0.9466) & .Net_Frameword_1.0 (Ver: 1.0.3705). Until recently, I could develop and run applications using the VS.IDE. A couple of days ago, I downloaded a...
4
by: Ryan Seghers | last post by:
I've got a program that has no user interface (like a service but not actually a Windows Service yet) in which I'd like to handle OutOfMemoryExceptions. I'd at least like to log the failure before...
0
by: Per Bergland | last post by:
After many woes, I finally managed to get a stack dump of my System Service (written in C#) that insists on crashing when launched at system boot time (see below on how to get this dump - I...
2
by: rubixxcube | last post by:
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...
3
by: Michael | last post by:
I have a problem with catching the OutOfMemoryException in a managed C+ application. When creating small objects on the managed heap neithe the catch handler for OutOfMemoryException nor the...
4
by: Ed Chiu | last post by:
Hi, I migrated our company's ASP.Net web appplication from a regular Pentium 4 machine to a multiple xeon processors machine. The web application was acceptable in speed on the old machine, I...
1
by: Ashkan Daie | last post by:
Hi All, When trying to install a performance counter via InstallUtil I get the following exception: Creating performance counter category Enterprise Library Caching. An exception occurred...
13
by: Venkatachalam | last post by:
Hi, In my application I have text(flat) file as input and I have to generate an XML file. The maximum input text file size can be 900MB and gererated xml may result 2+ GB. Based on the first...
8
by: =?Utf-8?B?UGlnZ3k=?= | last post by:
Hi to all, I am getting this System.OutOfMemoryException calling the Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(<stream>,<Obj>) method. The type of <streamis...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.