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

Tests do not run cleanup code triggered via ICore::coreAboutToClose

    XMLWordPrintable

Details

    • adefa318aed92ee0440ec098c9f0ae67e1f1168c

    Description

      Run e.g. "./qtcreator -test ClangCodeModel" with an ASAN-enabled build.

      Numerous leaks are reported on quit, see attached file. Look for e.g. "Wizard".

      Example:

      Indirect leak of 4320 byte(s) in 27 object(s) allocated from:
          #0 0x4e82b2 in operator new(unsigned long) (/home/nik/dev/creator/creator-com-3.5_clang_asan/qtcreator/bin/qtcreator+0x4e82b2)
          #1 0x7fd14afa9a36 in ProjectExplorer::JsonWizardFactory::createWizardFactory(QMap<QString, QVariant> const&, QDir const&, QString*) /home/nik/dev/creator/creator-com-3.5/qtcreator/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp:311:34
          #2 0x7fd14afa6fa9 in ProjectExplorer::JsonWizardFactory::createWizardFactories() /home/nik/dev/creator/creator-com-3.5/qtcreator/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp:280:46
          #3 0x7fd14b113eba in ProjectExplorer::ProjectExplorerPlugin::initialize(QStringList const&, QString*)::$_0::operator()() const /home/nik/dev/creator/creator-com-3.5/qtcreator/src/plugins/projectexplorer/projectexplorer.cpp:491:19
          #4 0x7fd14b112c36 in std::_Function_handler<QList<Core::IWizardFactory*> (), ProjectExplorer::ProjectExplorerPlugin::initialize(QStringList const&, QString*)::$_0>::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2056:9
          #5 0x7fd14e9f6f2d in std::function<QList<Core::IWizardFactory*> ()>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2471:14
          #6 0x7fd14e9df5df in Core::IWizardFactory::allWizardFactories() /home/nik/dev/creator/creator-com-3.5/qtcreator/src/plugins/coreplugin/iwizardfactory.cpp:190:43
          #7 0x7fd14ef20fb2 in Core::Internal::CorePlugin::delayedInitialize() /home/nik/dev/creator/creator-com-3.5/qtcreator/src/plugins/coreplugin/coreplugin.cpp:254:5
          #8 0x7fd16acf067c in ExtensionSystem::Internal::PluginSpecPrivate::delayedInitialize() /home/nik/dev/creator/creator-com-3.5/qtcreator/src/libs/extensionsystem/pluginspec.cpp:1030:12
          #9 0x7fd16ac3bbf6 in ExtensionSystem::Internal::PluginManagerPrivate::nextDelayedInitialize() /home/nik/dev/creator/creator-com-3.5/qtcreator/src/libs/extensionsystem/pluginmanager.cpp:827:22
          #10 0x7fd16ad6959e in ExtensionSystem::Internal::PluginManagerPrivate::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/nik/dev/creator/creator-com-3.5_clang_asan/qtcreator/src/libs/extensionsystem/.moc/debug-shared/moc_pluginmanager_p.cpp:76:17
          #11 0x7fd16837de79 in QMetaObject::activate(QObject*, int, int, void**) (/home/nik/usr/qt-5.4.0-install/5.4/gcc_64/lib/libQt5Core.so.5+0x308e79)
      

      This happens because the test code calls QCoreApplication::exit, which does not trigger the ICore::coreAboutToClose signal, that is used to trigger a set of cleanup code.

      Attachments

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

        Activity

          People

            kosjar Nikolai Kosjar
            kosjar Nikolai Kosjar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes