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

Invalid Pointer Error

edited March 2009 in General
Hi,

We are using RB V. 11.03. Our environment is Windows XP
Service Pack 3 and we are using Delphi 2009.

We have been experiencing an "Invalid Pointer Operation" error for some of
our reports. These reports worked previously in RB 10. I have traced the
error to the file "ppPrintr.pas" and the following procedure:



destructor TppPrinterCapabilities.Destroy;

begin

FPaperNames.Free; ? Error Occurs Here

FPaperSizes.Free;

FPaperWidths.Free;

FPaperHeights.Free;

FBinNames.Free;

FBins.Free;



inherited Destroy;



end;

Sometimes the error happens immediately after viewing the report in the
Report preview screen and then closing it. The error most often occurs when
our program is being shutdown. Any ideas on what could be happening would
be greatly appreciated.

Thanks,

Justin

Comments

  • edited March 2009
    Hi Justin,

    1. Be sure you are using the latest build of ReportBuilder 11.03. You can
    determine the build by right clicking over the installation .exe file and
    selecting properties, then moving to the Details tab. The latest build is
    220 so the version should read 11.0.3.220.

    If you do not have the latest build, please re-download and reinstall.

    2. If this does not help, please answer the following...

    Does this occur with every report? If not, what is different about the
    reports that cause the error? Does this only occur when you print to a
    printer then close the application? Does it only occur with a single
    printer or on a single machine?

    Also, if possible, try recreating the issue using a simple minimal example
    and send it to support@digital-metaphors.com in .zip format so we can try to
    create it here on our machines.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2009
    There is also a possibility that you have corrupt installation. Try
    following the steps outlined in this article.

    www.digital-metaphors.com/rbWiki/General/Installation/Cleaning_Up_a_Corrupt_Install




    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2009
    Nico,

    1. I have installed the latest build, but it does not solve the issue.
    2. The error does not occur with every report. I have looked into the
    issue further and it only happens when a report is previewed/printed and
    then the program is exited. The error also occurs on all of the computers I
    have tested the program on. I have not been able to find any differences
    between reports that receive the error and ones that don't, but I will keep
    checking. I have also not been able to recreate the problem in a smaller
    demo project, though we do a large amout of customizing the report sql
    before printing in our normal program. One thing I did seem to notice is
    that when we are customizing the report through the Report Designer
    component there are no errors.

    Thanks for your help,

    Justin

  • edited March 2009
    Hi Justin,

    The next step would be to take one of the problem reports and begin
    simplifying it to try to single out the cause. Start by periodically
    removing data aware components, then moving to other report aspects until
    the error no longer occurs.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2009
    Nico,

    I took one of the reports that constitently causes errors and simplified it.
    What I found was that I had to remove all components that we had placed in
    groupings as well as components in the headers/footers and the
    summarry/title. The only place I could safely put components to prevent any
    errors was in the Detail section of the report. Thinking that there might
    be something wrong with using groups I tested out another report that makes
    heavy use of them, but that report continued to work fine with no errors. I
    will continue to do some more testing to see if I can track down anything
    else that might be linked to the problem.

    Thanks,

    Justin

  • edited March 2009
    I seemed to have fixed the issue, but I don't know how my solution works. I
    had two lines of code that I need to move from my OnCreate event on the main
    form where the Report components were placed. They were:

    1. Designer.Menu.Items[0].Insert(0, custMnuItm); //creates a custom menu
    item in the report designer for our customers to use
    2. ReportExplorer.FormCaption := 'Maintenance Report Designer' //changes the
    Report Explorer (TppReportExplorer) caption

    The first line I moved into the OnShow event of the form, and the second
    line I had to move into the OnCreate event for the Report Explorer
    component. This was a very strange error.

    Justin

  • edited March 2009
    Hi Justin,

    Great news. This was most likely a timing issue of some sort. One or both
    of these commands was trying to access memory that either had not been
    initialized yet or did not refer to the correct location.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.