Page 1 of 1

EAccessViolation inside TpgQuery

Posted: Fri 10 Jun 2016 14:59
by Wodzu
Hello,

Steps to reproduce:

1. Make basic program, one TPgConnection, one simple TPgQuery.
2. Compile and run program under Delphi with debugging.
3. PgConnection1.Connected := True;
4. Go to services (in Windows) and stop postgresql-x64-9.4 - PostgreSQL Server 9.4 service. (Your program should still running).
5.PgQuery1.ExecSQL;

Now you will receive a series of exceptions. One of them will be: "Project <your project name> raised exception class EAccessViolation with message 'Access violation at address 00544079 in module 'your module name>. Read of address 00000050"

There is something wrong in the TPgQuery component. Please take a look at this. I have a working example but there is no way to include it here. I hope that I've explained how to reporduce the error.

My platform is: Windows 7, 64 bit, Delphi 2009.

Best regards.

Re: EAccessViolation inside TpgQuery

Posted: Tue 14 Jun 2016 10:22
by AlexP
Hello,

We can't reproduce the issue on the latest PgDAC version 4.7.23. On an attempt to execute a query after server stop, a correct message is returned:
Error on data writing to the connection: An existing connection was forcibly closed by the remote host. Socket Error Code: 10054($2746)
Check this behavior on the latest PgDAC version.

Re: EAccessViolation inside TpgQuery

Posted: Wed 15 Jun 2016 08:53
by Wodzu
Hello,

I've tested it in 4.7.23. and the same error happens. Have you tested it under the debugger?

Under this link you will find a sample program and a short video with steps to reproduce:
https://drive.google.com/open?id=0ByKpG ... HBST0hIUFU

Hope that helps,

regards.

Re: EAccessViolation inside TpgQuery

Posted: Wed 15 Jun 2016 10:33
by AlexP
Thank you for a sample. We have reproduced and fixed the issue.

Re: EAccessViolation inside TpgQuery

Posted: Wed 15 Jun 2016 11:21
by Wodzu
Excellent news, thanks guys!

Re: EAccessViolation inside TpgQuery

Posted: Wed 15 Jun 2016 11:44
by AlexP
You are welcome. Feel free to contact us if you have any further questions.

Re: EAccessViolation inside TpgQuery

Posted: Mon 20 Jun 2016 20:30
by HoKoWo
One little question, where can I download the debugged version of the component? In my download portal (I have subscription) is the version from April, 28th 2016 (4.7.23) only available for download. :?:

Re: EAccessViolation inside TpgQuery

Posted: Tue 21 Jun 2016 08:36
by AlexP
We'll try to release a new build with this fix by the end of the month.

Re: EAccessViolation inside TpgQuery

Posted: Tue 21 Jun 2016 21:55
by HoKoWo
Ok, thank you for your reply.

Re: EAccessViolation inside TpgQuery

Posted: Wed 22 Jun 2016 08:05
by AlexP
You are welcome. Feel free to contact us if you have any further questions.