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

new QNetworkReply receives old messages from previously aborted and deleted QNetworkReply

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 5.14.2, 5.15.0
    • Network: HTTP
    • None
    • Linux arch
    • Linux/X11

    Description

      Shared QNetworkAccessManager "nam"

      QNetworkReply *reply1 = nam->get(...);

      connect(reply1, finished, slot(onFinished))

      connect(reply1, destroyed, SLOT(onReplyDestroyed)

      reply1->abort()

       

      within onFinished call reply1->deleteLeter

      within onReplyDestroyed verify that the reply has been destroyed and save the address of the reply1 (and print it on console)

       

      QNetworkReply *reply2 = nam->get(another url)

      • I see that the pointer address printed above is the same as the new one
      • reply2 receives a message that was requested in reply1, that evidently arrives after reply1 had been aborted and destroyed

      Somehow QNetworkAccessManager must mess up two subsequent gets and mix references to old and new reply.

       

      Attachments

        1. test-qtnam.tar
          230 kB
        2. with-abort.png
          with-abort.png
          94 kB
        3. without-abort.png
          without-abort.png
          98 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            manordheim Mårten Nordheim
            jacum Giacomo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes