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

Hi,

can you update this testcase so it generates AV in TSQLQueryGetQueryText method, pls?
nowadays it raised TSQLQuery.Create error …

Hi,

That’s what am saying, to update the testcase I have to include so many things from my code and I cannot do that.

Hi Shanti,

I’m sorry, but i’m afraid then we cannot help you out further, and you will need to debug this yourself.

Please also keep in mind that Pascal Script is an open source library thta is both deprecated and unsupported, yet Eugene already has spent an extraordinary amount of time assisting you with finding problems. There’s only so much we can do.

Thanx, for understanding,
marc

Hi,

Please find this.


Edit: testcase was removed, it contained some personal data

Hi,

Your testcase generates AV also in Win32 mode.

but you said that it works as expected here:

In 32-bit:

In 64-bit:

Hi,

I can reproduce this issue
investigating …

Hi,

test this fix:
fix.zip (57.6 KB)

Hi,

I was able to retrieve the query text using the suggested patch, but this fix gave me a “could not call proc” issue. Before the fix, no such mistake existed. I’m including the test case here.
Ps_test.7z (14.0 KB)

Hi,

try this:
fix.zip (57.6 KB)

Hi,

does it work for you?

Hi,

Sorry for late reply. The problem got resolved with the provided fix. But , still am facing the AV while accessing the object members in debug mode. I’m including the test case here. In the test case am trying to get the class variables.
testcase.7z (7.7 KB)

Hi Shanti,

As I mentioned originally two months back, Pascal Script is deprecated and not receiving official support from us anymore.

We gotta draw the line here, as this thread is taking precious resources away from our support team that could be spent helping paying customers of actively developed products.

I’m sorry, but from hereon out I’m afraid you need to resolve the remaining issues you run into on your own, or purchase a Premium Support license (Premium Support | RemObjects Software).

Thanx for understanding

marc

Hi Marc,

Please, could you assist me with just one thing?
For the following issue, I’ll most sure purchase the premium assistance.

Sure. which one, that last AV? I’ll see if @EvgenyK has time…

Yes, am getting AV while debugging.

Thank you so much…

1 Like

Hi,

try to initialize class like

function MyOwnFunction(Data: string): string;
var
  us: TUserSession;
begin
  // Do something with Data
  us := TUserSession.Create;  //<<<<<<<<<< added
  Result := us.LoginName;
  xxx := Result;
end;

Hi,

If I initialize the class in the function , then the class data which was earlier will be lost.

Hi,

in your case

us is uninitialized and us will be = nil so <nil>.LoginName = AV :

TUserSession = class
...
function MyOwnFunction(Data: string): string;
var
  us: TUserSession;
begin
  // Do something with Data
  Result := us.LoginName;
  xxx := Result;
end;

Hi,
Sorry about the initial code, but it didn’t really capture the problem. Please excuse me; I’ve attached the code. Only this one; as I previously stated, if I obtain anything more, we will surely receive premium support.
testcase.7z (7.9 KB)