Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-38185

QWindowsPipeWriter blocks if the reading process hangs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.1
    • 5.3.0 Beta1
    • Core: I/O
    • None
    • Windows 7
    • 0307c008bf71e1272385d0e7f7c8d2c5a1ba6526

    Description

      If the QLocalSocket destructor is called or we call QLocalSocket::abort() on a process that hangs (does not listen to the event loop), QWindowsPipeWriter blocks 30 seconds.
      While behavior this is acceptable in the destructor, calling QLocalSocket::abort() should not block the main process.
      My naive approach would be to reduce the timeout of 30000 ms to 10 ms in the abort case.

      This results in Qt Creator hanging if we try to edit the quick/controls/gallery example.
      Controls gallery example hangs Qt Creator.

      (1) Open Control Gallery example (examples/quick/controls/gallery)
      (2) Goto design mode
      (3) Play around (just select items)

      The qml2puppets starts to take up to 15% of the CPU

      (4) Go back to edit mode

      Result: Qt Creator hangs... (in the destructor of NodeInstanceServerInterface)

       	Qt5Cored.dll!QThread::wait(unsigned long time) Line 668	C++
       	Qt5Cored.dll!QWindowsPipeWriter::~QWindowsPipeWriter() Line 70	C++
       	Qt5Networkd.dll!QWindowsPipeWriter::`scalar deleting destructor'(unsigned int)	C++
       	Qt5Cored.dll!QObjectPrivate::deleteChildren() Line 1905	C++
       	Qt5Cored.dll!QObject::~QObject() Line 1000	C++
       	Qt5Cored.dll!QIODevice::~QIODevice() Line 404	C++
       	Qt5Networkd.dll!QLocalSocket::~QLocalSocket() Line 369	C++
       	Qt5Networkd.dll!QLocalSocket::`vector deleting destructor'(unsigned int)	C++
       	Qt5Cored.dll!QObjectPrivate::deleteChildren() Line 1905	C++
       	Qt5Cored.dll!QObject::~QObject() Line 1000	C++
       	Qt5Networkd.dll!QLocalServer::~QLocalServer() Line 135	C++
       	QmlDesignerd.dll!QLocalServer::`scalar deleting destructor'(unsigned int)	C++
       	Qt5Cored.dll!QObjectPrivate::deleteChildren() Line 1905	C++
       	Qt5Cored.dll!QObject::~QObject() Line 1000	C++
      >	QmlDesignerd.dll!QmlDesigner::NodeInstanceServerInterface::~NodeInstanceServerInterface()	C++
       	QmlDesignerd.dll!QmlDesigner::NodeInstanceServerProxy::~NodeInstanceServerProxy() Line 344	C++
       	QmlDesignerd.dll!QmlDesigner::NodeInstanceServerProxy::`scalar deleting destructor'(unsigned int)	C++
       	QmlDesignerd.dll!QmlDesigner::NodeInstanceView::modelAboutToBeDetached(QmlDesigner::Model * model) Line 170	C++
       	QmlDesignerd.dll!QmlDesigner::Internal::ModelPrivate::setNodeInstanceView(QmlDesigner::NodeInstanceView * nodeInstanceView) Line 1616	C++
       	QmlDesignerd.dll!QmlDesigner::Model::setNodeInstanceView(QmlDesigner::NodeInstanceView * nodeInstanceView) Line 1833	C++
       	QmlDesignerd.dll!QmlDesigner::ViewManager::detachViewsExceptRewriterAndComponetView() Line 143	C++
       	QmlDesignerd.dll!QmlDesigner::QmlDesignerPlugin::deactivateAutoSynchronization() Line 307	C++
       	QmlDesignerd.dll!QmlDesigner::QmlDesignerPlugin::hideDesigner() Line 209	C++
       	QmlDesignerd.dll!QmlDesigner::QmlDesignerPlugin::onCurrentModeChanged(Core::IMode * newMode, Core::IMode * oldMode) Line 370	C++
      

      Attachments

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              thohartm Thomas Hartmann
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes