[gnome-db] Re: gdamm1.3.4: segfault on data_model->get_n_rows();



On Wed, 2004-11-17 at 07:45, Daniel Holbach wrote:
> Hi everyone,
> 
> 
> Am Mittwoch, den 17.11.2004, 12:28 +0100 schrieb Murray Cumming: 
> > > Hello everyone,
> > >
> > > I hope I got the right list.
> > >
> > > I'm using gdamm1.3.4 with gda1.1.99 and followed basically the examples
> > > in the tarball. I use a PostgreSQL server (on another box) and use a
> > > simple query, which works perfectly well in  pgaccess .
> > >
> > > This ( int rows = data_model->get_n_rows(); ) crashes my project. For a
> > > full context see
> > > http://cvs.berlios.de/cgi-bin/viewcvs.cgi/protosquared/protosquared/src/DBUtils.cc?rev=1.3&content-type=text/vnd.viewcvs-markup
> > >
> > > Here the last lines of an ordinary  strace -run. Hope someone can help.
> > 
> > What does the gdb backtrace look like? What does valgrind memcheck say?
> > 

valgrind is complaining about null pointer, I'm guessing your data_model
var is nil (0x0).  Check it in the debugger.  It might help you to
install gdamm-devel package if available, but this really looks like a
problem in your code.

in gdb:

up 4
p data_model

I bet it comes out 0x0 (null pointer).

Regards,
Carl




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]