Details
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.