System.IndexOutOfRangeException when using GetReport() with raw times/intensities thr26  2022-09-09 07:26
 

Hey, Skyline team,

I've encountered a rather odd error while trying to programmatically access a report. When I try to access a report that contains either the Raw Times or Raw Intensities column using GetReport() the program throws System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'

_toolClient = new SkylineToolClient(args[0], "Skyline Tool")
_report = _toolClient.GetReport("Tool Report");

Including either one of the following lines in my tool's report file causes the error. I can programmatically access any report that doesn't contain these two columns.

<column name="Results!*.Value.Chromatogram.RawData.Times" />
<column name="Results!*.Value.Chromatogram.RawData.Intensities" />

Viewing the report in the document grid works as intended, and it's specifically when the tool calls GetReport() that I reach the error. My only guess as to the cause is that the IReport object being created is trying to store too much information, since each of these arrays are over a thousand elements long. Do you know why this is happening?

I'll also attach the report file in case it's helpful.

Thanks,
– Tommy

 
 
Nick Shulman responded:  2022-09-09 07:44
Can you give us the full stack trace? I am not sure which part of Skyline that error might be coming from.

I will send you an email message directly. I might need to actually run your external tool in order to reproduce this error.
-- Nick