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

QNetworkAccessManager::proxyAuthenticationRequired related crash

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.15.2
    • Network: Proxies
    • None
    • Windows

    Description

      Hi.

      We are using QNetworkAccessManager to make some http get requests and there seems to be a problem with proxy authentication. It happens when you are blocking slot connected to QNetworkAccessManager::proxyAuthenticationRequired signal for a long time (about 5 minutes or more).

      After returning from proxyAuthenticationRequired connected slot application will hit assertion in QHttpNetworkConnectionChannel::sendRequest():
      Q_ASSERT(!protocolHandler.isNull());

      How to reproduce
      The attached archive contains a simple testcase to reproduce the issue. You need to provide a valid proxy hostname (just change the proxyHostName variable) and port (proxyPort variable). The proxy server must require authentication.

      Some remarks

      • At this moment i can check only by using our Squid proxy server. I also try to use Fiddler with enabled authentication, but could not reproduce the issue. So its possible that some proxy server timeouts matter.
      • It seems there is no need to input real credentials, it will hit assertion anyway.
      • There are no difference between 5 minutes wait with repetitive QCoreApplication::processEvents() calls and one long QThread::sleep() without it.
      • QTBUG-47822 can be somehow related to this issue
      • If you abort (QNetworkReply::abort) the current QNetworkReply inside slot connected to proxyAuthenticationRequired signal, there will not be any assertion hit.

      Attachments

        1. testProxyAuth.zip
          1 kB
        2. nam_crash.JPG
          nam_crash.JPG
          140 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            onovozhilov Oleg Novozhilov
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes