Page 1 of 1

System.IndexOutOfRangeException: Index was outside the bounds of the array.

Posted: Fri Mar 31, 2023 6:51 am
by QuantumITDev
Hi,
I have reported this issue in a earlier post (in Request#3177134).
We have a few reports that are giving the below error (complete error attached as Exception.txt) when trying to download/rendering the report on the web:

System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Stimulsoft.Base.Drawing.StiTextDrawing.MeasurableInfo.GetRect(Int32 index)
at Stimulsoft.Base.Drawing.StiTextDrawing.CutLineLimit(String& text, Graphics g, Font font, RectangleD rect, StiTextOptions textOptions, Boolean typographic, Boolean isWindows)
at Stimulsoft.Report.Components.StiComponentDivider.BreakText(Graphics g, RectangleD rect, String& text, Font font, StiTextOptions textOptions, StiTextQuality textQuality, Boolean allowHtmlTags, StiText textComp)

I have attached a sample of one of the reports (attached Singlestage.json and Singlestage.mrt) that's failing for us. Upon our investigation it seems that the size of the report may have something to do with this issue. As if when I start removing some text/characters from the report "it shows up correctly". Also note that this issue looks to be introduced in your one of the recent released (nuget package Stimulsoft.Reports.Web.NetCore) versions:
Last working version: 2022.2.6
First broken version: 2022.3.1

Hope this helps.

Can you please take a look and help resolve the issue here? This is urgent! As a lot of our customers are complaining that they are unable to download the reports.

Thanks

Re: System.IndexOutOfRangeException: Index was outside the bounds of the array.

Posted: Sat Apr 01, 2023 2:20 pm
by Lech Kulikowski
Hello,

The issue with Conditions for the ChildBandStudentReportDetails component.

Thank you.

Re: System.IndexOutOfRangeException: Index was outside the bounds of the array.

Posted: Wed Apr 12, 2023 7:34 am
by QuantumITDev
hi,

I tried removing the Conditions for the ChildBandStudentReportDetails component (from the sample reports) but it didn't work for me. Same error. Can you please provide any other relevant specific details about the fix you are suggesting for the sample report (I provided). And also attach the report which contains your fix so I can use that to test and analyze it please?

Thanks!

Re: System.IndexOutOfRangeException: Index was outside the bounds of the array.

Posted: Thu Apr 13, 2023 8:24 pm
by Lech Kulikowski
Hello,

Please check the modified report.

Thank you.

Re: System.IndexOutOfRangeException: Index was outside the bounds of the array.

Posted: Fri Apr 28, 2023 4:48 am
by QuantumITDev
Hi,
I still get the same issue (with your attached fixed report) when rendering the report on the web. This is the report version I am using: Stimulsoft.Reports.Web.NetCore (2022.4.5). And this is the same statement where I am still getting the error (as before):
await report.RenderAsync(new StiRenderState(false))

Error:
Index was outside the bounds of the array.
at Stimulsoft.Base.Drawing.StiTextDrawing.MeasurableInfo.GetRect(Int32 index)
at Stimulsoft.Base.Drawing.StiTextDrawing.CutLineLimit(String& text, Graphics g, Font font, RectangleD rect, StiTextOptions textOptions, Boolean typographic, Boolean isWindows)
at Stimulsoft.Report.Components.StiComponentDivider.BreakText(Graphics g, RectangleD rect, String& text, Font font, StiTextOptions textOptions, StiTextQuality textQuality, Boolean allowHtmlTags, StiText textComp)

Can you plz provide exact steps you used to fix the report? And/Or anything else that can resolve the issue for us?

Thanks

Re: System.IndexOutOfRangeException: Index was outside the bounds of the array.

Posted: Tue May 02, 2023 5:28 pm
by Lech Kulikowski
Hello,

We require more time to investigate the issue thoroughly. Rest assured, we will keep you informed about the outcome as soon as possible.

Thank you.
#11244

Re: System.IndexOutOfRangeException: Index was outside the bounds of the array.

Posted: Tue May 30, 2023 5:27 am
by QuantumITDev
Any updates on this? thanks

Re: System.IndexOutOfRangeException: Index was outside the bounds of the array.

Posted: Wed May 31, 2023 9:03 am
by Max Shamanov
Hello,

We are still working on the problem. We will let you know when the solution is available.

Thank you.

Re: System.IndexOutOfRangeException: Index was outside the bounds of the array.

Posted: Thu Jun 01, 2023 10:35 pm
by Lech Kulikowski
Hello,

The issue is fixed. The fix will be available in the next release build.

Thank you.