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

Crash when QApplication is destroyed and created again

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • None
    • 4.6.0
    • None

      This is a regression from Qt 4.5.3.

      The code below crashes when closing the first CWindow instance. The application does not crash with Qt 4.5.3.

      code:

      class CWindow : public QMainWindow
      {
      public:
      CWindow()
      {
      QTreeView *tv = new QTreeView(this);
      }
      };

      int main(int argc, char *argv[])
      {
      for (int i = 0; i < 2; i++)
      {
      QApplication app(argc, argv);

      QApplication::desktop();

      CWindow id;
      id.show();

      app.exec();
      }
      }

      stack:

      QtCored4.dll!QBasicAtomicInt::ref() Line 319 + 0x8 bytes C++
      QtGuid4.dll!QHash<QGesture *,QHashDummyValue>::QHash<QGesture *,QHashDummyValue>(const QHash<QGesture *,QHashDummyValue> & other=

      {...}) Line 283 + 0x1f bytes C++
      QtGuid4.dll!QSet<QGesture *>::QSet<QGesture *>(const QSet<QGesture *> & other={...}

      ) Line 60 + 0x13 bytes C++
      QtGuid4.dll!QSet<QGesture *>::subtract(const QSet<QGesture *> & other=

      {...}) Line 269 + 0xc bytes C++
      QtGuid4.dll!QSet<QGesture *>::operator-=(const QSet<QGesture *> & other={...}

      ) Line 205 + 0x13 bytes C++
      QtGuid4.dll!QSet<QGesture *>::operator-(const QSet<QGesture *> & other=

      {...}) Line 224 + 0x4e bytes C++
      QtGuid4.dll!QGestureManager::filterEventThroughContexts(const QMultiHash<QObject *,enum Qt::GestureType> & contexts={...}

      , QEvent * event=0x0012fb04) Line 275 + 0x16 bytes C++
      QtGuid4.dll!QGestureManager::filterEvent(QWidget * receiver=0x028ac890, QEvent * event=0x0012fb04) Line 480 + 0x10 bytes C++
      QtGuid4.dll!QApplication::notify(QObject * receiver=0x028ac890, QEvent * e=0x0012fb04) Line 3631 + 0x13 bytes C++
      QtCored4.dll!QCoreApplication::notifyInternal(QObject * receiver=0x028ac890, QEvent * event=0x0012fb04) Line 704 + 0x15 bytes C++
      QtCored4.dll!QCoreApplication::sendEvent(QObject * receiver=0x028ac890, QEvent * event=0x0012fb04) Line 215 + 0x39 bytes C++
      QtGuid4.dll!QWidgetPrivate::setWinId(HWND__ * id=0x00010010) Line 1509 + 0xe bytes C++
      QtGuid4.dll!QWidgetPrivate::create_sys(HWND__ * window=0x00000000, bool initializeWindow=true, bool destroyOldWindow=true) Line 389 + 0xf bytes C++
      QtGuid4.dll!QWidget::create(HWND__ * window=0x00000000, bool initializeWindow=true, bool destroyOldWindow=true) Line 1321 C++
      QtGuid4.dll!QWidgetPrivate::init(QWidget * parentWidget=0x00000000, QFlags<enum Qt::WindowType> f=

      {...}) Line 1177 + 0xe bytes C++
      QtGuid4.dll!QWidget::QWidget(QWidgetPrivate & dd={...}

      , QWidget * parent=0x00000000, QFlags<enum Qt::WindowType> f=

      {...}

      ) Line 1039 + 0x1e bytes C++
      QtGuid4.dll!QDesktopWidget::QDesktopWidget() Line 250 + 0x81 bytes C++
      QtGuid4.dll!QApplication::desktop() Line 3062 + 0x22 bytes C++
      LscaGui.exe!main(int argc=1, char * * argv=0x028a6698) Line 39 + 0x8 bytes C++
      LscaGui.exe!WinMain(HINSTANCE__ * instance=0x00400000, HINSTANCE__ * prevInstance=0x00000000, char * __formal=0x00163be2, int cmdShow=1) Line 131 + 0x12 bytes C++
      LscaGui.exe!__tmainCRTStartup() Line 589 + 0x35 bytes C
      LscaGui.exe!WinMainCRTStartup() Line 414 C
      kernel32.dll!776a1174()
      [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            monsen Marius Bugge Monsen
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes