"list index out of bounds" in preview
A client tells me that they regularly get a "list index out of bounds" error when previewing a long report. They tell me that it sometime crashes at around the page 100 mark. From the image in their error report it appears that they have clicked on the button in the preview form that positions the display to the last page. The cursor is an hourglass and the status line is showing "Drawing page 124 for Invoice".
Error log link https://dropbox.com/s/5721yvz9cg8bsis/bugreport_2017-03-20.txt?dl=0
Error log link https://dropbox.com/s/5721yvz9cg8bsis/bugreport_2017-03-20.txt?dl=0
Comments
Which version of ReportBuilder and Delphi are you using? Are you able to recreate this behavior on your own machine?
Looking at your call stack, it appears that the error was something we addressed for RB 18 but we would need an example to verify.
If you have not yet, I recommend updating to RB 19 and seeing if that helps the problem.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Martin
This is in RB15.05. I know the advice is to upgrade, but we can't as the company are unwilling to upgrade Delphi beyond 2009, despite my "gentle encouragement" that they need to.
Try setting PreviewFormSettings.SinglePageOnly to True.
Unfortunately we are unable to support old versions of ReportBuilder. As you mentioned, the answer is to upgrade your version of ReportBuilder and Delphi. It is important to keep your development tools up to date, not only for updates and bug fixes, but to support the companies you depend on.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I made this initial post here. Our clients are now running on RB 19.01, but occasionally they are still getting this error on preview. It seems that the error occurs on long reports - over 100 pages. I cannot duplicate the error myself, but do have an error log from a client below. Hopefully this helps.
Martin
exception class : EListError
exception message : List index out of bounds (0).
main thread ($86a8):
00534f23 +017 PrintInvoices.exe System.Classes TList.Get
005af69a +00a PrintInvoices.exe System.Contnrs TObjectList.GetItem
00cfb3a8 +00c PrintInvoices.exe ppPageGrid TppPageColumnCollection.GetColumns
00cfac42 +02a PrintInvoices.exe ppPageGrid TppPageGrid.ScaledColumnLeft
00cfdbb8 +074 PrintInvoices.exe ppPageControl TppPageControl.GotoPage
00d01177 +0ab PrintInvoices.exe ppScreenDevice TppScrollableScreenDevice.GotoPage
00d00f31 +041 PrintInvoices.exe ppScreenDevice TppScrollableScreenDevice.LastPage
00d009d6 +07e PrintInvoices.exe ppScreenDevice TppScrollableScreenDevice.ehPageCache_GenerateComplete
00cf8a89 +01d PrintInvoices.exe ppThreadedPageCache TppThreadedPageCache.ehPageRequestThread_GenerateComplete
00cf8ebf +00f PrintInvoices.exe ppThreadedPageCache TppPageRequestThread.DoOnGenerateComplete
0054c775 +125 PrintInvoices.exe System.Classes CheckSynchronize
006e9513 +76b PrintInvoices.exe Vcl.Forms TApplication.WndProc
00550608 +014 PrintInvoices.exe System.Classes StdWndProc
76487885 +00a USER32.dll DispatchMessageW
006e9ed3 +0f3 PrintInvoices.exe Vcl.Forms TApplication.ProcessMessage
006e9f16 +00a PrintInvoices.exe Vcl.Forms TApplication.HandleMessage
006e52d2 +1aa PrintInvoices.exe Vcl.Forms TCustomForm.ShowModal
00f13f57 +01f PrintInvoices.exe ppForms TppForm.ShowModal
00f0c0c1 +089 PrintInvoices.exe ppProd TppProducer.PrintToScreen
00f0bd7f +05f PrintInvoices.exe ppProd TppProducer.Print
00f77535 +02d PrintInvoices.exe ppReport TppReport.Print
0298113f +0fb PrintInvoices.exe fPrintInvoiceSelect 4855 +17 FinishInvoices
Thanks for the additional information. I sent you a patch for RB 19.01 to try. Let me know if it helps.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com