Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.3
-
None
-
Gentoo Linux, Qt 4.7.3
-
a28c433b290dae1b3509ddf1eee616ba91ce221b (5.0), 6c4c5709a3f6150c4e37f38c7e7fd980ab359a53 (4.8)
Description
If the application decides to cancel a download on a QNetworkReply object as created by a QNetworkAccessManager instance, the close() function seems to do the job for HTTP downloads. For FTP downloads, this does not work if the FTP server is very slow (i.e. not responding in reasonable time). Calling close() in such a situation may lead to that QNetworkAccessFtpBackend::closeDownstreamChannel is called which may abort the program without any notification.
First, an abort() without any warning message is a bad thing (TM) as it makes it unnecesssarily hard to trace the origin of the crash. Not even a source code comment (in 4.7.3) does explain why abort is called.
Second, IP networks are best-effort only, so anything can go wrong and no application should stop working just because network packets do not arrive in time.
I have no ready-to-use minimum example code, but it should be reproducible by simply issuing a get(...) on a QNetworkAccessManager and on the resulting QNetworkReply object calling close() after a second or so.
The FTP address where I observed this crash is ftp://ftp.cricyt.edu.ar/pub/dnv/informes/parciales/Informe%20029R.doc