VBCorLib
VBCorLib copied to clipboard
APPCRASH on Windows Server after app exit if CryptoConfig.CreateFromName() used
I'm submitting a bug report
Library Version: 3.2.0
Please tell us about your environment:
Operating System: Microsoft Windows Server 2012 R2 Standard
Current behavior:
If SymmetricAlgorithm is instantiated with CryptoConfig.CreateFromName("Rijndael"), the OS indicates that the app stopped working upon normal app exit.
One fault indicated as APPCRASH occurs with ntdll.dll:
Upon acknowledging the first fault, another subsequent fault occurs with MSVBVM60.DLL:
Sample Source Code: VBCorLibDebug.vbp.txt modMain.bas.txt
Excerpt from modMain.bas:
Sub Main()
Dim oCryptoProvider As CorLib.SymmetricAlgorithm
Dim Ret As Integer
MsgBox "Sub Main()"
Ret = MsgBox("Do you want to crash after program exits?", vbYesNo)
If Ret = vbYes Then
Set oCryptoProvider = CryptoConfig.CreateFromName("Rijndael")
End If
If Not oCryptoProvider Is Nothing Then
oCryptoProvider.Clear 'This doesn't help avoid crash
Set oCryptoProvider = Nothing
End If
MsgBox "End"
End Sub
This is all that's needed to reproduce the problem on the problematic OS. The problem doesn't occur on Windows 10.
Using your code, unfortunately, I cannot reproduce this on Windows Server 2012R2.
It was found that if the application that uses VBCorLib is run in no later than Windows XP Compatibility mode then APPCRASH doesn't occur but this workaround can't be used because the app launches another app that cannot be run in Compatibility mode. I'm trying to narrow down what may be causing the APPCRASH problem by compiling test DLLs based on the 3.2.0 code.