Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

"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

Comments

  • Hi Martin,

    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.
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • This is probably using RB18, I have just started using RB19. No, unfortunately I have not been able to duplicate the error. It does make it tricky when you can't duplicate an error. I will get them to update to be using the latest compile using RB19.

    Martin
  • Out of interest, Nico, what was the error that was addressed in RB18? We have customers who are reporting "Could not run program: DetailBeforeGenerate" followed by "List Index Out of Bounds (13)" when running certain reports, and often just running the report again fixes it. We've not been able to reproduce the problem here. The odd thing is that users started reporting this fairly recently despite us not having updated Report Builder recently nor having made any changes in that area to our own software. The fact it's intermittent almost makes it seem like it's some sort of multi-threading issue; almost like whatever list it's looping through hasn't yet been created, or is incomplete at the time of iteration. I just wondered if the fixed issue was thread related. It's an avenue we're investigating without much luck.

    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.
  • Hi Stephen,

    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.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • Hi Nico. You're preaching to the choir there. I'd love to upgrade our development tools, but alas I'm not the one with the purchasing power. Thanks for the reply. I'll try your suggestion.
  • Nico,

    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
  • Hi Martin,

    Thanks for the additional information. I sent you a patch for RB 19.01 to try. Let me know if it helps.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
Sign In or Register to comment.