473,505 Members | 13,696 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3302
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
2282
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
10018
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
4299
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
2729
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
651
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
5964
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
2081
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
3866
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
12909
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
12540
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
7213
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7298
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,...
1
7017
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
7471
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...
0
5610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1526
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
406
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.