System.Runtime.InteropServices.SEHException: 外部组件发生异常

OhYeah_Dragon 2010-07-01 04:08:23
程序运行时会偶尔冒出如题的异常,然后程序直接关闭

以下是其中两次的错误信息输出:

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么?

求助高手啊
...全文
6479 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
OhYeah_Dragon 2010-09-13
  • 打赏
  • 举报
回复
原因找到了
是因为.DONETBAR的这个版本有BUG
谢谢大家了
OhYeah_Dragon 2010-07-01
  • 打赏
  • 举报
回复
没人知道么?求助高手啊
OhYeah_Dragon 2010-07-01
  • 打赏
  • 举报
回复
什么叫调用了更新的组件?不明白
Jellyfancy 2010-07-01
  • 打赏
  • 举报
回复
估计你调用了更新的组件了吧
OhYeah_Dragon 2010-07-01
  • 打赏
  • 举报
回复
问题是连在哪里错都不知道啊
我还有一次是直接程序放在那里什么都没操作突然就报外部组件发生异常然后关掉了
Jellyfancy 2010-07-01
  • 打赏
  • 举报
回复
我也碰到过这样的错误。。。
一般说来应该是错误行的第一行是根本原因。。
而且多数是程序细节错误
Jellyfancy 2010-07-01
  • 打赏
  • 举报
回复
顶~~

111,130

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧