[Qt-interest] Aborting QNetworkReply::post() causes crash
Info
info at misafe.com
Tue Nov 3 16:56:56 CET 2009
Hi,
I've come across an issue when aborting a POST operation which seems
to cause a crash every time:
QNetworkReply *reply = m_Manager.post(request, data); // m_Manager is
a QNetworkAccessManager
Now, in the same event loop, I call:
reply->abort();
And in the finished(QNetworkReply*) slot I have a single call:
reply->deleteLater();
Every time this leads to a crash, the offending line is in
qhttpnetworkreply_p.h, line 146. The 'this' pointer is 0x00000000, so
it seems the deleteLater() call is deleting the QNetworkReply before
the final bytesWritten() slot is triggered.
What would cause this to happen? Should I be calling deleteLater() in
the finished() slot? The documentation suggests it and states that
there will be no more updates to the reply's data or metadata but it
seems it is still trying to read from the post input device after the
finished() event.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091103/d34f5b06/attachment.html
More information about the Qt-interest-old
mailing list