应用程序错误,错误模块名称:KERNELBASE.DLL

时间:2017-01-11 09:11:36

标签: .net vb.net crash application-error

我有一个用.Net Framework 3.5编写的应用程序。它是在Windows Server 2003 R2上运行的服务。该应用程序具有全局异常处理,其中包含在try-catch外部发生的所有异常都被此全局异常处理(使用AppDomain.UnhandledException完成)捕获。

无论如何,应用程序崩溃了。崩溃后,我可以看到一个"应用程序错误"在Windows的事件查看器中。它告诉我:

Faulting application name: MyApplication.exe
Faulting module name: KERNELBASE.DLL, version 6.3.9600.18007
Exception code: 0xe06d7363

此代码位于frmMain_Load:

 AddHandler Application.ThreadException, AddressOf ThreadExceptionHandler
 AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf UnhandledExceptionHandler

这是处理未处理的例外:

   Private Shared Sub ThreadExceptionHandler(ByVal sender As System.Object, ByVal e As System.Threading.ThreadExceptionEventArgs)

    HandleException(e.Exception, False)

End Sub

Private Shared Sub UnhandledExceptionHandler(ByVal sender As System.Object, ByVal e As System.UnhandledExceptionEventArgs)

    HandleException(CType(e.ExceptionObject, Exception), e.IsTerminating)

End Sub

Private Shared Sub HandleException(ByVal p_Exception As Exception, ByVal p_Kill As Boolean)

    Try
        ERROR_LOG.AddFatalError(New Exception("Unbehandelte Ausnahme." & If(p_Kill, " Die Anwendung wird beendet.", ""), p_Exception))
    Catch
    End Try
    If p_Kill Then System.Environment.Exit(-1)

End Sub

更新1)我在代码中的不同位置插入了未捕获的异常,但每次处理异常时。这是我的开发环境。也许,我必须在服务器上测试它。

我有什么问题?我该如何分析这个错误? 任何提示都是受欢迎的。

0 个答案:

没有答案
相关问题