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

QTWebKit Segmentation fault after calling 'new WebSocket()' to connect to localhost on FreeBSD 10.1 RELEASE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P2: Important P2: Important
    • None
    • 5.4.1
    • WebKit, WebSockets
    • None
    • FreeBSD

      Previous bug-report assumed it was moved to webkit upstream, but it was never added there. Since then, qt-webkit was removed from upstream. So it is now applicable here.

      Feel free to re-open: https://bugreports.qt.io/browse/QTWEBKIT-354
      "connected()" slot called while in connectToHost() (FreeBSD 8.2)

      This issue still exists and the same fix resolves this on on FreeBSD 10.1 RELEASE when using Capybara::Poltergeist integrated with phantomjs (since a 'new WebSocket' is created to '127.0.0.1'').

      Changing line 87 in latest :

      Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
       void SocketStreamHandlePrivate::initConnections()
       {
      -    connect(m_socket, SIGNAL(connected()), this, SLOT(socketConnected()));
      +    connect(m_socket, SIGNAL(connected()), this, SLOT(socketConnected()), Qt::QueuedConnection);
           connect(m_socket, SIGNAL(readyRead()), this, SLOT(socketReadyRead()));
           connect(m_socket, SIGNAL(disconnected()), this, SLOT(socketClosed()));
           connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketError(QAbstractSocket::SocketError)));
      

      Note: I haven't tested Qt::DirectConnection or Qt::AutoConnection and used the previous bug poster's solution.

      Does this mean kqueue is too fast?

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

            allan.jensen Allan Sandfeld Jensen
            frankiek3 Frank Koczur
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes