SEHException was unhandled外部组件异常

qingtianzhuren 2011-01-12 06:01:07
this.webBrowser1.Url = new System.Uri("http://www.sina.com.cn", System.UriKind.Absolute);
assembly1 = Assembly.LoadFrom(str);

昨天程序还好好的,早上下载了几部电影,中午一打开就报错:
System.Runtime.InteropServices.SEHException was unhandled
Message=External component has thrown an exception.
Source=mscorlib
ErrorCode=-2147467259

把第一句注释了,第二句也报错,而且是同样的错误,我怀疑是不是系统或者VS本身有问题啊,另一个程序都没法调试了,下断点不管用,但有的程序就没事,迷茫中。。。。
...全文
333 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
qingtianzhuren 2011-01-13
  • 打赏
  • 举报
回复
系统重装,搞定!TMD,HOOK看来真不是随便玩的,谢谢一楼!
qingtianzhuren 2011-01-12
  • 打赏
  • 举报
回复
第一句话提示: 未处理 System.Runtime.InteropServices.SEHException
Message=外部组件发生异常。
Source=System.Windows.Forms
ErrorCode=-2147467259
StackTrace:
在 System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
在 System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
在 System.Windows.Forms.WebBrowserBase.WebBrowserBaseNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.IWebBrowser2.Navigate2(Object& URL, Object& flags, Object& targetFrameName, Object& postData, Object& headers)
在 System.Windows.Forms.WebBrowser.PerformNavigate2(Object& URL, Object& flags, Object& targetFrameName, Object& postData, Object& headers)
在 System.Windows.Forms.WebBrowser.set_Url(Uri value)
在 FangFeiKeXing.Form1.InitializeComponent() 位置 D:\AXWEBBROWSER\Form1.Designer.cs:行号 2540
在 FangFeiKeXing.Form1..ctor() 位置 D:\AXWEBBROWSER\Form1.cs:行号 74
在 FangFeiKeXing.Form1.creatNewForm() 位置 D:\AXWEBBROWSER\Form1.cs:行号 83
在 FangFeiKeXing.Program.Main() 位置 D:\AXWEBBROWSER\Program.cs:行号 19
在 System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
InnerException:

第二句话提示:
未处理 System.Runtime.InteropServices.SEHException
Message=外部组件发生异常。
Source=mscorlib
ErrorCode=-2147467259
StackTrace:
在 System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
在 System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
在 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
在 System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
在 System.Reflection.Assembly.LoadFrom(String assemblyFile)
在 FangFeiKeXing.Form1.Form1_fun2_void() 位置 D:\AXWEBBROWSER\Form1.cs:行号 666
在 FangFeiKeXing.Form1.Form1_Load(Object sender, EventArgs e) 位置 D:\AXWEBBROWSER\Form1.cs:行号 100
在 System.Windows.Forms.Form.OnLoad(EventArgs e)
在 DevComponents.DotNetBar.Office2007RibbonForm.OnLoad(EventArgs e)
在 System.Windows.Forms.Form.OnCreateControl()
在 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.Form.WmShowWindow(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.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.Run(Form mainForm)
在 FangFeiKeXing.Program.Main() 位置 D:\AXWEBBROWSER\Program.cs:行号 19
在 System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
InnerException:

说明一点,这两句话,并不在同一个文件当中,更不是连续的两句话,这个程序中,我HOOK了WINNET.DLL,不知是不是这个组件有错误了?因为今天重装了VS2010,情况依旧,应该排除是VS出问题可能性
宝_爸 2011-01-12
  • 打赏
  • 举报
回复
另外如果多线程的话,注意保护竞争资源。
宝_爸 2011-01-12
  • 打赏
  • 举报
回复
请帖 一下Stacktrace.

17,741

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 .NET Framework
社区管理员
  • .NET Framework社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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