[bug_fixed] AV when PostgreSQL server connection lost

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Wild_Pointer
Expert Boarder
Expert Boarder
Posts: 164
Joined: 18.03.2008, 13:03
Contact:

Post by Wild_Pointer »

mdaems,

Thank you for providing the link to the bug report. Now I see why the change was introduced. The memory leak appears because on TZPostgreSQLConnection.Open the Connect structure in pqlib is created no matter if connection was successful or not. This is ok as pqlib must pass error message back to client some how... But in TZPostgreSQLConnection this made a situation then the connection structure was created but FClosed stayed true.
The solution of 0000136 was to Finish the connection if it does not succeed to connect and it was ok - except it should not be on CheckPostgreSQLError as this procedure is used not only on connect.
Attaching patch.
You do not have the required permissions to view the files attached to this post.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

SVN Rev 789. Thanks for your patience.

Mark
Image
olehs
Zeos Dev Team
Zeos Dev Team
Posts: 118
Joined: 09.11.2009, 21:05

Post by olehs »

Wild_Pointer,
I also thank you for your patience in solving the problem :thanks:
silvioprog
Junior Boarder
Junior Boarder
Posts: 42
Joined: 10.01.2009, 00:34
Location: Brasil
Contact:

Post by silvioprog »

Hellow Mark (and all ;) )

:thx: you for providing the link to the bug report.[²] :up:
Locked