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

std::sort hangs (but qSort runs) with complex data structure containing Qt objects

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.9.6
    • Core: Other
    • None
    • macOS Mojave 10.14.6 on an iMac Pro (2017)
    • macOS

      The attached sample program was taken from a real-world program with the data structures obfuscated and simplified. Both in the sample program and our product, std::sort hangs when qSort doesn't hang.

      The issue came to our attention when one of our customers reported our product hanging. Replacing the std::sort call with a qSort call fixed the issue for our customer.

      However, it is my understanding that we're supposed to favor std::sort over qSort in new development.

        1. qsort.zip
          0.9 kB
          Craig Kaufman
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            craig_kaufman Craig Kaufman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes