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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.7
    • 5.6.1
    • Network
    • None
    • Windows 7/10
    • 4f959b6b3004ecbd0d34b34f613ce9980ba42b55

    Description

      My Application crashes on Windows with the following Stacktrace:

       	Qt5Networkd.dll!QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> >::data() Line 135	C++
       	Qt5Networkd.dll!qGetPtrHelper<QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> > >(const QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> > & p) Line 1014	C++
       	Qt5Networkd.dll!QHttpNetworkConnection::d_func() Line 150	C++
      >	Qt5Networkd.dll!QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socketError) Line 945	C++
       	Qt5Networkd.dll!QHttpNetworkConnectionChannel::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 128	C++
       	Qt5Cored.dll!QMetaObject::activate(QObject * sender, int signalOffset, int local_signal_index, void * * argv) Line 3730	C++
       	Qt5Cored.dll!QMetaObject::activate(QObject * sender, const QMetaObject * m, int local_signal_index, void * * argv) Line 3595	C++
       	Qt5Networkd.dll!QAbstractSocket::error(QAbstractSocket::SocketError _t1) Line 394	C++
       	Qt5Networkd.dll!QAbstractSocketPrivate::setErrorAndEmit(QAbstractSocket::SocketError errorCode, const QString & errorString) Line 1384	C++
       	Qt5Networkd.dll!QSslSocketBackendPrivate::transmit() Line 918	C++
       	Qt5Networkd.dll!QSslSocketBackendPrivate::disconnectFromHost() Line 1499	C++
       	Qt5Networkd.dll!QSslSocket::disconnectFromHost() Line 1960	C++
       	Qt5Networkd.dll!QAbstractSocket::close() Line 2654	C++
       	Qt5Networkd.dll!QSslSocket::close() Line 799	C++
       	Qt5Networkd.dll!QHttpNetworkConnectionPrivate::~QHttpNetworkConnectionPrivate() Line 114	C++
       	[External Code]	
       	Qt5Cored.dll!QScopedPointerDeleter<QObjectData>::cleanup(QObjectData * pointer) Line 54	C++
       	Qt5Cored.dll!QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> >::~QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> >() Line 101	C++
       	Qt5Cored.dll!QObject::~QObject() Line 1042	C++
       	Qt5Networkd.dll!QHttpNetworkConnection::~QHttpNetworkConnection() Line 1293	C++
       	[External Code]	
       	Qt5Networkd.dll!QNetworkAccessCachedHttpConnection::dispose() Line 195	C++
       	Qt5Networkd.dll!QNetworkAccessCache::clear() Line 119	C++
       	Qt5Networkd.dll!QNetworkAccessCache::~QNetworkAccessCache() Line 106	C++
       	[External Code]	
       	Qt5Networkd.dll!qThreadStorage_deleteData<QNetworkAccessCache>(void * d, QNetworkAccessCache * * __formal) Line 86	C++
       	Qt5Networkd.dll!QThreadStorage<QNetworkAccessCache *>::deleteData(void * x) Line 129	C++
       	Qt5Cored.dll!QThreadStorageData::finish(void * * p) Line 195	C++
       	Qt5Cored.dll!QThreadPrivate::finish(void * arg, bool lockAnyway) Line 403	C++
       	Qt5Cored.dll!QThreadPrivate::start(void * arg) Line 387	C++
       	[External Code]	
       	
      

      I've looked at the file 'qhttpnetworkconnectionchannel.cpp' at line 945. There is a guarded pointer 'connection' that is referenced without a test if the referenced object exists.
      A test with

       
      if (!connection)
      return;
      

      before referencing the object seems to fix it. But I'm not sure if it has bad side effects.

      Background:
      The Application establishes multiple HTTP/HTTPS multipart streams based on presets selected by a user. The presets are changeable with a combobox. If i change the current preset very fast with the mousewheel the application crashes. I had no luck to crash the application using unencrypted connections.

      Attachments

        For Gerrit Dashboard: QTBUG-54167
        # Subject Branch Project Status CR V

        Activity

          People

            tpochep Timur Pocheptsov
            mbienst76 Markus Bienst
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes