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

QHostInfo::lookupHost - a slot gets executed in a wrong thread

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 5.12.5
    • 5.9, 5.10, 5.11
    • Core: Other
    • None
    • e24a4976bebd7ca90deac2b40c08900625773a99

    Description

      Unlike legacy overloads, working with SLOT macro, the new version, accepting a pointer to member-function calls this member-function on a wrong thread (not the thread that initiates a lookup). Such a behavior, if intended, must be properly documented not to surprise its users.

      With the example attached I have this:

      ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 0x0x7fb991fa3e80. Receiver 'lookupButton' (of type 'QPushButton') was created in thread 0x0x7fb991d075e0", file kernel/qcoreapplication.cpp, line 576
      Abort trap: 6

      Attachments

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

        Activity

          People

            vhilshei Volker Hilsheimer
            tpochep Timur Pocheptsov
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes