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

Invalid Pointer

edited October 2006 in Server
Our RBServer has been running as a Window2003 service for several weeks
error free (the few times it failed we knew why). Today one of the reports
created a 'EInvalid Pointer, Invalid pointer operation' and stopped
RBServer. I tired duplicating the error on a development server and a
mirror of the db, but the report runs fine in the development/test
environment. Any ideas where to begin looking or what might cause this
error? Delphi2006, RB10.04, Oracle, ADO Connection, Form based reports.
Thanks for the help.

Comments

  • edited October 2006

    Make sure that the report form is thread-safe. Do not use any unit level
    'vars' or global objects. Use only instance variables.

    When testing in the development sever, try some tests in which two clients
    request the same report.



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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2006

    RB Server is multi-threaded and will create a separate instance for each
    report that generates. The report must have a thread safe environment in
    which to execute.


    Avoid using global/unit level variables/objects in a server environment -
    because they are not thread-safe.




    Here are simple definitions...



    - a local variable is a variable declared inside a method
    - a parameter is variable that is passed to a method

    Example:



    procedure TForm1.myFunction(aParameter: Integer);

    var

    lsLocalVariable: String;
    begin

    end;





    - an instance variable is variable declared as part of a class. Instance
    variables can be private, protected, or public.



    Type

    TForm1 = class(TForm)
    private

    FPrivateVariable: String;

    Public

    FPublicVariable: string;
    end;




    - a unit level variable (also called a global variable) is a variable that
    is not part of a class instance. These variables can be declared in the
    interface or implementation section and are /not/ thread safe.

    interface


    var

    myGlobalVar: string;

    implementation



    var

    myUnitVar: string;





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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2006
    > Our RBServer has been running as a Window2003 service for several weeks

    We have seen this problem caused by RBServer leaving thousands of temporary
    files in c:\windows\temp. Delete those files and the problem goes away.

    Terry.
This discussion has been closed.