System.Runtime.InteropServices.SEHException: 外部组件发生异常
程序运行时会偶尔冒出如题的异常,然后程序直接关闭
以下是其中两次的错误信息输出:
1、
15:50:22> Program->Main()时错误:外部组件发生异常。
详细堆栈内容 在 System.Drawing.SafeNativeMethods.Gdip.FindAtom(String
lpString)
在 System.Drawing.SafeNativeMethods.Gdip.GdipDeleteMatrix(HandleRef
matrix)
在 System.Drawing.Drawing2D.Matrix.Dispose(Boolean disposing)
在 System.Drawing.Drawing2D.Matrix.Dispose()
在 System.Drawing.GraphicsContext..ctor(Graphics g)
在 System.Drawing.Graphics.Save()
在 System.Windows.Forms.PaintEventArgs.get_Graphics()
在 System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs
e, Rectangle rectangle, Region transparentRegion)
在 System.Windows.Forms.Control.PaintBackground(PaintEventArgs e,
Rectangle rectangle, Color backColor, Point scrollOffset)
在 System.Windows.Forms.Control.PaintBackground(PaintEventArgs e,
Rectangle rectangle)
在 System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs pevent)
在 System.Windows.Forms.ScrollableControl.OnPaintBackground(PaintEventArgs
e)
在 System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs
e, Rectangle rectangle, Region transparentRegion)
在 System.Windows.Forms.Control.PaintBackground(PaintEventArgs e,
Rectangle rectangle, Color backColor, Point scrollOffset)
在 System.Windows.Forms.Control.PaintBackground(PaintEventArgs e,
Rectangle rectangle)
在 System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs pevent)
在 System.Windows.Forms.ScrollableControl.OnPaintBackground(PaintEventArgs
e)
在 System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs
e, Rectangle rectangle, Region transparentRegion)
在 System.Windows.Forms.Control.PaintBackground(PaintEventArgs e,
Rectangle rectangle, Color backColor, Point scrollOffset)
在 System.Windows.Forms.Control.PaintBackground(PaintEventArgs e,
Rectangle rectangle)
在 System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs pevent)
在 DevComponents.DotNetBar.ButtonX.OnPaint(PaintEventArgs e)
在 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e,
Int16 layer, Boolean disposeEventArgs)
在 System.Windows.Forms.Control.WmPaint(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 DevComponents.DotNetBar.PopupItemControl.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
在
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.Unsafe
NativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID,
Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner
(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)
在 System.Windows.Forms.Application.Run(Form mainForm)
在 CardServer.Program.Main() 位置 H:\高铁快卡通\SVN\src\客服系统
\CardServer新版\CardServer\Program.cs:行号 28
引起异常的对象:System.Drawing
2、
14:39:01> 在 System.Drawing.SafeNativeMethods.Gdip.GdipGetFontHeight(HandleRef font, HandleRef graphics, Single& size)
在 System.Drawing.Font.GetHeight(Graphics graphics)
在 System.Drawing.Font.GetHeight()
在 System.Drawing.Font.get_Height()
在 DevComponents.DotNetBar.Controls.TextBoxX.?()
在 DevComponents.DotNetBar.Controls.TextBoxX.InvalidateNonClient()
在 DevComponents.DotNetBar.Controls.TextBoxX.?(Object ?, EventArgs ?)
在 DevComponents.Editors.VisualItem.OnArrangeInvalid()
在 DevComponents.Editors.VisualItem.InvalidateArrange()
在 DevComponents.DotNetBar.Controls.TextBoxX.OnResize(EventArgs e)
在 System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
在 System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
在 System.Windows.Forms.Control.UpdateBounds()
在 System.Windows.Forms.Control.WmCreate(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.TextBoxBase.WndProc(Message& m)
在 System.Windows.Forms.TextBox.WndProc(Message& m)
在 DevComponents.DotNetBar.Controls.TextBoxX.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.IntCreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
在 System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
在 System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
在 System.Windows.Forms.Control.CreateHandle()
在 System.Windows.Forms.TextBoxBase.CreateHandle()
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl()
在 System.Windows.Forms.Control.WmShowWindow(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.WmShowWindow(Message& m)
在 System.Windows.Forms.Form.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
在 System.Windows.Forms.Control.SetVisibleCore(Boolean value)
在 System.Windows.Forms.Form.SetVisibleCore(Boolean value)
在 System.Windows.Forms.Control.set_Visible(Boolean value)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.RunDialog(Form form)
在 System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
在 System.Windows.Forms.Form.ShowDialog()
在 CardServer.GUI.FrmMain.btAddCancel_Click(Object sender, EventArgs e) 位置 H:\高铁快卡通\SVN\src\客服系统\CardServer新版\CardServer\GUI\FrmMain.cs:行号 1120
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 DevComponents.DotNetBar.ButtonX.PerformClick()
在 DevComponents.DotNetBar.ButtonX.ProcessMnemonic(Char charCode)
在 System.Windows.Forms.ContainerControl.ProcessMnemonic(Char charCode)
在 System.Windows.Forms.Form.ProcessMnemonic(Char charCode)
在 System.Windows.Forms.ContainerControl.ProcessDialogChar(Char charCode)
在 System.Windows.Forms.Form.ProcessDialogChar(Char charCode)
在 System.Windows.Forms.Control.ProcessDialogChar(Char charCode)
在 System.Windows.Forms.Control.ProcessDialogChar(Char charCode)
在 System.Windows.Forms.Control.ProcessDialogChar(Char charCode)
在 System.Windows.Forms.Control.ProcessDialogChar(Char charCode)
在 System.Windows.Forms.Control.PreProcessMessage(Message& msg)
在 System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
在 System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
在 System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG& msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.Run(Form mainForm)
在 CardServer.Program.Main() 位置 H:\高铁快卡通\SVN\src\客服系统\CardServer新版\CardServer\Program.cs:行号 28
都是在System.Drawing.SafeNativeMethods.Gdip里的函数里报错 ,不知道这个是干吗用的?
我使用的第三方控件只有DotNetBar,会是DotNetBar的BUG么?
求助高手啊