Steps to reproduce:
- Download Caddy: https://caddyserver.com/
(I tested with v2.4.5.)
- Run an HTTP server for testing:
- Build and run the attached HTTP client project: 20210927-1018-QNetworkAccessManagerTest.zip.
- After around 4,000 consecutive GET requests (about 15 minutes), the application crashes with a read access violation.
This bug could possibly be a duplicate of QTBUG-38309, however:
- The other bug specifically says it does not happen on Windows whereas this one does.
- The other bug points suspicion at OpenSSL whereas this bug uses HTTP.
Having said that, I tried the same work-around mentioned in QTBUG-38309, changing:
QTimer::singleShot(1000, reply, &QObject::deleteLater);
and so far (over 13,000 requests / 44 minutes) it has not crashed.