Results 1 to 6 of 6

Thread: Bug in Qt or Qt Designer or my mistake?

  1. #1
    Join Date
    Jan 2006
    Posts
    4
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Bug in Qt or Qt Designer or my mistake?

    Hello, I am creating application MDI based and somehow it behaives strange. Developping in Qt Designer, I dont write code much in the source files and it causes some strange error when I activate one of the forms in my project (Form3 actually):

    *** glibc detected *** corrupted double-linked list: 0x080d1ea0 ***

    Quiting the application.

    The thing is that when I put Grid Layout on Form3 with all elements included I get this error, but when I regroup them with vertical and horizontal layout it is not present. Also the Table on Form2 behaives like fixed, when Form2 maximized I dont see the Table on it also resized...

    I share the source with you if you can help me...

    Using:
    Qt 3.3.4
    KDE 3.4.0
    Fedora Core 4

    Thanks in advance...
    Attached Files Attached Files
    Last edited by [maTa]; 8th February 2006 at 22:33.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Bug in Qt or Qt Designer or my mistake?

    Quote Originally Posted by [maTa]
    *** glibc detected *** corrupted double-linked list: 0x080d1ea0 ***
    It's hard to find such problem just by looking at the sources. Did you try to run your program from gdb? Could you post the backtrace (don't forget to compile your program in debug mode)?

    Qt Code:
    1. void Form2::dodaj()
    2. {
    3. Form3 *forma3 = new Form3();
    4. forma3->setModal(TRUE);
    5. forma3->show();
    6. }
    To copy to clipboard, switch view to plain text mode 
    You use such code in several places, but this leads to a memory leak, because you don't delete the form when it's closed.

    Try:
    Qt Code:
    1. void Form2::dodaj()
    2. {
    3. Form3 *forma3 = new Form3( 0, 0, Qt::WDestructiveClose );
    4. // ...
    5. }
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jan 2006
    Posts
    4
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Bug in Qt or Qt Designer or my mistake?

    Quote Originally Posted by jacek
    Try:
    Qt Code:
    1. void Form2::dodaj()
    2. {
    3. Form3 *forma3 = new Form3( 0, 0, Qt::WDestructiveClose );
    4. // ...
    5. }
    To copy to clipboard, switch view to plain text mode 

    i got:

    Program received signal SIGSEGV, Segmentation fault.
    0x02593023 in QGListIterator:perator++ () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    (gdb)
    Single stepping until exit from function _ZN14QGListIteratorppEv,
    which has no line number information.
    Couldn't get registers: No such process.
    (gdb)
    Single stepping until exit from function _ZN14QGListIteratorppEv,
    which has no line number information.
    Cannot fetch general-purpose registers for thread -1208314176: generic error
    (gdb) backtrace
    #0 0x02593023 in QGListIterator:perator++ () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    Error accessing memory address 0xbf8d2868: No such process.
    (gdb)


    hmm...
    btw. posted from diff. comp
    Last edited by [maTa]; 8th February 2006 at 23:02.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Bug in Qt or Qt Designer or my mistake?

    Quote Originally Posted by [maTa]
    i got:

    Program received signal SIGSEGV, Segmentation fault.
    0x02593023 in QGListIterator:perator++ () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    (gdb)
    Single stepping until exit from function _ZN14QGListIteratorppEv,
    which has no line number information.
    Couldn't get registers: No such process.
    Then try (make sure you have "debug" instead of "release" in CONFIG in your .pro file):
    Qt Code:
    1. (gdb) run
    2. ...
    3. Program received signal SIGSEGV, Segmentation fault.
    4. ...
    5. (gdb) bt
    6. <post this part>
    7. (gdb) quit
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Jan 2006
    Posts
    4
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Bug in Qt or Qt Designer or my mistake?

    here you go:


    Program received signal SIGSEGV, Segmentation fault.
    0x02593023 in QGListIterator:perator++ ()
    from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    (gdb) bt
    #0 0x02593023 in QGListIterator:perator++ ()
    from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #1 0x02243761 in QApplication::sendPostedEvents ()
    from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #2 0x022e418f in QWidget::show () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #3 0x02446556 in QDialog::show () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #4 0x0805b651 in Form2::qt_invoke (this=0x9207000, _id=47, _o=0xbffa5aa8)
    at .moc/moc_form2.cpp:102
    #5 0x022a6d17 in QObject::activate_signal ()
    from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #6 0x022a7274 in QObject::activate_signal ()
    from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #7 0x0262312e in QButton::clicked () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #8 0x02346a03 in QButton::mouseReleaseEvent ()
    from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #9 0x022e5127 in QWidget::event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #10 0x0224208d in QApplication::internalNotify ()
    from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #11 0x02242fef in QApplication::notify ()
    from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #12 0x021d9706 in QETWidget::translateMouseEvent ()
    from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #13 0x021d7eb3 in QApplication::x11ProcessEvent ()
    ---Type <return> to continue, or q <return> to quit---
    from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #14 0x021ebfc8 in QEventLoop:rocessEvents ()
    from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #15 0x0225a74b in QEventLoop::enterLoop ()
    from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #16 0x0225a656 in QEventLoop::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #17 0x02241a59 in QApplication::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #18 0x080507cb in main (argc=1, argv=0x79) at .ui/../form1.ui.h:41
    (gdb)

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Bug in Qt or Qt Designer or my mistake?

    Quote Originally Posted by [maTa]
    #2 0x022e418f in QWidget::show () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #3 0x02446556 in QDialog::show () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
    #4 0x0805b651 in Form2::qt_invoke (this=0x9207000, _id=47, _o=0xbffa5aa8)
    at .moc/moc_form2.cpp:102
    It looks like it crashes when you try to show Form3 in Form2::dodaj(). I just wonder why it doesn't crash on my system (I use Qt 3.3.5).

    Did you try to run "make clean && qmake && make"? Does it still crash?

    Does it crash with this code?
    Qt Code:
    1. void Form2::dodaj()
    2. {
    3. }
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. designer not showing menu items ...
    By wagmare in forum Installation and Deployment
    Replies: 0
    Last Post: 24th February 2009, 10:26
  2. Threads in Designer plugins
    By hvengel in forum Qt Tools
    Replies: 2
    Last Post: 3rd January 2009, 19:19
  3. Replies: 13
    Last Post: 15th December 2006, 11:52
  4. Designer crashes when selecting some widgets
    By gwendal in forum Qt Tools
    Replies: 4
    Last Post: 21st July 2006, 13:18
  5. Adding slots in Designer
    By jamos in forum Qt Tools
    Replies: 5
    Last Post: 18th May 2006, 23:28

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.