Re: bookmarkexample
From: lerosua <lerosua@xxxxxxxxx>
Date: Wed, 22 Aug 2007 03:24:45 +0200 (CEST)
hi Vincent.

i do gdb with core  and result follow:

 $gdb bookmarkstorage_example core
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db
library "/lib/tls/i686/cmov/libthread_db.so.1".


warning: core file may not match specified executable file.

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /usr/local/lib/libgloox.so.7...done.
Loaded symbols for /usr/local/lib/libgloox.so.7
Reading symbols from /lib/tls/i686/cmov/libresolv.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libresolv.so.2
Reading symbols from /usr/lib/libgnutls.so.13...done.
Loaded symbols for /usr/lib/libgnutls.so.13
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/tls/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /usr/lib/libtasn1.so.3...done.
Loaded symbols for /usr/lib/libtasn1.so.3
Reading symbols from /usr/lib/libgcrypt.so.11...done.
Loaded symbols for /usr/lib/libgcrypt.so.11
Reading symbols from /usr/lib/libgpg-error.so.0...done.
Loaded symbols for /usr/lib/libgpg-error.so.0
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1
Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_dns.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_dns.so.2
Core was generated by `./bookmarkstorage_example'.
Program terminated with signal 11, Segmentation fault.
#0  0xb7eaf4a1 in gloox::BookmarkStorage::handlePrivateXML (this=0x804d8b0,
xml=0x80b52f8)
    at bookmarkstorage.cpp:104
104            const std::string& pwd = (*it)->findChild( "password"
)->cdata();
(gdb) break main
Breakpoint 1 at 0x8048f36: file bookmarkstorage_example.cpp, line 111.
(gdb) run
Starting program:
/home/leros/work/gloox/src/examples/.libs/bookmarkstorage_example

Breakpoint 1, main () at bookmarkstorage_example.cpp:111
111      BookmarkStorageTest *t = new BookmarkStorageTest();
(gdb) n
15        BookmarkStorageTest() {}
(gdb) n
112      t->start();
(gdb) n
status: 35
issuer:
peer:
protocol: TLS 1.0
mac: SHA
cipher: AES 256 CBC
compression: NULL
iam connnect = ===============================
iam connnect = ===============================

Program received signal SIGSEGV, Segmentation fault.
0xb7e644a1 in gloox::BookmarkStorage::handlePrivateXML (this=0x804d8b0,
xml=0x80be868)
    at bookmarkstorage.cpp:104
104            const std::string& pwd = (*it)->findChild( "password"
)->cdata();
(gdb)





                                                        lerosua

2007/8/22, Vincent Thomasset <vincent.thomasset@xxxxxxxxx>:
>
> Le Tue, 21 Aug 2007 19:54:14 +0800,
> lerosua <lerosua@xxxxxxxxx> a écrit :
>
> >
> > hi:
> >
> >       i think it is segfaults when the handleBookmarks called.
> >       because i add printf() in onConnect() around the
> >       b->requestBookmarks() like this;
> >
> >
> >       virtual void onConnect()
> >       {
> >       printf("Connect sucess\n");
> >       b->requestBookmarks();
> >       printf("requestBookmarks\n");
> >
> >       }
> >
> >       the example program can execute all the printf. and wait a
> >       minute the program segfaults.
>
> Hi,
>
> Could you provide a full backtrace for the segfault ?
>
> cd src/examples
> ulimit -c unlimited
> ./bookmarkstorage_example # should generate a core file
> gdb bookmarkstorage_example core
> bt full # in gdb
>
> Cheers,
> Vincent
>
>
> --
> gloox-dev mailing list
> to unsubscribe:
> send a message with subject 'unsubscribe gloox-dev' to
> minimalist@xxxxxxxxxx
>