Details
-
Task
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 12.0.0
-
None
-
-
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
- relates to
-
QTCREATORBUG-29747 Soft assert in Client::sendMessage()
- Closed