Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-41145

Segmentation fault in gtk after creating & destroying QApplication + QTreeView twice

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.0 RC
    • 4.8.6, 5.3.1, 5.4.0
    • None
    • Linux, Fedora 19, Gnome: 3.14.17-100.fc19.x86_64
      gcc version 4.8.3 20140624 (Red Hat 4.8.3-1) (GCC) (default)
    • cd996c1b85313e89e781f5bd02e5aeae98b69d73

    Description

      Causes a segmentation fault. May be similar to QTBUG-7029 and QTBUG-7104.

      #include <QtGui/QtGui>
      
      void testQt(int argc, char** argv)
      {
          QApplication* app = new QApplication(argc, argv);
          QTreeView* treeView = new QTreeView();
          delete treeView;
          delete app;
      }
      
      int main(int argc, char** argv)
      {
          testQt(argc, argv);
          testQt(argc, argv);
          return 0;
      }
      
      (gdb) where
      #0  0x0000003db7ebb5dc in gtk_container_add () from /lib64/libgtk-x11-2.0.so.0
      #1  0x0000003429341a26 in QGtkStylePrivate::setupGtkWidget(_GtkWidget*) () from /lib64/libQtGui.so.4
      #2  0x000000342934294e in QGtkStylePrivate::addWidget(_GtkWidget*) () from /lib64/libQtGui.so.4
      #3  0x0000003429342da0 in QGtkStylePrivate::initGtkWidgets() const () from /lib64/libQtGui.so.4
      #4  0x0000003429329681 in QGtkStyle::QGtkStyle() () from /lib64/libQtGui.so.4
      #5  0x00000034292b3f81 in QStyleFactory::create(QString const&) () from /lib64/libQtGui.so.4
      #6  0x0000003428fccc8a in QApplication::style() () from /lib64/libQtGui.so.4
      #7  0x0000003428fccfe5 in QApplicationPrivate::initialize() () from /lib64/libQtGui.so.4
      #8  0x0000003428fcd0e0 in QApplicationPrivate::construct(_XDisplay*, unsigned long, unsigned long) ()
         from /lib64/libQtGui.so.4
      #9  0x0000003428fcd34f in QApplication::QApplication(int&, char**, int) () from /lib64/libQtGui.so.4
      #10 0x0000000000400927 in testQt(int, char**) ()
      #11 0x00000000004009ed in main ()
      

      Attachments

        For Gerrit Dashboard: QTBUG-41145
        # Subject Branch Project Status CR V

        Activity

          People

            Unassigned Unassigned
            seanhappel Sean Happel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes