This is an application created for testing the handles leaks and memory as proof of concept, so either CR(Crystal Reports) or MS(Microsoft) fix the problem in their future service packs.
When you click on the button to create reports, and after it finishes, there are handles leaking, and memory leaking as seen in the picture in the link.
this has been reported to MS, and the link is: please vote for its fix
and to SAP RS, and the link is:
create 1 ReportDocument instance and use it a specific number of time, say 50 times, and dispose of it, then recreate another instance and repeat.
this will make the handle leak or memory leak get divided by the instance number of usage.
at least now our hundreds of thousands of reports app is working perfectly without hanging or creating exceptions.
and to why not to use one instance of ReportDocument for all the reports, it happened some times that the app hangs without any exceptions.
third, i noticed when the app is working and the anti-virus(Kaspersky) begin a full scan of the computer and eating all CPU resources, it hangs, and when the anti-virus finishes it work, the app does not continue at all and does not produce exceptions.
OS: Win XP + Win 7 + win 2003 server
CR: v13 sp2
VS: 2010 sp1
Earlier article details:
Crystal Reports v13 sp2 leaks handles
I have a problem with Crystal Reports, it seams that it leaks handles.
I am making a utility that generates hundreds of thousands of “.pdf” reports that are exported from crystal Report, but after a awhile an error is generated saying :
CrystalDecisions.Shared.CrystalReportsException: Load report failed. —> System.Runtime.InteropServices.COMException (0x80000000): The maximum report processing jobs limit configured by your system administrator has been reached
And the full detail of the error is in the end of this thread.
download:Bin and source: click Here
OS: tested on win 7 32bit, win xp 32bit.
Run the “testCR.exe”
Click button “Open CR Form”
On the new form. Click “Create Reports”
If you select to create 1 report at a time, and open task manager and watch the testCR handles, you will see it increasing and then going back to normal but leave 1 or 2 handles not recovered.
CrystalDecisions.Shared.CrystalReportsException: Load report failed. —> System.Runtime.InteropServices.COMException (0x80000000): The maximum report processing jobs limit configured by your system administrator has been reached.
at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
— End of inner exception stack trace —
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
at CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataSet dataSet)
at CRP0100.CCrystalReport.SetDataSource() in D:\Work\vDoxTest\CRP0100\CCrystalReport.vb:line 149
at VDXL0100.frmExportReports.createReports() in D:\Work\vDoxTest\VDXL0100\frmExportReports.vb:line 72
at VDXL0100.frmExportReports.btnCreateReports_Click(Object sender, EventArgs e) in D:\Work\vDoxTest\VDXL0100\frmExportReports.vb:line 31