当前位置:编程学习 > C#/ASP.NET >>

.NET winform开发的程序在ATI(AMD芯片)出现System.Drawing 内存溢出,请问大家有什么好的方案

.NET winform开发的程序在ATI(AMD芯片)出现System.Drawing 内存溢出,请问大家有什么好的方案

开发环境:VS2008 .NET 2.0
.NET VAR:客户机安装.NET 2.0 SP1,3.5都安装过

问题:在2个.NET程序同时运行的时候,VS2008自带的组件会出现红叉,提示System.Drawing 内存溢出

目前解决方法:卸载AMD显示驱动程序以后就可以了.

网上查找到的问题说是.NET 使用VS2008编译的程序与AMD显示芯片不兼容的原因造成的,但是却没有说如何去解决。
--------------------编程问答-------------------- 程序运行过程中发生错误,错误信息如下:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
发生错误的程序集为:System.Drawing
发生错误的具体位置为:
   at System.Drawing.SafeNativeMethods.Gdip.GdipFillRectangleI(HandleRef graphics, HandleRef brush, Int32 x, Int32 y, Int32 width, Int32 height)
   at System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height)
   at System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)
   at System.Windows.Forms.ControlPaint.DrawBackgroundImage(Graphics g, Image backgroundImage, Color backColor, ImageLayout backgroundImageLayout, Rectangle bounds, Rectangle clipRect, Point scrollOffset, RightToLeft rightToLeft)
   at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset)
   at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle)
   at System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs pevent)
   at System.Windows.Forms.ScrollableControl.OnPaintBackground(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmEraseBkgnd(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) --------------------编程问答-------------------- 去微软的官方网站提问试试,这里估计很难找到答案,太偏了。 --------------------编程问答-------------------- 目测很少人用C#搞芯片开发吧,不过我家的技嘉主板软件是.NET写的
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,