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

Client: Slowing down client communication reveals a number of asserts

    XMLWordPrintable

Details

    • Linux/X11
    • cad73e4f1 (12.0)

    Description

      Just for testing purposes, apply the following patch:

      --- src/plugins/languageclient/languageclientinterface.cpp
      +++ src/plugins/languageclient/languageclientinterface.cpp
      @@ -7,6 +7,8 @@
       
       #include <QLoggingCategory>
       
      +#include <QThread>
      +
       using namespace LanguageServerProtocol;
       using namespace Utils;
       
      @@ -26,6 +28,7 @@ BaseClientInterface::~BaseClientInterface()
       
       void BaseClientInterface::sendMessage(const JsonRpcMessage message)
       {
      +    QThread::sleep(1);
           const BaseMessage baseMessage = message.toBaseMessage();
           sendData(baseMessage.header());
           sendData(baseMessage.content);
      

      and start switching sessions containing QtCreator project, like in QTCREATORBUG-29747. The following asserts appear:

      SOFT ASSERT [18:27:59.111]: "m_client" in /home/jarek/dev/creator-12-work/src/plugins/languageclient/languageclientformatter.cpp:105
      
      SOFT ASSERT [18:36:21.273]: "m_state == Client::InitializeRequested" in /home/jarek/dev/creator-12-work/src/plugins/languageclient/client.cpp:2086
      

      With this patch it's also easy to trigger the assert from QTCREATORBUG-29747:

      SOFT ASSERT [18:27:22.303]: "d->m_state == Initialized" in /home/jarek/dev/creator-12-work/src/plugins/languageclient/client.cpp:700
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTCREATORBUG-29748
          # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes