[odb-users] Failing assert in error.cxx

Philip Ethier philip.ethier at gmail.com
Mon Dec 22 12:01:10 EST 2014


Hi Boris,

The patch works. I can catch odb::recoverable and it shows connection lost.
Thanks for putting the patch together! Are you going to release the patch
or should I manage the patch on my end?

Regards,
--Phil
On Dec 21, 2014 3:04 AM, "Boris Kolpackov" <boris at codesynthesis.com> wrote:

> Hi Philip,
>
> Philip Ethier <philip.ethier at gmail.com> writes:
>
> > I'm seeing a failing assert inside odb/pgsql/error.cxx around line 50. It
> > looks like PGresultErrorField is returning a nullptr. I can repeatedly
> > trigger the failed assertion by using tcpkill to kill the connection to
> the
> > db. Is there any way around this? If not can a bug fix be put out?
>
> It is not clear at all from the PG's documentation when
> PGresultErrorField()
> can and cannot return NULL. So we put the asserts to "learn more", so to
> speak.
>
> I have re-implemented the translate_error() function quite differently.
> Can you copy the below error.cxx file into your libodb-pgsql, rebuild
> it, and then let me know if everything works as expected in your tests?
>
> http://codesynthesis.com/~boris/tmp/odb/error.cxx
>
> And thanks for the report!
>
> Boris
>


More information about the odb-users mailing list