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

Ending a QThread can cause deadlocks

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.8
    • 5.15.5
    • Core: Event loop
    • None
    • WebAssembly
    • 2d302a8ac0a947a10ff427c60ad6d526a20fe9e0 (qt/tqtc-qtbase/5.15)

    Description

      In QEventLoop::exit(int returnCode) there is code with a comment related to QTBUG-70185 which calls:

      emscripten_force_exit(returnCode);

      It seems this is called wrongly when a QThread with QEventLoop terminates. If this happens this is delegated to the main thread and in our case causes a deadlock in cleanup code.

      IMHO a background thread should never call emscripten_force_exit.

      Attachments

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

        Activity

          People

            lpotter Lorn Potter
            alexj Alexander Jährling
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes