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

unexpected behaviour of QWaitCondition::wait in 64bit version

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • 5.12.0
    • 5.6.0
    • Core: Threads
    • None
    • Ubuntu 16.04 64Bit with Qt 5.6 64Bit
    • fd207c06b81b12086bdf80e4fa7b393bf1f424d6

      QWaitCondition::wait has a unsigned long parameter for the timeout. The documentation said, that the thread will waitfor the condition at least this time (in milliseconds). But if you call this method with a value greater than INT32_MAX on a 64Bit machine (where unsigned long is 64 bits) the function will not wait the expected time. If you call it with INT32_MAX for example, the function will return immediately (with false).

      The timeout parameter is internally converted into an int (which is 32 bit on a 64 machine). This results in a timeout of -1ms.

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

            thiago Thiago Macieira
            rsprengel Rainer Sprengel
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes