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

Soft assert in ~LanguageClientManager() and in LanguageClientManager::addClient's lambda

    XMLWordPrintable

Details

    Description

      To reproduce: start Creator and after about 1 second close it (without loading a session). The following assert appears:

      SOFT ASSERT [12:01:16.396]: "m_clients.isEmpty()" in /home/jarek/dev/creator-12/src/plugins/languageclient/languageclientmanager.cpp:74
      

      Call stack:

      1  Utils::writeAssertLocation                                                                                                                                                                                                             qtcassert.cpp             126  0x7ffff7a964d5 
      2  LanguageClient::LanguageClientManager::~LanguageClientManager                                                                                                                                                                          languageclientmanager.cpp 74   0x7fff7a5edc64 
      3  LanguageClient::LanguageClientManager::~LanguageClientManager                                                                                                                                                                          languageclientmanager.cpp 77   0x7fff7a5edd3c 
      4  QObjectPrivate::deleteChildren                                                                                                                                                                                                         qobject.cpp               2221 0x7ffff4c0628d 
      5  QObject::~QObject                                                                                                                                                                                                                      qobject.cpp               1160 0x7ffff4c042fb 
      6  ExtensionSystem::IPlugin::~IPlugin                                                                                                                                                                                                     iplugin.cpp               187  0x7ffff7f1a823 
      7  LanguageClient::LanguageClientPlugin::~LanguageClientPlugin                                                                                                                                                                            languageclientplugin.cpp  32   0x7fff7a61b347 
      8  LanguageClient::LanguageClientPlugin::~LanguageClientPlugin                                                                                                                                                                            languageclientplugin.cpp  32   0x7fff7a61b366 
      9  ExtensionSystem::Internal::PluginSpecPrivate::kill                                                                                                                                                                                     pluginspec.cpp            1194 0x7ffff7f6f239 
      10 ExtensionSystem::Internal::PluginManagerPrivate::loadPlugin                                                                                                                                                                            pluginmanager.cpp         1618 0x7ffff7f3d715 
      11 operator()                                                                                                                                                                                                                             pluginmanager.cpp         1056 0x7ffff7f39a15 
      12 Utils::reverseForeach<QList<ExtensionSystem::PluginSpec *>, ExtensionSystem::Internal::PluginManagerPrivate::deleteAll()::<lambda(ExtensionSystem::PluginSpec *)>>(const QList<ExtensionSystem::PluginSpec *> &, const struct {...} &) algorithm.h               1250 0x7ffff7f4057f 
      13 ExtensionSystem::Internal::PluginManagerPrivate::deleteAll                                                                                                                                                                             pluginmanager.cpp         1055 0x7ffff7f39a7d 
      14 ExtensionSystem::Internal::PluginManagerPrivate::shutdown                                                                                                                                                                              pluginmanager.cpp         1400 0x7ffff7f3bffb 
      15 ExtensionSystem::PluginManager::shutdown                                                                                                                                                                                               pluginmanager.cpp         391  0x7ffff7f35171 
      16 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void ( *)()>::call(void ( *&)(), void * *)                                                                                                                   qobjectdefs_impl.h        129  0x5555555772e0 
      17 QtPrivate::FunctionPointer<void ( *)()>::call<QtPrivate::List<>, void>(void ( *)(), void *, void * *)                                                                                                                                  qobjectdefs_impl.h        198  0x55555557572d 
      18 QtPrivate::QStaticSlotObject<void ( *)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *)                                                                                               qobject_impl.h            54   0x55555557397c 
      19 QtPrivate::QSlotObjectBase::call                                                                                                                                                                                                       qobjectdefs_impl.h        374  0x7ffff4b9dc61 
      20 doActivate<false>                                                                                                                                                                                                                      qobject.cpp               4036 0x7ffff4c16762 
      21 QMetaObject::activate                                                                                                                                                                                                                  qobject.cpp               4096 0x7ffff4c0c707 
      22 QCoreApplication::aboutToQuit                                                                                                                                                                                                          moc_qcoreapplication.cpp  327  0x7ffff4b7f6ea 
      23 QCoreApplication::exit                                                                                                                                                                                                                 qcoreapplication.cpp      1499 0x7ffff4b7ae94 
      24 QCoreApplication::event                                                                                                                                                                                                                qcoreapplication.cpp      2027 0x7ffff4b7c744 
      25 QApplication::event                                                                                                                                                                                                                    qapplication.cpp          1683 0x7ffff69a3a0c 
      26 SharedTools::QtSingleApplication::event                                                                                                                                                                                                qtsingleapplication.cpp   100  0x55555557dc1e 
      27 QApplicationPrivate::notify_helper                                                                                                                                                                                                     qapplication.cpp          3290 0x7ffff69a9d96 
      28 QApplication::notify                                                                                                                                                                                                                   qapplication.cpp          3241 0x7ffff69a9b88 
      29 QCoreApplication::notifyInternal2                                                                                                                                                                                                      qcoreapplication.cpp      1119 0x7ffff4b7a407 
      30 QCoreApplication::sendEvent                                                                                                                                                                                                            qcoreapplication.cpp      1537 0x7ffff4b7afa9 
      31 QCoreApplicationPrivate::sendPostedEvents                                                                                                                                                                                              qcoreapplication.cpp      1899 0x7ffff4b7bf00 
      32 QCoreApplication::sendPostedEvents                                                                                                                                                                                                     qcoreapplication.cpp      1758 0x7ffff4b7b7ce 
      33 postEventSourceDispatch                                                                                                                                                                                                                qeventdispatcher_glib.cpp 243  0x7ffff4fcdc4e 
      34 g_main_context_dispatch                                                                                                                                                                                                                                               0x7ffff451bd3b 
      35 ??                                                                                                                                                                                                                                                                    0x7ffff4571258 
      36 g_main_context_iteration                                                                                                                                                                                                                                              0x7ffff45193e3 
      37 QEventDispatcherGlib::processEvents                                                                                                                                                                                                    qeventdispatcher_glib.cpp 393  0x7ffff4fce510 
      38 QXcbGlibEventDispatcher::processEvents                                                                                                                                                                                                 qxcbeventdispatcher.cpp   96   0x7ffff051d22a 
      39 QEventLoop::processEvents                                                                                                                                                                                                              qeventloop.cpp            100  0x7ffff4b8e98f 
      40 QEventLoop::exec                                                                                                                                                                                                                       qeventloop.cpp            182  0x7ffff4b8ecfe 
      41 QCoreApplication::exec                                                                                                                                                                                                                 qcoreapplication.cpp      1440 0x7ffff4b7ad72 
      42 QGuiApplication::exec                                                                                                                                                                                                                  qguiapplication.cpp       1925 0x7ffff59e6146 
      43 QApplication::exec                                                                                                                                                                                                                     qapplication.cpp          2569 0x7ffff69a6d83 
      44 main                                                                                                                                                                                                                                   main.cpp                  831  0x555555565662 
      

      Just after this, the next assert appears:

      SOFT ASSERT [12:01:16.397]: "!managerInstance->m_clients.contains(client)" in /home/jarek/dev/creator-12/src/plugins/languageclient/languageclientmanager.cpp:114
      

      Call stack:

      1  Utils::writeAssertLocation                                                                                                                                                                                                             qtcassert.cpp             126  0x7ffff7a964d5 
      2  operator()                                                                                                                                                                                                                             languageclientmanager.cpp 114  0x7fff7a5edf9a 
      3  QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, LanguageClient::LanguageClientManager::addClient(LanguageClient::Client *)::<lambda()>>::call(struct {...} &, void * *)                                      qobjectdefs_impl.h        129  0x7fff7a5f700b 
      4  QtPrivate::Functor<LanguageClient::LanguageClientManager::addClient(LanguageClient::Client *)::<lambda()>, 0>::call<QtPrivate::List<>, void>(struct {...} &, void *, void * *)                                                         qobjectdefs_impl.h        243  0x7fff7a5f6939 
      5  QtPrivate::QFunctorSlotObject<LanguageClient::LanguageClientManager::addClient(LanguageClient::Client *)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *)                qobjectdefs_impl.h        457  0x7fff7a5f60f2 
      6  QtPrivate::QSlotObjectBase::call                                                                                                                                                                                                       qobjectdefs_impl.h        374  0x7ffff4b9dc61 
      7  doActivate<false>                                                                                                                                                                                                                      qobject.cpp               4036 0x7ffff4c16762 
      8  QMetaObject::activate                                                                                                                                                                                                                  qobject.cpp               4096 0x7ffff4c0c707 
      9  QObject::destroyed                                                                                                                                                                                                                     moc_qobject.cpp           270  0x7ffff4c0f966 
      10 QObject::~QObject                                                                                                                                                                                                                      qobject.cpp               1062 0x7ffff4c03d64 
      11 LanguageClient::Client::~Client                                                                                                                                                                                                        client.cpp                372  0x7fff7a4ea120 
      12 ClangCodeModel::Internal::ClangdClient::~ClangdClient                                                                                                                                                                                  clangdclient.cpp          500  0x7fff78eac26f 
      13 ClangCodeModel::Internal::ClangdClient::~ClangdClient                                                                                                                                                                                  clangdclient.cpp          500  0x7fff78eac28e 
      14 qDeleteAll<QList<LanguageClient::Client *>::const_iterator>                                                                                                                                                                            qalgorithms.h             27   0x7fff7a5faa1d 
      15 qDeleteAll<QList<LanguageClient::Client *>>                                                                                                                                                                                            qalgorithms.h             35   0x7fff7a5f887f 
      16 LanguageClient::LanguageClientManager::~LanguageClientManager                                                                                                                                                                          languageclientmanager.cpp 74   0x7fff7a5edc74 
      17 LanguageClient::LanguageClientManager::~LanguageClientManager                                                                                                                                                                          languageclientmanager.cpp 77   0x7fff7a5edd3c 
      18 QObjectPrivate::deleteChildren                                                                                                                                                                                                         qobject.cpp               2221 0x7ffff4c0628d 
      19 QObject::~QObject                                                                                                                                                                                                                      qobject.cpp               1160 0x7ffff4c042fb 
      20 ExtensionSystem::IPlugin::~IPlugin                                                                                                                                                                                                     iplugin.cpp               187  0x7ffff7f1a823 
      21 LanguageClient::LanguageClientPlugin::~LanguageClientPlugin                                                                                                                                                                            languageclientplugin.cpp  32   0x7fff7a61b347 
      22 LanguageClient::LanguageClientPlugin::~LanguageClientPlugin                                                                                                                                                                            languageclientplugin.cpp  32   0x7fff7a61b366 
      23 ExtensionSystem::Internal::PluginSpecPrivate::kill                                                                                                                                                                                     pluginspec.cpp            1194 0x7ffff7f6f239 
      24 ExtensionSystem::Internal::PluginManagerPrivate::loadPlugin                                                                                                                                                                            pluginmanager.cpp         1618 0x7ffff7f3d715 
      25 operator()                                                                                                                                                                                                                             pluginmanager.cpp         1056 0x7ffff7f39a15 
      26 Utils::reverseForeach<QList<ExtensionSystem::PluginSpec *>, ExtensionSystem::Internal::PluginManagerPrivate::deleteAll()::<lambda(ExtensionSystem::PluginSpec *)>>(const QList<ExtensionSystem::PluginSpec *> &, const struct {...} &) algorithm.h               1250 0x7ffff7f4057f 
      27 ExtensionSystem::Internal::PluginManagerPrivate::deleteAll                                                                                                                                                                             pluginmanager.cpp         1055 0x7ffff7f39a7d 
      28 ExtensionSystem::Internal::PluginManagerPrivate::shutdown                                                                                                                                                                              pluginmanager.cpp         1400 0x7ffff7f3bffb 
      29 ExtensionSystem::PluginManager::shutdown                                                                                                                                                                                               pluginmanager.cpp         391  0x7ffff7f35171 
      30 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void ( *)()>::call(void ( *&)(), void * *)                                                                                                                   qobjectdefs_impl.h        129  0x5555555772e0 
      31 QtPrivate::FunctionPointer<void ( *)()>::call<QtPrivate::List<>, void>(void ( *)(), void *, void * *)                                                                                                                                  qobjectdefs_impl.h        198  0x55555557572d 
      32 QtPrivate::QStaticSlotObject<void ( *)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *)                                                                                               qobject_impl.h            54   0x55555557397c 
      33 QtPrivate::QSlotObjectBase::call                                                                                                                                                                                                       qobjectdefs_impl.h        374  0x7ffff4b9dc61 
      34 doActivate<false>                                                                                                                                                                                                                      qobject.cpp               4036 0x7ffff4c16762 
      35 QMetaObject::activate                                                                                                                                                                                                                  qobject.cpp               4096 0x7ffff4c0c707 
      36 QCoreApplication::aboutToQuit                                                                                                                                                                                                          moc_qcoreapplication.cpp  327  0x7ffff4b7f6ea 
      37 QCoreApplication::exit                                                                                                                                                                                                                 qcoreapplication.cpp      1499 0x7ffff4b7ae94 
      38 QCoreApplication::event                                                                                                                                                                                                                qcoreapplication.cpp      2027 0x7ffff4b7c744 
      39 QApplication::event                                                                                                                                                                                                                    qapplication.cpp          1683 0x7ffff69a3a0c 
      40 SharedTools::QtSingleApplication::event                                                                                                                                                                                                qtsingleapplication.cpp   100  0x55555557dc1e 
      41 QApplicationPrivate::notify_helper                                                                                                                                                                                                     qapplication.cpp          3290 0x7ffff69a9d96 
      42 QApplication::notify                                                                                                                                                                                                                   qapplication.cpp          3241 0x7ffff69a9b88 
      43 QCoreApplication::notifyInternal2                                                                                                                                                                                                      qcoreapplication.cpp      1119 0x7ffff4b7a407 
      44 QCoreApplication::sendEvent                                                                                                                                                                                                            qcoreapplication.cpp      1537 0x7ffff4b7afa9 
      45 QCoreApplicationPrivate::sendPostedEvents                                                                                                                                                                                              qcoreapplication.cpp      1899 0x7ffff4b7bf00 
      46 QCoreApplication::sendPostedEvents                                                                                                                                                                                                     qcoreapplication.cpp      1758 0x7ffff4b7b7ce 
      47 postEventSourceDispatch                                                                                                                                                                                                                qeventdispatcher_glib.cpp 243  0x7ffff4fcdc4e 
      48 g_main_context_dispatch                                                                                                                                                                                                                                               0x7ffff451bd3b 
      49 ??                                                                                                                                                                                                                                                                    0x7ffff4571258 
      50 g_main_context_iteration                                                                                                                                                                                                                                              0x7ffff45193e3 
      51 QEventDispatcherGlib::processEvents                                                                                                                                                                                                    qeventdispatcher_glib.cpp 393  0x7ffff4fce510 
      52 QXcbGlibEventDispatcher::processEvents                                                                                                                                                                                                 qxcbeventdispatcher.cpp   96   0x7ffff051d22a 
      53 QEventLoop::processEvents                                                                                                                                                                                                              qeventloop.cpp            100  0x7ffff4b8e98f 
      54 QEventLoop::exec                                                                                                                                                                                                                       qeventloop.cpp            182  0x7ffff4b8ecfe 
      55 QCoreApplication::exec                                                                                                                                                                                                                 qcoreapplication.cpp      1440 0x7ffff4b7ad72 
      56 QGuiApplication::exec                                                                                                                                                                                                                  qguiapplication.cpp       1925 0x7ffff59e6146 
      57 QApplication::exec                                                                                                                                                                                                                     qapplication.cpp          2569 0x7ffff69a6d83 
      58 main                                                                                                                                                                                                                                   main.cpp                  831  0x555555565662
      

      Please note that both asserts are triggered from the common code path until:

      ~LanguageClientManager()
      

      Attachments

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

        Activity

          People

            davschul David Schulz
            jkobus Jarek Kobus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes