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

Crash when using 2 QNetworAccessManagers from 2 different threads concurrently

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 4.7.4
    • Core: Threads, Network: SSL
    • None
    • openSUSE 11.4 with Qt 4.7.4-228.1 from KDE:Qt repository.
      Linux linux-suse 2.6.37.6-0.7-desktop #1 SMP PREEMPT 2011-07-21 02:17:24 +0200 x86_64 x86_64 x86_64 GNU/Linux

    Description

      In a GUI application I noticed crashes related to QNetworkAccessManagers running in different threads at the same time.

      So I created an "example" console application which contains two different classes (AutoUpdater and PartCheck) which try to receive a page (https://www.twitter.com) from the internet concurrently.
      There's a Helper class which starts these two threads.

      If you compile and run this application from Creator, you'll notice the following things:

      • if both threads are enabled in helper.cpp the result in xterm either the 301 result page of Twitter twice OR none of the threads are finished and xterm says: "Press <RETURN> to close this window..." OR xterm says: "protocol https unknown"
      • if you comment out the helper.cpp:11 and 12th line, you'll always see the Twitter redirect page.

      In this little example the worst case is that the program ends without SIGSEGV, but in my original GUI application this results in crash.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              earthdomain Earth Domain (Inactive)
              szotsaki Szőts Ákos
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes