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

Stimulsoft Reports.WEB discussion
Post Reply
QuantumITDev
Posts: 4
Joined: Fri Mar 31, 2023 6:06 am

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

Post 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
Attachments
Exception.txt
(4.16 KiB) Downloaded 80 times
Singlestage.mrt
(122.74 KiB) Downloaded 81 times
Singlestage.json
(20.75 KiB) Downloaded 81 times
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski »

Hello,

The issue with Conditions for the ChildBandStudentReportDetails component.

Thank you.
QuantumITDev
Posts: 4
Joined: Fri Mar 31, 2023 6:06 am

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

Post 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!
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski »

Hello,

Please check the modified report.

Thank you.
Attachments
Singlestage_fix.mrt
(126.85 KiB) Downloaded 82 times
QuantumITDev
Posts: 4
Joined: Fri Mar 31, 2023 6:06 am

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

Post 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
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

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

Post 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
QuantumITDev
Posts: 4
Joined: Fri Mar 31, 2023 6:06 am

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

Post by QuantumITDev »

Any updates on this? thanks
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

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

Post by Max Shamanov »

Hello,

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

Thank you.
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski »

Hello,

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

Thank you.
Post Reply