ATML Report Generation Fails with Exception in 'Generate Report'

Updated May 3, 2018

Reported In

Software

  • TestStand

Other

ATML Reports in TestStand

Issue Details

I am running a sequence in TestStand that generates an ATML report. I am getting one of the following errors.

-1; User-defined error code, although I have not defined this error. This error occurs at Get ATML Report Section Action, the function is Get_Atml_ReportSection_For_Body.

With on-the-fly reporting enabled:

An exception occurred inside the call to .NET member 'GenerateReport': 
System.Runtime.InteropServices.COMException (0xFFFFBC6B): Index out of range. 
at NationalInstruments.TestStand.Interop.API.ReportSections.get_Item(Object index) 
at NIOTFReportGenerator.CollectionStepResult.UpdateExisting(IStepResult updatedStepResultI, Boolean usingConserveMemory, ReportFileStream& tempFileStream) 
at NIOTFReportGenerator.ChildStepResults.ProcessNewStepResults(Hashtable& newThreadSeqCallResults, Boolean usingConserveMemory, ReportFileStream& tempFileStream, String[] reportSnippets, Int64 offsetAdjustment) 
at NIOTFReportGenerator.ChildStepResults.ProcessNewStepResults(Hashtable& newThreadSeqCallResults, Boolean usingConserveMemory, ReportFileStream& tempFileStream, String[] reportSnippets, Int64 offsetAdjustment) 
at NIOTFReportGenerator.ChildStepResults.ProcessNewStepResults(Hashtable& newThreadSeqCallResults, Boolean usingConserveMemory, ReportFileStream& tempFileStream, String[] reportSnippets, Int64 offsetAdjustment) 
at NIOTFReportGenerator.ChildStepResults.ProcessNewStepResults(Hashtable& newThreadSeqCallResults, Boolean usingConserveMemory, ReportFileStream& tempFileStream, String[] reportSnippets, Int64 offsetAdjustment) 
at NIOTFReportGenerator.OTFRptGenerator.GenerateReport(SequenceContext sequenceContext, String inputReportHeader, String inputReportFooter, ReportSection& mainSequenceReportSection, String& errorMessage, Double& errorCode, Boolean& errorOccurred) 

Solution

Check whether any parameter names or step names are very long. If dynamically modifying them in a loop and appending to the end of the name each time, the names could become long enough to cause errors.

Additional Information

It is a known issue that when names of parameters or steps are longer than 512 characters, ATML report generates this exception. Behind the scenes, the name is copied at some point to a character array of size 512 during ATML report generation.

WAS THIS ARTICLE HELPFUL?

Not Helpful