环境:
问题:
我有一个程序,下一个启动代码,在多年的工作中。
Public Class SplashFrm
Private WithEvents DoSomeWork As ValidateCls
Private Sub SplashFrm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.Show()
DoSomeWork = New ValidateCls
Application.DoEvents()
DoSomeWork.doWorks()
End Sub
Private Sub React() Handles DoSomeWork.WorkFinished
LoginFrm.Show()
Me.Close()
End Sub
End Class
Public Class ValidateCls
Public Event WorkFinished()
Sub doWorks()
AddHandler System.AppDomain.CurrentDomain.UnhandledException, AddressOf OnUnhandledException
Try
'here code to validate licenses.
'i can not put the code, but it works fine because I can see that is validating ok.
Catch ex As Exception
SaveError("ValidateCls-1", ex.ToString)
End
End Try
RaiseEvent WorkFinished()
End Sub
Private Sub OnUnhandledException(ByVal sender As Object, ByVal e As UnhandledExceptionEventArgs)
Try
HandleUnhandledException(e.ExceptionObject)
Catch ex As Exception
End Try
End Sub
Private Sub HandleUnhandledException(ByVal o As Object)
If o Is Nothing Then Return
Try
Dim e As Exception = DirectCast(o, Exception)
MessageBox.Show(e.StackTrace, "Unhandled exception.")
Catch ex As Exception
MessageBox.Show(ex.Message, "Unhandled exception.")
Finally
Application.Exit()
End Try
End Sub
End Class
但上周,在一些装有Windows 7 64位的计算机上,突然崩溃:“程序停止工作”:
说明:停止工作
问题事件名称:APPCRASH
应用程序名称:nameApp.exe
应用版本:1.0.5116
申请时间戳:52c6d693
故障模块名称:KERNELBASE.dll
故障模块版本:6.1.7601.18229
故障模块时间戳:51fb1116
例外代码:e053534f
异常偏移:0000c41f
“sub doWorks()”中的代码正常工作,因为我检查了验证许可证。错误在内部或之后:RaiseEvent WorkFinished(),因为没有显示LoginForm。
有什么问题?