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



Am Mittwoch, den 17.11.2004, 10:24 -0500 schrieb Carl Nygard:
> On Wed, 2004-11-17 at 07:45, Daniel Holbach wrote:
> > Hi everyone,
> > > >
> > > > 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
> > > 
> 
> 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
> 

Hi Carl, hello everyone else,

if you have a look at the code (link above) you'll see, that I already
check for !data_model and I do calls like 
	int columns =  data_model->get_n_columns();

But as you requested (thanks - I learned a bit by doing this), here's
the output of gdb:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1081800256 (LWP 4787)]
0x00000000 in ?? ()
(gdb) up 4
#4  0x0805551f in DBUtils::perform (this=0x8068eec, rule= 0xbffff2b0,
result= 0xbffff2a0) at refptr.h:155
155     {
(gdb) p data_model
$1 = {pCppObject_ = 0x808c3d8}
(gdb)


Have a good time,
 Daniel






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