pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PgDatabase, on heap construction results in SIGSEGV.
2+ messages / 2 participants
[nested] [flat]

* PgDatabase, on heap construction results in SIGSEGV.
@ 2002-10-16 02:26  Savage <JSavage@data-mate.com>
  0 siblings, 1 reply; 2+ messages in thread

From: JSavage@data-mate.com @ 2002-10-16 02:26 UTC (permalink / raw)
  To: pgsql-interfaces

I am having a problem constructing a PgDatabase object. If I create
the object on the stack (as a var local to a function) then it
constructs and connects to the DB ok. But, if I create and construct
the object on the heap, a SIGSEGV occurs within libpq++.so.4.

Has anyone got any ideas what could be causing this? I have only been
programming under linux for a month or so at this stage, but I've a
lot of Win32 experience. Any pointers to things that a Win32 to Linux
newbie would not be aware of would be much appreciated.

Thanks,
John



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: PgDatabase, on heap construction results in SIGSEGV.
@ 2002-10-18 14:23  Jeroen T. Vermeulen <jtv@xs4all.nl>
  parent: Savage <JSavage@data-mate.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Jeroen T. Vermeulen @ 2002-10-18 14:23 UTC (permalink / raw)
  To: Savage <JSavage@data-mate.com>; +Cc: pgsql-interfaces

On Tue, Oct 15, 2002 at 07:26:25PM -0700, Savage wrote:
> I am having a problem constructing a PgDatabase object. If I create
> the object on the stack (as a var local to a function) then it
> constructs and connects to the DB ok. But, if I create and construct
> the object on the heap, a SIGSEGV occurs within libpq++.so.4.

Are you sure that's exactly where and why it occurs?  I can't think of
any reason why libpq++ should care whether you use "PgDatabase Foo;" or
"PgDatabase *Bar = new PgDatabase;" - so could you post some minimal 
code sample that produces the problem?

(Gratuitous plug: you may also want to look at libpqxx, the more modern
replacement for libp++: http://gborg.postgresql.org/project/libpqxx/ )


Jeroen




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-10-18 14:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-10-16 02:26 PgDatabase, on heap construction results in SIGSEGV. Savage <JSavage@data-mate.com>
2002-10-18 14:23 ` Jeroen T. Vermeulen <jtv@xs4all.nl>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox