1682694 - Handle count keeps increasing (handle leak) when loading the report in the ReportDocument object.

SAP Knowledge Base Article - Public

1682694 - Handle count keeps increasing (handle leak) when loading the report in the ReportDocument object.

Symptom

Handle count keeps increasing (handle leak) when loading the report in the ReportDocument object.

Environment

  • Visual Studio 2010
  • Crystal Reports for Visual Studio SP2

Reproducing the Issue

1. Develop a windows application using below code snippet. 

 

For i As Integer = 0 To 100
Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
crReportDocument.Load("C:\test\WindowsApplication2\WindowsApplication2\crystalreport1.rpt")
crReportDocument.Close()
crReportDocument.Dispose()
Next
 

2. Open Windows Task Manager, add the Handles column. 

3. Compile the above code. 

4. Monitor handles in Task Manager. 

5. Handles go up (handle leak) with every report load.

Cause

  • The issue has been reported as a bug and tracked under problem ID ADAPT01611319.
  • The fix is scheduled in SP3 for Crystal Reports for Visual Studio 2010.
  • NOTE: This issue is similar to an issue reported under problem ID ADAPT01573472. However, .NET Memory Profiler is NOT showing this to be object being left behind; is a handle of type
CrystalDecisions.CrystalReports.Engine.ReportDocument.EventCallback

Resolution

Keywords

CR2010, 2010, CR4VS2010, CR4VS, VS2010, NET2010, Crystal Reports for .NET Framework 4.0 , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Bug Filed

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio