chinab / kaixin001-helper

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

运行较长一段时间以后出现异常 #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
连续运行不超过24小时后,就会出现以下异常,每次都可重现
。感觉象是打印日志的窗口超出了
它所能容纳的内容,是否应该及时把过期的日志清楚,或者��
�虑备份至日志文件。

See the end of this message for details on invoking 
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.CreateCompatibleDIB(IntPtr 
hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
   at System.Drawing.BufferedGraphicsContext.CreateBuffer(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(IntPtr 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(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at DevComponents.DotNetBar.Office2007RibbonForm.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)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: 
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
!
    Assembly Version: 0.0.0.0
    Win32 Version: 0.0.0.0
    CodeBase: file:///C:/Documents%20and%
20Settings/Administrator/Desktop/Farmer_V1.0_Build20090306/开心网花园农
夫.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: 
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c56
1934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: 
file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/Syste
m.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: 
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a
3a/System.Drawing.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: 
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/S
ystem.Xml.dll
----------------------------------------
开心网花园农夫
    Assembly Version: 1.0.0.0
    Win32 Version: 0.0.0.0
    CodeBase: file:///C:/Documents%20and%
20Settings/Administrator/Desktop/Farmer_V1.0_Build20090306/开心网花园农
夫.exe
----------------------------------------
DevComponents.DotNetBar2
    Assembly Version: 7.5.0.2
    Win32 Version: 7.5.0.2
    CodeBase: file:///C:/Documents%20and%
20Settings/Administrator/Desktop/Farmer_V1.0_Build20090306/DevComponents.Do
tNetBar2.DLL
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: 
file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3
a/Accessibility.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: 
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f
11d50a3a/System.Configuration.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Original issue reported on code.google.com by siming.w...@gmail.com on 6 Mar 2009 at 3:12

GoogleCodeExporter commented 9 years ago
超过3000行,将自动清空消息并保存日志

Original comment by Mr.Ja...@gmail.com on 7 Mar 2009 at 6:18

GoogleCodeExporter commented 9 years ago
在更新至0308版本后,依然出现类似问题。请作者再看看是否�
��代码中已经有清空TextBox的相关代码,可能
3000行也太多了。其实只保留上一次循环的结果就可以了。

Original comment by siming.w...@gmail.com on 9 Mar 2009 at 9:42

GoogleCodeExporter commented 9 years ago
Jailu您好,上次我提到的TextBox没有清空,经过调查不是真正��
�原因。
造成这个错误的机制比较复杂,简单的说这是DevComponents.DotNet
Bar2控件的一个bug。
微软自己提供的一个近似方案是把Office2007RibbonForm的DoubleBuffer
ed设置为false。
参照:http://nomagichere.blogspot.com/2008/03/systemcomponentmodelwin32except
ion-
is.html

经过2天的试验,确实不再发生异常了。

Original comment by tony2u on 10 Mar 2009 at 8:32

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
再次感谢你的建议

Original comment by Mr.Ja...@gmail.com on 24 Mar 2009 at 2:44

GoogleCodeExporter commented 9 years ago

Original comment by Mr.Ja...@gmail.com on 24 Mar 2009 at 2:45

GoogleCodeExporter commented 9 years ago
这个Exception在0325版依然存在:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ComponentModel.Win32Exception: 
存储空间不足,无法处理此命令。
   at System.Drawing.BufferedGraphicsContext.CreateCompatibleDIB(IntPtr hdc, IntPtr 
hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
   at System.Drawing.BufferedGraphicsContext.CreateBuffer(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(IntPtr 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(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at DevComponents.DotNetBar.Office2007RibbonForm.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)

Original comment by soda...@gmail.com on 25 Mar 2009 at 2:51

GoogleCodeExporter commented 9 years ago
的确如此。以下为提示内容:

------------------------------------------
应用程序中发生了无法处理的错误。如果单击“继续”,应��
�程序将忽略此错误并尝试继续。如
果单击“退出”,应用程序将立即关闭。

缓冲操作当前正在进行中,无法释放 BufferedGraphicsContext 。。

详细信息:
------------------------------------------
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.InvalidOperationException: 
缓冲操作当前正在进行中,无法释放 
BufferedGraphicsContext。
   在 System.Drawing.BufferedGraphicsContext.Dispose(Boolean disposing)
   在 System.Drawing.BufferedGraphicsContext.Dispose()
   在 System.Drawing.BufferedGraphicsContext.AllocBufferInTempManager(Graphics 
targetGraphics, IntPtr targetDC, Rectangle targetRectangle)
   在 System.Drawing.BufferedGraphicsContext.AllocBuffer(Graphics targetGraphics, 
IntPtr targetDC, Rectangle targetRectangle)
   在 System.Drawing.BufferedGraphicsContext.Allocate(IntPtr targetDC, Rectangle 
targetRectangle)
   在 System.Windows.Forms.Control.WmPaint(Message& m)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   在 System.Windows.Forms.ContainerControl.WndProc(Message& m)
   在 System.Windows.Forms.Form.WndProc(Message& m)
   在 DevComponents.DotNetBar.Office2007RibbonForm.WndProc(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr 
wparam, IntPtr lparam)

************** 已加载的程序集 **************
mscorlib
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
!
    程序集版本: 0.0.0.0
    Win32 版本: 0.0.0.0
    基本代码: file:///E:/MiniTools/开心001/花园/开心网花园农夫.exe
----------------------------------------
System.Windows.Forms
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码: 
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e
089/S
ystem.Windows.Forms.dll
----------------------------------------
System
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码: 
file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码: 
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/Sy
stem.
Drawing.dll
----------------------------------------
System.Xml
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码: 
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System
.Xml.
dll
----------------------------------------
mscorlib.resources
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
开心网花园农夫
    程序集版本: 1.0.0.0
    Win32 版本: 0.0.0.0
    基本代码: file:///E:/MiniTools/开心001/花园/开心网花园农夫.exe
----------------------------------------
DevComponents.DotNetBar2
    程序集版本: 7.5.0.2
    Win32 版本: 7.5.0.2
    基本代码: file:///E:/MiniTools/开心001/花园/DevComponents.DotNetBar2.DLL
----------------------------------------
Accessibility
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码: 
file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Acc
essib
ility.dll
----------------------------------------
System.Windows.Forms.resources
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.42 (RTM.050727-4200)
    基本代码: 
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-
CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
System.Configuration
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码: 
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50
a3a/S
ystem.Configuration.dll
----------------------------------------
System.Drawing.resources
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.42 (RTM.050727-4200)
    基本代码: 
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing.resources/2.0.0.0_zh-
CHS_b03f5f7f11d50a3a/System.Drawing.resources.dll
----------------------------------------

************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 
system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。

例如: 

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。

Original comment by jacob...@gmail.com on 29 Mar 2009 at 9:00

GoogleCodeExporter commented 9 years ago
目前我写的程序也出现此现像,请教此问题是如何解决的?
谢谢

Original comment by xchangli on 27 Jan 2010 at 5:01