Skip to Content
0
Former Member
Oct 18, 2016 at 02:51 PM

HEAP CORRUPTION (0xc0000374, C:\Windows\System32\ntdll.dll)

1611 Views

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

Function Arg 1 Arg 2 Arg 3 Sourcentdll!RtlReportCriticalFailure+62 776e4736ntdll!RtlpReportHeapFailure+26 776e5942ntdll!RtlpHeapHandleError+12 776e75f4ntdll!RtlpLogHeapFailure+a4 7768dc8f 00000000 303cd810ntdll! ?? ::FNODOBFM::`string'+10c54 7742307akernel32!HeapFree+a 6a226dfbmsvcr80!free+1b f9aa17c7 000007fe 07f5c1b0clr!DoNDirectCall__PatchGetThreadCall+7b 00dd3bfe 000007ff 31041c400x000007ff`00dd3bfe 00ddcd81 000007ff 00d0eea00x000007ff`00ddcd81 00ddcd210x000007ff`00ddcd21 00ddcc79 000007ff fffffffe0x000007ff`00ddcc79 f9b7cae7 000007fe 00002c50clr!UMThunkStubAMD64+77 2c7b95e5 00000000 303cd9a0crqe+195e5 2c872dea 00000000 0d5e7d30crqe+d2dea 2ca3ffa5 00000000 ec250650crqe+29ffa5 2ca38a84crqe+298a84 3a809f59crpe32!CRPEConnectionInit+74239 3ad39351 00000000 303ce058crpe32!PESetBackgroundThreadProc+10531 3a85e595 00000000 303ce040crpe32!CRPEConnectionInit+c8875 3a85feaa 00000000 2ecd8ef0crpe32!CRPEConnectionInit+ca18a 3a8651a6 00000000 2ecd8ef0crpe32!CRPEConnectionInit+cf486 3aec5b1f 00000000 2ecd8ef0crpe32!MWCleanupProcess+15c8bf 3ad259e1 00000000 0ee01120crpe32!CRPEConnectionInit+58fcc1 3ad2af59crpe32!PESetBackgroundThreadProc+2139 3ad2ae1ecrpe32!PESetBackgroundThreadProc+1ffe 3ad2a9af 00000000 2ecbd920crpe32!PESetBackgroundThreadProc+1b8f 3ad2a655 00000000 2ecbd920crpe32!PESetBackgroundThreadProc+1835 3b296ba7 00000000 2ecbda20crpe32!SetDialogFont+b81c7 3b323557 00000000 1001c9e0crpe32!SetDialogFont+144b77 3b32362f 00000000 3b998aa0crpe32!SetDialogFont+144c4fkernel32!BaseThreadInitThunk+d 7764c521ntdll!RtlUserThreadStart+1d

Exception Information

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.