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

QQuickWidget deleteLater crashes when removed from QMdiArea

XMLWordPrintable

    • 0b0bb319578bb2e2eced3a80ce3876a4408b72a7 (qtdeclarative/dev, 29.7.2014)

      Deleting QQuickWidget cause crash after it's removed from the QMdiArea.

      QQuickWidget *view = new QQuickWidget;
      mdiarea->addSubWindow(view);
      ...
      mdiarea->removeSubWindow(subWindow);
      subWindow->deleteLater();  // CRASH when subWindow cointains quickwidget
      

      Same works without crash for QWidget. QMdiArea::removeSubWindow() documentation says it just set parent to 0 (like it does) but doesn't delete given widget so it has to do. But something goes wrong there with QuickWidget.

      Actually simple subWindow->deleteLater() removes subWindow from the mdiarea so when need to delete just delete without removeSubWindow().

      Other thing saw is that it's not possible to remove and add back QuickWidget SubWindow to mdiarea. This might be the root cause. Got ASSERT

      ASSERT failure in QSGRenderContext::initialize: "already initialized!", file scenegraph\qsgcontext.cpp, line 439
      

        1. qtbug40435_mod_stack.tasks
          5 kB
          Friedemann Kleint
        2. qtbug40435_mod_stack.txt
          17 kB
          Friedemann Kleint
        3. QTBUG-40435_mod.zip
          2 kB
          Antti Yli-Tokola
        4. qtbug40435_stack.txt
          17 kB
          Friedemann Kleint
        5. qtbug40435_valgrind.txt
          35 kB
          Friedemann Kleint
        6. QTBUG-40435.zip
          2 kB
          Qt Support
        For Gerrit Dashboard: QTBUG-40435
        # Subject Branch Project Status CR V

            lagocs Laszlo Agocs
            qtcomsupport Qt Support
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: