0

我们有一个使用 VB.NET VS2012 构建的大型应用程序。关闭应用程序时不时unhandled exception发生。非常随机,有时会,有时不会。

错误如下。

System.InvalidOperationException was unhandled
  HResult=-2146233079
  Message=Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
  Source=System.Windows.Forms
  StackTrace:
       at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
       at System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args)
       at System.Windows.Forms.WindowsFormsSynchronizationContext.Post(SendOrPostCallback d, Object state)
       at System.Windows.Forms.AxHost.ConnectionPointCookie.Finalize()
  InnerException: 

我们生成了一个转储文件来尝试找到它的来源,但没有运气。调试器只显示No source code available. 我们正在使用一些第三方控件。此时我们只想找到试图创建控件的内容。如果它是第三方控件的问题,并且如果我们没有该代码,我们无法修复它,但也许我们可以解决它。但是我们找不到试图创建控制的东西(关闭时)。

我们已经查看了许多描述如何使用故障转储文件的网络帖子,但没有找到生成此文件的控件(甚至是控件类型)。仅知道类型将有助于缩小范围。

任何想法我们如何至少获得控制类型或发起调用者或?

如果没有提供足够的信息,请告诉我,我会发布我可以发布的内容。

发布代码不是一种选择,因为我们不知道消息来自哪里。

提前致谢!

我应该补充一点,我们确实对几乎所有事情都使用了 try catch 块。我们也有一个日志记录程序,但我们没有在日志文件中看到任何这些异常。

4

0 回答 0