Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-1288

Invalid memory access in QmlInspector destructor

    XMLWordPrintable

Details

    • 43b9d1aad143c0984746faa1b06b6a0dcdb39142 ca14299790646284fbb660b11bb30de503f76a79

    Description

      Valgrind complains about multiple invalid reads in ~QmlInspector:

      ==17269== Invalid read of size 1
      ==17269==    at 0xEB67815: Qml::Internal::ObjectTree::saveSettings(Qml::Internal::InspectorSettings&) (in /home/kkoehne/dev/creator/lib/qtcreator/plugins/Nokia/libQmlInspector.so)
      ==17269==    by 0xEB7A4C3: Qml::QmlInspector::~QmlInspector() (in /home/kkoehne/dev/creator/lib/qtcreator/plugins/Nokia/libQmlInspector.so)
      ==17269==    by 0xEB770F7: Qml::QmlInspectorPlugin::shutdown() (in /home/kkoehne/dev/creator/lib/qtcreator/plugins/Nokia/libQmlInspector.so)
      ==17269==    by 0x4043B18: ExtensionSystem::Internal::PluginSpecPrivate::stop() (in /home/kkoehne/dev/creator/lib/qtcreator/libExtensionSystem.so.1.0.0)
      ==17269==    by 0x403FA12: ExtensionSystem::Internal::PluginManagerPrivate::loadPlugin(ExtensionSystem::PluginSpec*, ExtensionSystem::PluginSpec::State) (in /home/kkoehne/dev/creator/lib/qtcreator/libExtensionSystem.so.1.0.0)
      ==17269==    by 0x403FDFA: ExtensionSystem::Internal::PluginManagerPrivate::stopAll() (in /home/kkoehne/dev/creator/lib/qtcreator/libExtensionSystem.so.1.0.0)
      ==17269==    by 0x4041FFF: ExtensionSystem::Internal::PluginManagerPrivate::~PluginManagerPrivate() (in /home/kkoehne/dev/creator/lib/qtcreator/libExtensionSystem.so.1.0.0)
      ==17269==    by 0x403AC76: ExtensionSystem::PluginManager::~PluginManager() (in /home/kkoehne/dev/creator/lib/qtcreator/libExtensionSystem.so.1.0.0)
      ==17269==    by 0x8050120: main (in /home/kkoehne/dev/creator/bin/qtcreator.bin)
      ==17269==  Address 0xa79ebb4 is 44 bytes inside a block of size 56 free'd
      ==17269==    at 0x402454D: operator delete(void*) (vg_replace_malloc.c:346)
      ==17269==    by 0xEB84E49: Qml::Internal::ObjectTree::~ObjectTree() (in /home/kkoehne/dev/creator/lib/qtcreator/plugins/Nokia/libQmlInspector.so)
      ==17269==    by 0x4DDEC45: QObjectPrivate::deleteChildren() (qobject.cpp:1949)
      ==17269==    by 0x4222989: QWidget::~QWidget() (qwidget.cpp:1495)
      ==17269==    by 0x460FF40: QFrame::~QFrame() (qframe.cpp:242)
      ==17269==    by 0x4679902: QSplitter::~QSplitter() (qsplitter.cpp:1056)
      ==17269==    by 0x7207234: Core::MiniSplitter::~MiniSplitter() (in /home/kkoehne/dev/creator/lib/qtcreator/plugins/Nokia/libCore.so)
      ==17269==    by 0x4DDEC45: QObjectPrivate::deleteChildren() (qobject.cpp:1949)
      ==17269==    by 0x4222989: QWidget::~QWidget() (qwidget.cpp:1495)
      ==17269==    by 0x45F71D4: QDockWidget::~QDockWidget() (qdockwidget.cpp:1181)
      ==17269==    by 0x4DDEC45: QObjectPrivate::deleteChildren() (qobject.cpp:1949)
      ==17269==    by 0x4222989: QWidget::~QWidget() (qwidget.cpp:1495)
      

      So it seems the QWidget hiearchy has already been destroyed at the time when the destructor runs.

      Attachments

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

        Activity

          People

            holmsted Lasse Holmstedt
            kkohne Kai Köhne
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes