Page 1 of 1
Assertion Failure - PgSQLProtocol.pas, Line 2240
Posted: Wed 16 May 2012 17:10
by rodrigo.mgsys
I'm getting this error when I try to debug, only with brake points.
Error: Assertion Failure - PgSQLProtocol.pas, Line 2240
The error happens only when the cursor goes at a pgDac procedure or function.
If we are not on debug mode or if the brake point is after a interaction with pgDac, everything works fine.
Does pgDac comes with debug information?
Enviroment:
Windows 7
Delphi XE2 Update 4
PgDac Standard Edition
If you need more information or a sample code, let me know.
Re: Assertion Failure - PgSQLProtocol.pas, Line 2240
Posted: Wed 16 May 2012 17:17
by rodrigo.mgsys
One more information, only running on debug mode (F9) sometimes i'm getting this the same error.
With brake point the error always happens, without I didn't found the situation, but sometimes happens. You click ok on error message, try again and then, no error.
Re: Assertion Failure - PgSQLProtocol.pas, Line 2240
Posted: Wed 16 May 2012 23:04
by rodrigo.mgsys
One more database error:
Socket error or Read: WSAgetLastError return 10004 ($2714)
Re: Assertion Failure - PgSQLProtocol.pas, Line 2240
Posted: Thu 17 May 2012 09:25
by ROD
Hi,
When I try to reproduce the problem (including debug and breakpoints), the Assertion Failure does not occur.
Your example code would be useful here. And, please, also specify the protocol (TPgConnection.ProtocolVersion) and the version of PostgreSQL you are using.
Concerning the database error 10004, it may occur when referring to a closed socket.
http://www.zxro.net/uncategorized/fix-10004/
Re: Assertion Failure - PgSQLProtocol.pas, Line 2240
Posted: Tue 22 May 2012 14:25
by rodrigo.mgsys
I found the problem.
In the main form there was a thread executing a select each second to check the server connection.
When I disabled the thread the error does not happen any more.
I found the problem when I tried to migrate the application to Interbase.
Any sugestion to work with PgDac and threads. Do I need a new connection for each thread?
Thank you for attention.
Re: Assertion Failure - PgSQLProtocol.pas, Line 2240
Posted: Tue 22 May 2012 16:04
by ROD
Hi,
Yes, the right way to work in a multithreaded application is to have connection (the TPgConnection) in each thread.