Results 1 to 6 of 6

Thread: glibc detected

  1. #1
    Join Date
    Feb 2007
    Posts
    63
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default glibc detected

    Hi all,
    in my application i use a main window. on selecting a page from the menu option i am opening database in the init().
    I developed this application in cantos and the ported it to fedora4.

    now there when i executed the application it once showed error message as
    "***glibc detected*** ./dbm:double free or corruption(rev)........."

    what is the reason for this?????????

    Also i am facing a strange problem now.

    When i run the application and select the page from menu option, the page comes correctly and functionality is also right. But this happens only for two times i.e every third time when i open the page from menu option the application close and shows segmentation fault.

    plz help me find what is the problem.

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: glibc detected

    You do a 'delete' somewhere but the class/struct was already deleted. Use a debugger to trace down which object you delete twice.

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: glibc detected

    It could also be a child widget allocated on the stack. Remember that child widgets (actually all QObjects that have a parent) are deleted by their parent.
    J-P Nurmi

  4. #4
    Join Date
    Feb 2007
    Posts
    63
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: glibc detected

    Actually when i commented the Qdatabase code then this problem is not persisting.

    The code related to database in my application is in the init() and onClose() which is called on pressing the close button.

    Qt Code:
    1. void offline::init()
    2. {
    3.  
    4. db = QSqlDatabase::addDatabase( QMYSQL3 );
    5. db->setDatabaseName( Database_dbm );
    6. db->open();
    7.  
    8.  
    9. }
    10.  
    11.  
    12. void offline::onClose() //called on pressing close button
    13. {
    14. db->close();
    15. close();
    16. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by jpn; 27th May 2008 at 07:01. Reason: missing [code] tags

  5. #5
    Join Date
    Feb 2007
    Posts
    63
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: glibc detected

    *************************

    I used gdb to debugg the problem and the message i got on selecting the page third time from the menu option the was

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread -1208789312 (LWP 2834)]
    0xb7b8cf04 in my_strcasecmp_8bit () from /usr/lib/mysql/libmysqlclient.so.14


    The backtrace is.........................................

    0xb7b8cf04 in my_strcasecmp_8bit () from /usr/lib/mysql/libmysqlclient.so.14
    #1 0xb7b84862 in get_charset_number () from
    /usr/lib/mysql/libmysqlclient.so.14
    #2 0xb7b848af in get_charset_by_csname () from
    /usr/lib/mysql/libmysqlclient.so.14
    #3 0xb7b9dfc4 in mysql_real_connect () from
    /usr/lib/mysql/libmysqlclient.so.14
    #4 0xb7c973f8 in QMYSQLDriver:: open () from
    /usr/lib/qt-3.3/plugins/sqldrivers/libqsqlmysql.so
    #5 0xb7c97900 in QMYSQLOpenExtension:: open () from
    /usr/lib/qt-3.3/plugins/sqldrivers/libqsqlmysql.so
    #6 0x4acf9d56 in QSqlDriver:: open () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #7 0x4ace8ab0 in QSqlDatabase:: open () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #8 0x0805e402 in offline:: init (this=Error accessing memory address
    0xbfdad0a4: No such process.
    ) at .ui/.. /source/offline.ui.h:74
    #9 0x0806556f in offline (this=Error accessing memory address 0xbfdad130: No
    such process.
    ) at .ui/offline.cpp: 464
    #10 0x08050240 in MainWnd:: offLineForm (this=Error accessing memory address
    0xbfdad6c8: No such process.
    ) at .ui/../source/MainWnd.ui.h:118
    #11 0x080ff274 in MainWnd:: qt_invoke (this=Error accessing memory address
    0xbfdad6e0: No such process.
    ) at .moc/moc_MainWnd.cpp: 93
    #12 0x4aa5cd17 in QObject:: activate_signal () from
    /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #13 0x4aa5d274 in QObject:: activate_signal () from
    /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #14 0x4adf3399 in QAction:: activated () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #15 0x4abae44f in QAction:: internalActivation () from
    /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #16 0x4adf355d in QAction::qt_invoke () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #17 0x4aa5cdb4 in QObject::activate_signal () from
    /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #18 0x4add1796 in QSignal:: signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #19 0x4aa7a633 in QSignal:: activate () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #20 0x4ab71582 in QPopupMenu::mouseReleaseEvent () from
    /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #21 0x4aa9b127 in QWidget:: event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #22 0x4a9f808d in QApplication:: internalNotify () from
    /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #23 0x4a9f8fef in QApplication:: notify () from
    /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #24 0x4a98fb0d in QETWidget:: translateMouseEvent () from
    /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #25 0x4a98deb3 in QApplication:: x11ProcessEvent () from
    /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #26 0x4a9a1fc8 in QEventLoop:: processEvents () from
    /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #27 0x4aa1074b in QEventLoop:: enterLoop () from
    /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #28 0x4aa10656 in QEventLoop:: exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #29 0x4a9f7a59 in QApplication:: exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #30 0x08050151 in main (argc=Error accessing memory address 0xbfdae038: No
    such process.
    ) at source/main.cpp:11
    I am unable to identify where i am making a mistake.

    Plz help me to find it.
    Regards

    Raghvendra
    Last edited by jpn; 27th May 2008 at 07:02. Reason: missing [quote] tags

  6. #6
    Join Date
    Feb 2007
    Posts
    63
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: glibc detected

    Am i clear with my problem???????????

    no one replied for the possible solution..........
    plz look into it

    Regards
    Raghvendra

Similar Threads

  1. Error: **** glibc detected ****
    By Manohar in forum Qt Programming
    Replies: 2
    Last Post: 9th May 2008, 05:32
  2. itemChange() glibc invalid pointer
    By dreamer in forum Qt Programming
    Replies: 2
    Last Post: 3rd May 2008, 09:04
  3. Replies: 4
    Last Post: 18th December 2007, 13:21
  4. warning: Clock skew detected.
    By ashukla in forum General Programming
    Replies: 2
    Last Post: 23rd October 2007, 08:42
  5. When itemChanged is emitted, can the change type be detected?
    By johnny_sparx in forum Qt Programming
    Replies: 3
    Last Post: 7th April 2006, 17:29

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.