0

Environment:

  • Visual Basic (version 2008)
  • .NET Framework 3.5
  • Windows 7 64 bits

Problem:

I have a program with the next start code, that during years worked.

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

But the last week, in some computers with Windows 7 64 bits, sudddenly crashes: "program stopped working":

DEscription: Stopped working

Problem Event Name: APPCRASH

Application Name: nameApp.exe

Application Version: 1.0.5116

Application Timestamp: 52c6d693

Fault Module Name: KERNELBASE.dll

Fault Module Version: 6.1.7601.18229

Fault Module Timestamp: 51fb1116

Exception Code: e053534f

Exception Offset: 0000c41f

the code inside "Sub doWorks()" working properly because I checked that validates the license. The error is inside or after: RaiseEvent WorkFinished(), because LoginForm is not showed.

What is wrong?

3
  • 1
    What does the exception say? Look at the stacktrace of the exception that was throwen.
    – Styxxy
    Apr 14, 2014 at 10:03
  • no throw any message from the application and the error is not catched in the program. Only is displayed this message from Windows
    – kontable
    Apr 15, 2014 at 10:03
  • 1
    Looking for the Exception Code, one of the first hits leads me here and here. You'll have to do some more digging yourself though.
    – Styxxy
    Apr 15, 2014 at 11:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.