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

Crash in QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socketError)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 4.8.4
    • Fix Version/s: 4.8.6, 5.1.1
    • Component/s: Network
    • Labels:
      None
    • Environment:
      Windows XP and Visual Studio 2010, Mac OS X 10.6.8 and gcc 4.2.
    • Commits:
      Qt5: 78f9f4b4970e6f4155b7cf2e88c6ac540dec47bc , Qt4: ed4ef3d23142bd23d62f44babee074d0a102c72f

      Description

      I have a project that involves QWebView and a lot of https request.
      Application crashes on both platforms: Mac 10.6 and Windows XP.

      > 	QtNetworkd4.dll!QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> >::data()  Line 135 + 0x3 bytes	C++
       	QtNetworkd4.dll!qGetPtrHelper<QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> > >(const QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> > & p)  Line 2460 + 0xb bytes	C++
       	QtNetworkd4.dll!QHttpNetworkReply::d_func()  Line 170 + 0x13 bytes	C++
      	QtNetworkd4.dll!QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socketError)  Line 1081 + 0xe bytes	C++
       	QtNetworkd4.dll!QHttpNetworkConnectionChannel::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a)  Line 72 + 0x11 bytes	C++
       	QtCored4.dll!QMetaCallEvent::placeMetaCall(QObject * object)  Line 524 + 0x1d bytes	C++
       	QtCored4.dll!QObject::event(QEvent * e)  Line 1194 + 0x14 bytes	C++
       	QtGuid4.dll!QApplicationPrivate::notify_helper(QObject * receiver, QEvent * e)  Line 4562 + 0x11 bytes	C++
       	QtGuid4.dll!QApplication::notify(QObject * receiver, QEvent * e)  Line 3944 + 0x10 bytes	C++
       	QtCored4.dll!QCoreApplication::notifyInternal(QObject * receiver, QEvent * event)  Line 949 + 0x15 bytes	C++
       	QtCored4.dll!QCoreApplication::sendEvent(QObject * receiver, QEvent * event)  Line 231 + 0x39 bytes	C++
       	QtCored4.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver, int event_type, QThreadData * data)  Line 1573 + 0xd bytes	C++
       	QtCored4.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags)  Line 739 + 0x10 bytes	C++
       	QtCored4.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags)  Line 150	C++
       	QtCored4.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags)  Line 204 + 0x2d bytes	C++
       	QtCored4.dll!QThread::exec()  Line 542 + 0x15 bytes	C++
       	QtCored4.dll!QThread::run()  Line 610	C++
       	QtCored4.dll!QThreadPrivate::start(void * arg)  Line 348	C++
       	msvcr100d.dll!_callthreadstartex()  Line 314 + 0xf bytes	C
       	msvcr100d.dll!_threadstartex(void * ptd)  Line 297	C
      

      Call stack on Mac OS is pretty much the same.

      It looks that the 'reply' is null and crashes here in QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socketError):

      ...
      } else if (state == QHttpNetworkConnectionChannel::ReadingState) {
                  if (!reply->d_func()->expectContent()) {
                      // No content expected, this is a valid way to have the connection closed by the server
                      return;
                  }
      ...
      

      Unfortunately I don't have sample code to reproduce this.

        Attachments

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

          Activity

            People

            Assignee:
            peter-har Peter Hartmann
            Reporter:
            dakron Pawel Kurdybacha
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes