R6025 pure virtual function call runtime error

  • Thread starter Thread starter Catherine Tarbox via .NET 247
  • Start date Start date
C

Catherine Tarbox via .NET 247

I am getting a Microsoft Visual C++ Runtime Library error whenrunning an application I built in VB.NET. The error occursinfrequently and at different time during execution. The errortext is:

Runtime error!
Program: myprog.exe
R6025
- pure virtual function call

My application is a simplified front end to a DTS package thatcan be execute via a Windows form or the command line. I havenever received the error durring command line execution. TheWindows forms are the administration piece allowing for themanagement of settings that are stored in XML files.

Any help would be greatly appreciated!
 
I had exactly the same problem. The solution is to dispose of the DTS.Package like this:

Public Shared Sub ReleaseComObject(ByRef reference As Object)
Try
Do Until Marshal.ReleaseComObject(reference) <= 0
Loop
Catch
End Try
reference = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
End Sub
 
Back
Top