Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAP error when trying to access non-existent formula for group name #45

Closed
christopherpickering opened this issue Nov 18, 2021 · 1 comment
Assignees

Comments

@christopherpickering
Copy link
Collaborator

When trying to get the formula for a group name, and the formula does not exist, the SAP DLL is throwing an error causing RptToXml to crash.

Here's the message:

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at CrystalDecisions.ReportAppServer.DataDefModel.GroupNameFieldClass.get_FormulaForm()
   at CrystalDecisions.CrystalReports.Engine.GroupNameFieldDefinition.get_FormulaName()
   at RptToXml.RptDefinitionWriter.GetFieldObject(Object fo, eportDocument report, XmlWriter writer) in C:\Users\chris-pickering\Documents\r_source\rpttoxml\RptToXml\RptDefinitionWriter.cs:line 445
   at RptToXml.RptDefinitionWriter.GetDataDefinition(ReportDocument report, XmlWriter riter) in C:\Users\chris-pickering\Documents\r_source\rpttoxml\RptToXml\RptDefinitionWriter.cs:line 383
   at RptToXml.RptDefinitionWriter.ProcessReport(ReportDocument report, XmlWriter writer) in C:\Users\chris-pickering\Documents\r_source\rpttoxml\RptToXml\RptDefinitionWriter.cs:line 127
   at RptToXml.RptDefinitionWriter.WriteToXml(XmlWriter writer)in :\Users\chris-pickering\Documents\r_source\rpttoxml\RptToXml\RptDefinitionWriter.cs:line 71
   at RptToXml.RptDefinitionWriter.WriteToXml(String targetXmlPath) in C:\Users\chris-pickering\Documents\r_source\rpttoxml\RptToXml\RptDefinitionWriter.cs:line 62
   at RptToXml.Program.Main(String[] args) in C:\Users\chris-pickering\Documents\r_source\rpttoxml\RptToXml\Program.cs:line 62

I've logged the issue with SAP (https://answers.sap.com/questions/13526349/unhandled-exception-systemaccessviolationexception.html?childToView=13526461) but will also put a PR to catch this exception so we can continue running RptToXml until SAP's resolution comes.

@christopherpickering
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant