rainforestnet / CrystalReportsNinja

A small Windows Console App that loads external Crystal Reports file, takes parameter inputs and export to various format or even print to printer
http://www.rainforestnet.com
96 stars 79 forks source link

Crystal Reports Exporter has stopped working APPCRASH #51

Open skellerggh opened 4 years ago

skellerggh commented 4 years ago

Hello,

I have a scheduled task that is set to run at 5:00am every morning, that triggers a batch file to run Crystal Reports Exporter. This morning I checked the server where CREXPORT is running and noticed an APPCRASH Error. This has happened twice now.

Running the batch file manually seems to work just fine. No issues with the way it is configured. Task Manager displayed a last run result of 0xc0000374 indicating a heap corruption.

Below is the error that was captured in the servers Event Log:

Error on 25/03/2020 - 5:00:26 AM Application Error Event ID 1000 Task Category (100)

Faulting application name: crexport.exe, version: 2.1.11.1103, time stamp: 0x4eb20a56 Faulting module name: ntdll.dll, version: 6.3.9600.19464, time stamp: 0x5d6727f2 Exception code: 0xc0000374 Fault offset: 0x00000000000f1cd0 Faulting process id: 0xfc4 Faulting application start time: 0x01d60283d1a3535d Faulting application path: C:\CRExport\crexport.exe Faulting module path: C:\Windows\SYSTEM32\ntdll.dll Report Id: 114bb8e5-6e77-11ea-80cf-005056b78877 Faulting package full name: Faulting package-relative application ID:

mhertzfeld commented 4 years ago

If it runs ok when you manually execute the batch file I would start by looking at the permissions of the user the scheduled task is running as. Maybe something has changed there with added restrictions or something?

You can try my fork of the app. Logging is better and you may find the problem that way. However you will probably need to rewrite your batch file for the parts around ninja since the parameters may be slightly different along with upgrading to the latest version of Crystal Reports Runtime.

https://github.com/mhertzfeld/CrystalReportsNinja

skellerggh commented 4 years ago

Thank you for reviewing. I will look at implementing the fork.

I wanted to provide some more info in regards to this error, as the application crashed again and I noticed the following error message in the batch file(Below). Perhaps that provide some more clues as to the cause of the application to crash.

Crystal Reports Exporter Command Line Utility. Uersion 2.1.11.1103 opyright(c) 2011 Rainforest Software Solution http://www.rainforestnet.com

Unhandled Exception: System.AccessUiolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at CrystalDecisions.ReportAppSeruer.Controllers.ParameterFieldControllerClass .GetPromptParameterFields(PropertyBag pPromptProperties) at CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition.get_CurrentValues() at CrystalDecisions.CrystalReports.Engine.InternalParameterUalues..ctor(ParameterFieldDefinition fieldDef, Boolean isCurrentUalues) at CrystalDecisions.CrystalReports.Engine.InternalParaneterField..ctor(ParameterFieldDefinition field) at CrystalDecisions.CrystalReports.Engine.InternalParaneterFields..ctor(ParameterFieldDefinitions parameterFields) at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_ParameterFields() at crexport.crexport.Main<StringIl args)