chinab / kaixin001-helper

Automatically exported from code.google.com/p/kaixin001-helper
0 stars 0 forks source link

运行一段时间后程序崩溃的问题 #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ComponentModel.Win32Exception: Not enough storage is available to 
process this command
at System.Drawing.BufferedGraphicsContext.CreateCompa tibleDIB(IntPtr hdc, 
IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
at System.Drawing.BufferedGraphicsContext.CreateBuffe r(IntPtr src, Int32 
offsetX, Int32 offsetY, Int32 width, Int32 height)
at System.Drawing.BufferedGraphicsContext.AllocBuffer (Graphics 
targetGraphics, IntPtr targetDC, Rectangle targetRectangle)
at System.Drawing.BufferedGraphicsContext.Allocate(In tPtr targetDC, 
Rectangle targetRectangle)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at DevComponents.DotNetBar.Office2007RibbonForm.WndPr oc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, 
IntPtr wparam, IntPtr lparam)

硬盘空间明明还有几个G空间。
怀疑是TextBox内消息太多,没有清除的原因。
private void ShowMsg(string msg)
{
     if (txtWorkingBoard.Lines.Length > 3000)
         txtWorkingBoard.Clear();
     txtWorkingBoard.AppendText(msg);
}
加上该判断后,到目前为止还没有崩溃。

Original issue reported on code.google.com by tony2u on 6 Mar 2009 at 6:41

GoogleCodeExporter commented 9 years ago

Original comment by Mr.Ja...@gmail.com on 6 Mar 2009 at 8:48

GoogleCodeExporter commented 9 years ago
赞,楼上的兄弟!
源代码中Google 
Code上可以自由获取,感谢发现问题并提供解决方案者

Original comment by Mr.Ja...@gmail.com on 6 Mar 2009 at 8:50

GoogleCodeExporter commented 9 years ago

Original comment by Mr.Ja...@gmail.com on 6 Mar 2009 at 12:51

GoogleCodeExporter commented 9 years ago

Original comment by Mr.Ja...@gmail.com on 19 Mar 2009 at 12:38