Results 1 to 11 of 11

Thread: QMessageBox ( Core Dumped )

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QMessageBox ( Core Dumped )

    Jacek wanted a backtrace (a list of functions called when the process crashed generated by a debugger), not the code.

  2. #2
    Join Date
    Sep 2006
    Posts
    42
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    2

    Default Re: QMessageBox ( Core Dumped )

    Ok, I am using option -g in qmake.

    % gdb ./app
    (gdb) run
    ....
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x813e000 (LWP 100142)]
    0x2845623c in QButton::animateClick () from /usr/X11R6/lib/libqt-mt.so.3
    (gdb)

    This is the error when it is Esc keyboard.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QMessageBox ( Core Dumped )

    when in gdb use the "bt" command to print a backtrace.

  4. #4
    Join Date
    Sep 2006
    Posts
    42
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    2

    Default Re: QMessageBox ( Core Dumped )

    Ok,

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x813e000 (LWP 100077)]
    0x2845623c in QButton::animateClick () from /usr/X11R6/lib/libqt-mt.so.3
    (gdb) bt
    #0 0x2845623c in QButton::animateClick () from /usr/X11R6/lib/libqt-mt.so.3
    #1 0x28561971 in QMessageBox::keyPressEvent () from /usr/X11R6/lib/libqt-mt.so.3
    #2 0x283fd31c in QWidget::event () from /usr/X11R6/lib/libqt-mt.so.3
    #3 0x2836e545 in QApplication::internalNotify () from /usr/X11R6/lib/libqt-mt.so.3
    #4 0x2836ed08 in QApplication::notify () from /usr/X11R6/lib/libqt-mt.so.3
    #5 0x28307b78 in QETWidget::translateKeyEvent () from /usr/X11R6/lib/libqt-mt.so.3
    #6 0x2830e37e in QApplication::x11ProcessEvent () from /usr/X11R6/lib/libqt-mt.so.3
    #7 0x283205ec in QEventLoop::processEvents () from /usr/X11R6/lib/libqt-mt.so.3
    #8 0x2838293b in QEventLoop::enterLoop () from /usr/X11R6/lib/libqt-mt.so.3
    #9 0x2836d8a8 in QApplication::enter_loop () from /usr/X11R6/lib/libqt-mt.so.3
    #10 0x285388c0 in QDialog::exec () from /usr/X11R6/lib/libqt-mt.so.3
    #11 0x0805f082 in compForm::primeUpdateSaida (this=0x8265200) at src/comp/compForm.cpp:647
    #12 0x080a3ab8 in compForm::qt_invoke (this=0x8265200, _id=74, _o=0xbfbfdf10) at src/comForm/moc_compForm.cpp:161
    #13 0x283ca6a4 in QObject::activate_signal () from /usr/X11R6/lib/libqt-mt.so.3
    #14 0x283cad15 in QObject::activate_signal () from /usr/X11R6/lib/libqt-mt.so.3
    #15 0x286d1a4c in QButton::clicked () from /usr/X11R6/lib/libqt-mt.so.3
    #16 0x2845695a in QButton::mouseReleaseEvent () from /usr/X11R6/lib/libqt-mt.so.3
    #17 0x283fd2b7 in QWidget::event () from /usr/X11R6/lib/libqt-mt.so.3
    #18 0x2836e545 in QApplication::internalNotify () from /usr/X11R6/lib/libqt-mt.so.3
    #19 0x2836e801 in QApplication::notify () from /usr/X11R6/lib/libqt-mt.so.3
    #20 0x2830ff1f in QETWidget::translateMouseEvent () from /usr/X11R6/lib/libqt-mt.so.3
    #21 0x2830ee9f in QApplication::x11ProcessEvent () from /usr/X11R6/lib/libqt-mt.so.3
    #22 0x283205ec in QEventLoop::processEvents () from /usr/X11R6/lib/libqt-mt.so.3
    #23 0x2838293b in QEventLoop::enterLoop () from /usr/X11R6/lib/libqt-mt.so.3
    #24 0x28382894 in QEventLoop::exec () from /usr/X11R6/lib/libqt-mt.so.3
    #25 0x2836d880 in QApplication::exec () from /usr/X11R6/lib/libqt-mt.so.3
    #26 0x08058165 in main (argc=1, argv=0xbfbfe9fc) at src/main.cpp:286
    (gdb)
    Last edited by wysota; 28th January 2007 at 17:17. Reason: Disabled smilies

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QMessageBox ( Core Dumped )

    In my opinion you should either call
    Qt Code:
    1. mb.setButtonText( QMessageBox::Escape, "Text for 'escape' button" );
    To copy to clipboard, switch view to plain text mode 
    or make Cancel and Escape the same button (by substituting the comma with a pipe "|"). I doubt Escape should be used as a button number, are you sure you want that?

  6. #6
    Join Date
    Sep 2006
    Posts
    42
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    2

    Default Re: QMessageBox ( Core Dumped )

    If it will be added “|” occurs error in the compilation.

    QMessageBox::Cancel | QMessageBox::Escape


    src/comp/compForm.cpp::540: error: no matching function for call to `QMessageBox::QMessageBox(const char[21], const QString, QMessageBox::Icon, int, int)'
    /usr/X11R6/include/qmessagebox.h:192: note: candidates are: QMessageBox::QMessageBox(const QMessageBox&)
    /usr/X11R6/include/qmessagebox.h:68: note: QMessageBox::QMessageBox(const QString&, const QString&, QMessageBox::Icon, int, int, int, QWidget*, const char*, bool, uint)
    /usr/X11R6/include/qmessagebox.h:64: note: QMessageBox::QMessageBox(QWidget*, const char*)
    *** Error code 1

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QMessageBox ( Core Dumped )

    Pass QMessageBox::NoButton as the third int argument.

  8. #8
    Join Date
    Sep 2006
    Location
    Rio de Janeiro, Brazil
    Posts
    44
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    2
    Thanked 3 Times in 3 Posts

    Default Re: QMessageBox ( Core Dumped )

    It makes thus.

    ...
    QMessageBox::NoIcon, QMessageBox::Yes | QMessageBox:efault,
    QMessageBox::Cancel | QMessageBox::Escape, QMessageBox::NoButton );

Similar Threads

  1. QLineEdit Segmentation fault (core dumped)
    By cristiano in forum Qt Programming
    Replies: 1
    Last Post: 12th October 2006, 05:18
  2. customize the Icon QMessageBox
    By QiT in forum Newbie
    Replies: 1
    Last Post: 26th August 2006, 10:40
  3. Problem of Core Dropped!
    By Stephano in forum General Programming
    Replies: 1
    Last Post: 10th May 2006, 15:59

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
  •  
Qt is a trademark of The Qt Company.