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

QFuture onCanceled bug debug/release

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.3
    • None
    • All

    Description

      Hi,

      it seems that there is a different behaviour when compiling in debug or in release mode with the "then" member function of the QFuture class. 

      The documentation says : 

      "When the context object is destroyed, cancellation happens immediately. Previous futures in the chain are not cancelled and keep running until they are finished."

      In release mode, the future is indeed canceled, but in debug mode an q_assert happens.

      I have attached a demo code, showing the issue.

      debug compilation output:
      r0
      ASSERT: "context" in file C:/Qt/6.5.2/mingw_64/include/QtCore/qfuture_impl.h, line 598

      release compilation output:
      r0
      cancelled

       

      Attachments

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

        Activity

          People

            cnn Qt Core & Network
            enstone Franck Dude
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes