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

Crash for Mac apps involving resolving promises on the paste board

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.6.2
    • 5.5.1, 5.6.0, 5.7.0
    • QPA
    • None
    • OS X El Capitan 10.11.5
      iMac Retina 5K, 27-inch, Late 2014
    • macOS
    • ad0d2f463a0905c4705660d96e8a514539c51d36

    Description

      When setting up a drag involving URL MIME data, a crash can be provoked when the system pasteboard is forced to resolve its promises.

      One way of invoking this crash, involves having Apple's own Clipboard Viewer.app in order to force resolution of pasteboard contents. Another way is to have e.g. the desktop/clipboard sharing application Synergy.

      Clipboard Viewer is available as part of Auxiliary Tools for Xcode 7.

      1. Run the attached Qt Quick app
      2. Initiate a drag of a URL (no need to drop it anywhere specific).
      3. Switch to Clipboard Viewer and select the Drag Clipboard for viewing
      4. Select e.g. public.file-url or refresh and observe the crash

      Sample stack trace :

      Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
      0   com.apple.CoreFoundation      	0x00007fff93a688c2 CFPasteboardGetGenerationCount + 66
      1   com.apple.HIServices          	0x00007fff8eb73679 IndexToItem(OpaquePasteboardRef*, long) + 30
      2   com.apple.HIServices          	0x00007fff8eb964a0 PasteboardCopyDataProc(void*, __CFPasteboard*, long, long, __CFString const*) + 190
      3   com.apple.CoreFoundation      	0x00007fff93b0fc04 __CFPasteboardClientCallBack + 1364
      4   com.apple.CoreFoundation      	0x00007fff93aeb628 __CFMessagePortPerform + 584
      5   com.apple.CoreFoundation      	0x00007fff93a53019 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
      6   com.apple.CoreFoundation      	0x00007fff93a52f89 __CFRunLoopDoSource1 + 473
      7   com.apple.CoreFoundation      	0x00007fff93a4a9bb __CFRunLoopRun + 2171
      8   com.apple.CoreFoundation      	0x00007fff93a49ed8 CFRunLoopRunSpecific + 296
      9   com.apple.HIToolbox           	0x00007fff898ef935 RunCurrentEventLoopInMode + 235
      10  com.apple.HIToolbox           	0x00007fff898ef76f ReceiveNextEventCommon + 432
      11  com.apple.HIToolbox           	0x00007fff898ef5af _BlockUntilNextEventMatchingListInModeWithFilter + 71
      12  com.apple.AppKit              	0x00007fff844d1df6 _DPSNextEvent + 1067
      13  com.apple.AppKit              	0x00007fff844d1226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
      14  com.apple.AppKit              	0x00007fff844c5d80 -[NSApplication run] + 682
      15  libqcocoa.dylib               	0x000000010b4f908d QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2189
      16  org.qt-project.QtCore         	0x000000010a7c707d QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 381
      17  org.qt-project.QtCore         	0x000000010a7c9f5a QCoreApplication::exec() + 346
      18  com.surething.drag-n-drop     	0x0000000109baf9fd main + 205 (main.cpp:19)
      19  com.surething.drag-n-drop     	0x0000000109bab694 start + 52
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-54663
          # Subject Branch Project Status CR V

          Activity

            People

              tpochep Timur Pocheptsov
              surething Dan Erik
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes