Null pointer Exception in Pascal Script for Delphi in 64-bit

I was using Pascal Script in Delphi 11. With 32-bit version , it was good and i got the o/p as expected. When it comes to 64-bit am getting Null pointer exception in a particular function “function TPSScript.Execute: Boolean;”.

Even though i downloaded latest code from github, am getting the same error.

Hi Shanti,

my colleague Eugene is out of office for vacation this week, but I will ask im to try to have a look next week, if he can.

Do note that Pascal Script is not receiving official support from us anymore.

yours,
marc

Hi marc,

Thanks for the response

1 Like

Hi Marc,

Any update on this?

Hi,

I can’t reproduce AV with the TestApp sample that is launched in x64 mode:


Can you create and attach a simple testcase that reproduces this issue, pls?

pascal.pas (3.7 KB)

can you please go through this

Hi,

I need working sample - your file contains a lot of references to other files and it cannot be compiled as is.
as I understand, your script is located in login.pre.

Can you simplify code and/or upload your project, pls?

you can drop email to support@ for keeping privacy.

Hi,

As said, i sent mail to support@remobjects.com. Your help will be very useful to us. Thanks

Hi,

Since our company was blocking the mail, I had no idea if you had received it or not. I was able to pinpoint the cause of the 64-bit exception we were experiencing, and this is why: the exception occurs when we attempt to use a function that returns a string. The function won’t throw an exception if it returns other datatypes.

1 Like

Hi,

apply workaround from the latest comment of Error when calling delphi function in x64 mode · Issue #266 · remobjects/pascalscript · GitHub

1 Like

Hi,

Although I followed all the instructions in that link, AV is still appearing. I’ve included a sample file for 64-bit testing in the attachment. Please execute the program in Delphi 64-bit mode.
Sample.pas (3.1 KB)

Hi,

everything works as expected.
testcase.zip (7.2 KB)

have you replaced content of InvokeCall.inc with provided code?

Hi,

Am unable to compile script on both 32-bit and 64-bit. I have changed the Invokecall.inc file with the provided code.

Could you please help me to what’s wrong with the code.

Outlook-rbq5sokg.png

What error(s) do you get?

No error, it simply sets the compiler to free and then exit of that if block

Hi,

Have you tried to use my testcase?

Hi,

The testcase was successful and I could able to see the O/P. I modified your test case , then i faced this problem.

Hi,

The testcase was successful and I could able to see the O/P.

I modified your test case , then I faced this problem

(No errors, it simply exits from the compile condition and giving me blank O/P).

PFAtestcase 2.7z

Outlook-rbq5sokg.png

Hi,

for downloading your testcase I must have existing account at microsoftonline.com

Can you send your testcase to support@, pls?
by other have you can login to https://talk.remobjects.com and send PM to support team

FWIW, even having an account woudln’t have saved you ;). this is what I get.