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

Copy in Adobe Air based application will cause heap corruption in Qt application

    XMLWordPrintable

    Details

      Description

      I have a simple Qt application which has a QDialog with a QTextEdit in it. The dialog has a slot connected to the QClipboard::dataChanged signal. In the slot, I tried to query the MIME data using QMimeData::formats().

      If I have my example running and copy anything in a Adobe Air based application, for example Doomi, balsamiq, GMDesk, Visual Studio will report following message:

      ============================================================
      Heap block at 0000000000490B90 modified at 0000000000490BA0 past requested size of 0
      Windows has triggered a breakpoint in Clipboard.exe.
      

      This may be due to a corruption of the heap, which indicates a bug in Clipboard.exe or any of the DLLs it has loaded.

      This may also be due to the user pressing F12 while Clipboard.exe has focus.

      The output window may have more diagnostic information.
      ============================================================

      One thing I noticed that for one copy action in Adobe Air app, Qt will send out at least two dataChanged signal, the first one does not have the MIME data, the rest ones do, but with identical MIME data . Also the above error message always happen the second time the slot is called when it is trying to get the system clipboard by OleGetClipboard.

      The simple example I attached won't crash, but our product will after a few copy actions in Adobe Air based app. I feel the heap corruption reported by Visual Studio could be the root cause of our crash.

      Please let me know if you need more info.

      Thanks,
      -Ollie

        Attachments

        1. Clipboard.zip
          2 kB
        2. qt_standalone_heapCorruption_stack.txt
          3 kB
        3. qtbug41329_purify_air.txt
          82 kB
        4. qtbug41329_purify_notepad.txt
          248 kB
        5. qtbug41329.zip
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            kleint Friedemann Kleint
            Reporter:
            pyl0420 Yili Pan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes