none
Program crashes on exit (.NET Framework 3.5 RRS feed

  • Question

  • Program

    • App developed using Visual Basic 2008 Express.
    • Its written in VB.
    • x86 compiled.
    • Target .NET Framework 3.5

    OS - Tested

    Runs fine: under all OS 32 & 64 bits, from XP to Windows 8 32 bits.

    But fail: under Windows 8 64 bits. when I close the app

    Problem under W8 64 bits:

    When I close the App, this message is displayed:

    "program stopped working".

    works fine when I work with the app. Only the error occurs when I close it.

    Event:

    Version=1
    EventType=APPCRASH
    EventTime=130002277334069477
    ReportType=2
    Consent=1
    UploadTime=130002277335317503
    ReportIdentifier=26275a65-4855-11e2-be6e-e0cb4e25d1db
    WOW64=1
    Response.type=4
    Sig[0].Name=Application Name
    Sig[0].Value=XXXX.exe
    Sig[1].Name=Application Version
    Sig[1].Value=2.0.4689.31667
    Sig[2].Name=Application Timestamp
    Sig[2].Value=5093f665
    Sig[3].Name=Fault Module Name
    Sig[3].Value=KERNELBASE.dll
    Sig[4].Name=Fault Module Version
    Sig[4].Value=6.2.9200.16451
    Sig[5].Name=Fault Module Timestamp
    Sig[5].Value=50988950
    Sig[6].Name=Exception Code
    Sig[6].Value=c0020001
    Sig[7].Name=Exception Offset
    Sig[7].Value=00014b32
    DynamicSig[1].Name=Versión del sistema operativo
    DynamicSig[1].Value=6.2.9200.2.0.0.256.48
    DynamicSig[2].Name=Id. de configuración regional
    DynamicSig[2].Value=3082
    UI[2]=C:\Program Files (x86)\XXXX 11\XXXX.exe
    UI[3]=XXXX Edition 11 dejó de funcionar
    UI[4]=Windows puede buscar una solución en línea al problema.
    UI[5]=Buscar una solución en línea y cerrar el programa
    UI[6]=Buscar una solución en línea más tarde y cerrar el programa
    UI[7]=Cerrar el programa
    LoadedModule[0]=C:\Program Files (x86)\XXXX 11\XXXX.exe
    LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll
    LoadedModule[2]=C:\Windows\SYSTEM32\MSCOREE.DLL
    LoadedModule[3]=C:\Windows\SYSTEM32\KERNEL32.dll
    LoadedModule[4]=C:\Windows\SYSTEM32\KERNELBASE.dll
    LoadedModule[5]=C:\Windows\SYSTEM32\ADVAPI32.dll
    LoadedModule[6]=C:\Windows\SYSTEM32\msvcrt.dll
    LoadedModule[7]=C:\Windows\SYSTEM32\sechost.dll
    LoadedModule[8]=C:\Windows\SYSTEM32\RPCRT4.dll
    LoadedModule[9]=C:\Windows\SYSTEM32\SspiCli.dll
    LoadedModule[10]=C:\Windows\SYSTEM32\CRYPTBASE.dll
    LoadedModule[11]=C:\Windows\SYSTEM32\bcryptPrimitives.dll
    LoadedModule[12]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll
    LoadedModule[13]=C:\Windows\SYSTEM32\SHLWAPI.dll
    LoadedModule[14]=C:\Windows\SYSTEM32\USER32.dll
    LoadedModule[15]=C:\Windows\SYSTEM32\GDI32.dll
    LoadedModule[16]=C:\Windows\system32\IMM32.DLL
    LoadedModule[17]=C:\Windows\SYSTEM32\MSCTF.dll
    LoadedModule[18]=C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
    LoadedModule[19]=C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6910_none_d089c358442de345\MSVCR80.dll
    LoadedModule[20]=C:\Windows\SYSTEM32\shell32.dll
    LoadedModule[21]=C:\Windows\SYSTEM32\combase.dll
    LoadedModule[22]=C:\Windows\SYSTEM32\SHCORE.dll
    LoadedModule[23]=C:\Windows\SYSTEM32\profapi.dll
    LoadedModule[24]=C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll
    LoadedModule[25]=C:\Windows\SYSTEM32\ole32.dll
    LoadedModule[26]=C:\Windows\system32\uxtheme.dll
    LoadedModule[27]=C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll
    LoadedModule[28]=C:\Windows\assembly\GAC_MSIL\Microsoft.VisualBasic\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll
    LoadedModule[29]=C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll
    LoadedModule[30]=C:\Windows\SYSTEM32\VERSION.dll
    LoadedModule[31]=C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll
    LoadedModule[32]=C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll
    LoadedModule[33]=C:\Windows\SYSTEM32\dwmapi.dll
    LoadedModule[34]=C:\Windows\assembly\GAC_MSIL\Accessibility\2.0.0.0__b03f5f7f11d50a3a\Accessibility.dll
    LoadedModule[35]=C:\Windows\assembly\GAC_MSIL\System.Runtime.Remoting\2.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll
    LoadedModule[36]=C:\Windows\SYSTEM32\CRYPTSP.dll
    LoadedModule[37]=C:\Windows\system32\rsaenh.dll
    LoadedModule[38]=C:\Program Files (x86)\XXXX 11\DevExpress.XtraEditors.v8.3.dll
    LoadedModule[39]=C:\Program Files (x86)\XXXX 11\DevExpress.Utils.v8.3.dll
    LoadedModule[40]=C:\Program Files (x86)\XXXX 11\DevExpress.Data.v8.3.dll
    LoadedModule[41]=C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9200.16384_none_ba245425e0986353\gdiplus.dll
    LoadedModule[42]=C:\Windows\SYSTEM32\DWrite.dll
    LoadedModule[43]=C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll
    LoadedModule[44]=C:\Windows\SYSTEM32\WindowsCodecs.dll
    LoadedModule[45]=C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16384_none_893961408605e985\comctl32.dll
    LoadedModule[46]=C:\Program Files (x86)\XXXX 11\iniGraficosVL.dll
    LoadedModule[47]=C:\Program Files (x86)\XXXX 11\iniappSat11.dll
    LoadedModule[48]=C:\Program Files (x86)\XXXX 11\DevExpress.XtraBars.v8.3.dll
    LoadedModule[49]=C:\Program Files (x86)\XXXX 11\DevExpress.OfficeSkins.v8.3.dll
    LoadedModule[50]=C:\Program Files (x86)\XXXX 11\DevExpress.BonusSkins.v8.3.dll
    LoadedModule[51]=C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll
    LoadedModule[52]=C:\Windows\SYSTEM32\WS2_32.dll
    LoadedModule[53]=C:\Windows\SYSTEM32\CRYPT32.dll
    LoadedModule[54]=C:\Windows\SYSTEM32\NSI.dll
    LoadedModule[55]=C:\Windows\SYSTEM32\MSASN1.dll
    LoadedModule[56]=C:\Windows\assembly\GAC_MSIL\mscorlib.resources\2.0.0.0_es_b77a5c561934e089\mscorlib.resources.dll
    LoadedModule[57]=C:\Program Files (x86)\XXXX 11\es\DevExpress.XtraBars.v8.3.resources.dll
    LoadedModule[58]=C:\Windows\SYSTEM32\oleaut32.dll
    LoadedModule[59]=C:\Program Files (x86)\XXXX 11\QlmLicenseLib.dll
    LoadedModule[60]=C:\Windows\assembly\GAC_MSIL\System.Management\2.0.0.0__b03f5f7f11d50a3a\System.Management.dll
    LoadedModule[61]=C:\Windows\SYSTEM32\clbcatq.dll
    LoadedModule[62]=C:\Windows\system32\wbem\wmiutils.dll
    LoadedModule[63]=C:\Windows\SYSTEM32\wbemcomn.dll
    LoadedModule[64]=C:\Windows\system32\wbem\wbemprox.dll
    LoadedModule[65]=C:\Windows\Microsoft.NET\Framework\v2.0.50727\wminet_utils.dll
    LoadedModule[66]=C:\Windows\system32\wbem\wbemsvc.dll
    LoadedModule[67]=C:\Windows\system32\wbem\fastprox.dll
    LoadedModule[68]=C:\Program Files (x86)\XXXX 11\IsLicense40.dll
    LoadedModule[69]=C:\Windows\SYSTEM32\COMDLG32.dll
    LoadedModule[70]=C:\Windows\SYSTEM32\WINSPOOL.DRV
    LoadedModule[71]=C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9200.16384_none_bf100cd445f4d954\COMCTL32.dll
    LoadedModule[72]=C:\Program Files (x86)\XXXX 11\es\QlmLicenseLib.resources.dll
    LoadedModule[73]=C:\Windows\assembly\GAC_32\System.Transactions\2.0.0.0__b77a5c561934e089\System.Transactions.dll
    LoadedModule[74]=C:\Windows\SYSTEM32\sxs.dll
    LoadedModule[75]=C:\Program Files (x86)\Common Files\System\Ole DB\oledb32.dll
    LoadedModule[76]=C:\Windows\SYSTEM32\MSDART.DLL
    LoadedModule[77]=C:\Windows\SYSTEM32\bcrypt.dll
    LoadedModule[78]=C:\Windows\SYSTEM32\comsvcs.dll
    LoadedModule[79]=C:\Windows\SYSTEM32\msjetoledb40.dll
    LoadedModule[80]=C:\Windows\SYSTEM32\msjet40.dll
    LoadedModule[81]=C:\Windows\SYSTEM32\msjter40.dll
    LoadedModule[82]=C:\Windows\SYSTEM32\mswstr10.dll
    LoadedModule[83]=C:\Windows\SYSTEM32\MSJINT40.DLL
    LoadedModule[84]=C:\Windows\SYSTEM32\DPAPI.DLL
    LoadedModule[85]=C:\Windows\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll
    LoadedModule[86]=C:\Windows\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper.dll
    LoadedModule[87]=C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll
    LoadedModule[88]=C:\Windows\SYSTEM32\msjtes40.dll
    LoadedModule[89]=C:\Windows\SYSTEM32\VBAJET32.DLL
    LoadedModule[90]=C:\Windows\SYSTEM32\expsrv.dll
    LoadedModule[91]=C:\Windows\assembly\GAC_MSIL\System.Data.resources\2.0.0.0_es_b77a5c561934e089\System.Data.resources.dll
    LoadedModule[92]=C:\Program Files (x86)\XXXX 11\es\DevExpress.XtraEditors.v8.3.resources.dll
    FriendlyEventName=APPCRASH
    ConsentKey=APPCRASH
    AppName=XXXX Edition 09
    AppPath=C:\Program Files (x86)\XXXX 11\XXXX.exe
    ReportDescription=Stopped working

     


    Saludos / Regards

    Monday, December 17, 2012 3:10 PM

Answers

  • Hi:

    I think that I solved this issue. Now, when I close the login form or main screen form (main forms)

    I do this:

           Try
                For i As Integer = System.Windows.Forms.Application.OpenForms.Count - 1 To 1 Step -1
                    Dim form As Form = System.Windows.Forms.Application.OpenForms(i)
                    form.Dispose()
                Next i
            Catch ex As Exception
            Finally
                Me.Dispose()
                End
            End Try

    Disposing, before to end app, no error. :-)


    Saludos / Regards

    Monday, January 14, 2013 11:31 AM

All replies

  • Hi Saludos,

    Welcome to the MSDN Forum.

    I am trying to involve some other one into this case, wait it patiently, please.

    Thank you.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, December 18, 2012 10:35 AM
    Moderator
  • Hi,

    can you debug your application under windows 8 64-Bit?

    Regards,

    Chris

    Wednesday, December 19, 2012 12:44 PM
  • Hola :)

    Do you trap unhandled exceptions at the AppDomain ?

    More info


    -

    Wednesday, December 19, 2012 1:01 PM
  • I believe that this exception is coming from some finalizer. I had couple of similar issues where a COM object was trying to access an already disposed instance in finalizer.So, check you have any undisposed COM objects and dispose them. If there is not API provided to disopse them, use Marshal.ReleaseComObject or Marshal.FinalReleaseComObject method to release all references to the com object.

    I hope this helps.


    Please mark this post as answer if it solved your problem. Happy Programming!


    • Edited by Adavesh Thursday, December 20, 2012 2:32 PM
    Wednesday, December 19, 2012 5:14 PM
  • Hola!

    Thanks for all replies :)

    chriga:

    I can't debug under W8 64bits

    Enrique:

    I have the next code but not catch unhandled exceptions:

    Splash screen form:

     Private WithEvents DoSomeWork As cStart

     Private Sub frmSps_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Me.Show()  
            DoSomeWork = New cStart
            Application.DoEvents()  
            DoSomeWork.doWorks()
    End Sub


    Private Sub React() Handles DoSomeWork.WorkFinished
            gFrmLog1.Show()
            Me.Close() 
     End Sub


    Class "cStart"

    Sub doWorks()

            AddHandler System.AppDomain.CurrentDomain.UnhandledException, AddressOf OnUnhandledException

            Try
               'code validating licenses

            Catch ex As Exception
                MessageBox.Show(ex.Message)
                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

    Adavesh:

    I will search & read more about this "Marshal.ReleaseComObject" and "Marshal.FinalReleaseComObject"

          

    Saludos / Regards

    Thursday, December 20, 2012 10:24 AM
  • Hi,

    without debugging it is as to poke about in a fog. Maybe there is a possiblity to use remote debugging.

    Regards

    Chris

    Friday, December 28, 2012 3:09 PM
  • Hi:

    Results:

    Debug mode --> Works fine. no error message appears

    Release mode --> Display the message error when App is closing: ''program stopped working'' But I not see any error on IDE


    Saludos / Regards

    Friday, January 4, 2013 10:18 AM
  • Hi,

    you could compare the content of both output folders (bin\Debug, bin\Release). Is one needed DLL missing in Release for some reason. Are there differences in Build (Debug/Release) of project properties?

    Regards,

    Chris

    Friday, January 4, 2013 3:37 PM
  • Hi:

    Results:

    Debug mode --> Works fine. no error message appears

    Release mode --> Display the message error when App is closing: ''program stopped working'' But I not see any error on IDE


    Saludos / Regards

    Hi Saludos,

    Thank you for your clarification.

    Would you like to post the callstack in the error message box here?

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, January 7, 2013 2:51 AM
    Moderator
  • Hi,

    From a support perspective this is really beyond what we can do here in the forums. If you cannot determine your answer here or on your own, consider opening a support case with us. Visit this link to see the various support options that are available to better meet your needs: http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone.


    Shaleen Thapa

    Wednesday, January 9, 2013 6:16 PM
  • Hi:

    I think that I solved this issue. Now, when I close the login form or main screen form (main forms)

    I do this:

           Try
                For i As Integer = System.Windows.Forms.Application.OpenForms.Count - 1 To 1 Step -1
                    Dim form As Form = System.Windows.Forms.Application.OpenForms(i)
                    form.Dispose()
                Next i
            Catch ex As Exception
            Finally
                Me.Dispose()
                End
            End Try

    Disposing, before to end app, no error. :-)


    Saludos / Regards

    Monday, January 14, 2013 11:31 AM