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



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?
> 
> Murray Cumming
> murrayc murrayc com
> www.murrayc.com
> www.openismus.com

Please see here the output of    gdb ./protosquared  ->   run   ->    bt
-----------------------
(gdb) run
Starting program: /home/daniel/Projects/protosquared/0.1.x/protosquared
[Thread debugging using libthread_db enabled]
[New Thread 1081800256 (LWP 31390)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1081800256 (LWP 31390)]
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x40021c5d in gda_postgres_provider_new ()
from /usr/lib/libgda/providers/libgda-postgres.so
#2  0x4015011f in gda_data_model_get_n_rows ()
from /usr/lib/libgda-2.so.1
#3  0x4012bb58 in Gnome::Gda::DataModel::get_n_rows ()
from /usr/lib/libgdamm-1.3.so.5
#4  0x0805551f in DBUtils::perform (this=0x8068eec, rule= 0xbffff2b0,
result= 0xbffff2a0) at refptr.h:155
#5  0x08059362 in Plugin_DB::get (this=0x80a2d28, rule= 0x80a2d28,
result= 0x80a2d28) at Plugin_DB.cc:94
#6  0x08057603 in PluginProxy::perform (this=0x806e7b0,
rule= 0xbffff2b0, result= 0xbffff2a0,
    simulate_only=false) at PluginProxy.cc:55
#7  0x0805662e in Network::stream_write_back (l= 0x80977d8,
s= 0x807ec30) at Network.cc:93
#8  0x08057320 in WvCallbackFunctor<WvCallback<void, WvIStreamList&,
WvStream&, void*, E, E, E, E, E>, void (*)(WvIStreamList&, WvStream&,
void*)>::operator() (this=0x80a2d28, p1= 0x80a2d28, p2= 0x80a2d28,
p3=0x80a2d28)
    at wvcallback.h:303
#9  0x0805726e in WvCallbackFunctor<WvCallback<void, WvStream&, void*,
E, E, E, E, E, E>, WvBoundCallback<WvCallback<void, WvStream&, void*, E,
E, E, E, E, E>, WvIStreamList&> >::operator() (this=0x1, p1= 0x80a2d28,
    p2=0x80a2d28) at wvcallback.h:436
#10 0x400e92ed in WvStream::_callback () from /usr/lib/libwvbase.so.4.0
#11 0x400e94a8 in WvStream::callback () from /usr/lib/libwvbase.so.4.0
#12 0x400e6689 in WvIStreamList::execute ()
from /usr/lib/libwvbase.so.4.0
#13 0x400e92c7 in WvStream::_callback () from /usr/lib/libwvbase.so.4.0
#14 0x400e94a8 in WvStream::callback () from /usr/lib/libwvbase.so.4.0
#15 0x0805611b in Network::start (this=0x80977d8) at Network.cc:45
#16 0x0805f661 in main (argc=134884648, argv=0x80a2d28) at
protosquared.cc:44
(gdb)
-----------------------


and (a snippet of the) output of:   (full output in .gz-file)
valgrind --leak-check=yes -v ./protosquared
-----------------------
==31131== Jump to the invalid address stated on the next line
==31131==    at 0x0: ???
==31131==    by 0x1BA4C11E: gda_data_model_get_n_rows
(in /usr/lib/libgda-2.so.1.1.0)
==31131==    by 0x1BA26B57: Gnome::Gda::DataModel::get_n_rows() const
(in /usr/lib/libgdamm-1.3.so.5.0.0)
==31131==    by 0x805551E: DBUtils::perform(Rule&, std::string&)
(refptr.h:155)
==31131==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==31131==
==31131== Process terminating with default action of signal 11 (SIGSEGV)
==31131==  Access not within mapped region at address 0x0
==31131==    at 0x0: ???
==31131==    by 0x1BA4C11E: gda_data_model_get_n_rows
(in /usr/lib/libgda-2.so.1.1.0)
==31131==    by 0x1BA26B57: Gnome::Gda::DataModel::get_n_rows() const
(in /usr/lib/libgdamm-1.3.so.5.0.0)
==31131==    by 0x805551E: DBUtils::perform(Rule&, std::string&)
(refptr.h:155)
==31131==
==31131== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 117 from
1)
==31131==
==31131== 1 errors in context 1 of 1:
==31131== Jump to the invalid address stated on the next line
==31131==    at 0x0: ???
==31131==    by 0x1BA4C11E: gda_data_model_get_n_rows
(in /usr/lib/libgda-2.so.1.1.0)
==31131==    by 0x1BA26B57: Gnome::Gda::DataModel::get_n_rows() const
(in /usr/lib/libgdamm-1.3.so.5.0.0)
==31131==    by 0x805551E: DBUtils::perform(Rule&, std::string&)
(refptr.h:155)
==31131==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
--31131--
--31131-- supp:  117 Ugly strchr error in /lib/ld-2.3.2.so
==31131==
==31131== IN SUMMARY: 1 errors from 1 contexts (suppressed: 117 from 1)
==31131==
==31131== malloc/free: in use at exit: 191135 bytes in 3172 blocks.
==31131== malloc/free: 10592 allocs, 7420 frees, 804720 bytes allocated.
==31131==
==31131== searching for pointers to 3172 not-freed blocks.
==31131== checked 9347016 bytes.
---------------


I hope, this gives all the answers. If you need any other information,
please tell me. (I'm not on the gnome-db-list, so you'll have to CC me)


Thanks for your attention, have a nice day,
Daniel

Attachment: valgrind.txt.gz
Description: GNU Zip compressed data



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