Hi,
Good Day!
I am new to Heap corruption so I would like to ask to understand the Full Call stack from dump.
The function is for exporting data to CSV and PDF. Export to CSV was successful, there was no generated PDF so the export to PDF was unsuccessful. Please note that this problem rarely happens, sometime once per 1 month or every other month, meaning.
Here is the Full Call stack stated in the Dump file
.NET Call Stack
Full Call Stack
In PServer.exe.11520.dmp the assembly instruction at ntdll!RtlReportCriticalFailure+62 inC:\Windows\System32\ntdll.dll has caused an unknown exception (0xc0000374) on thread 30
Additional Information
* Crystal Report version: 10.2.3600.0 (Crystal Report for VS2005)
* .Net version: 4.5 (using VS2010)
Some Code:
public bool ExportPDF(string reportFormatFile, string dataFormatFile, string dataFile, string targetPDFFileName, string csvCharSet)
{
DataSet ds = ReportUtility.FileToDataSet(dataFormatFile, dataFile, csvCharSet);
return this.ExportPDF(reportFormatFile, dataFormatFile, ds, targetPDFFileName);
}
public bool ExportPDF(string reportFormatFile, string dataFormatFile, DataSet dataSet, string targetPDFFileName)
{
if(!File.Exists(reportFormatFile))
{
FileNotFoundException err = new FileNotFoundException("Unable to load report format file.", reportFormatFile);
throw err;
}
if(!File.Exists(dataFormatFile))
{
FileNotFoundException err = new FileNotFoundException("Unable to load data format file.", dataFormatFile);
throw err;
}
if(dataSet == null) {
Exception err = new Exception("Unable to load data.");
throw err;
}
ReportDocument rd = new ReportDocument();
rd.Load(reportFormatFile);
rd.SetDataSource(dataSet);
DiskFileDestinationOptions crDiskFileDestinationOptions = new DiskFileDestinationOptions();
crDiskFileDestinationOptions.DiskFileName = targetPDFFileName;
rd.ExportOptions.DestinationOptions = crDiskFileDestinationOptions;
rd.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
rd.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
rd.Export();
// close the report document to release resources.
rd.Close();
rd.Dispose();
return true;
}
Kindly let me know what's missing information for you to analyze it. Thanks in advance.