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

[macOS] Screen::grabWindow() crashes in certain multiscreen scenarios

    XMLWordPrintable

Details

    • macOS
    • 7c7b09dbac7d1921efb305cb7843b88a5247f17e (qt/qtbase/5.15)

    Description

      Steps to reproduce the issue:
      1. Setup two screens from System Preferences so that the secondary screen is on top of the primary screen or so that the secondary screen is on the left side of primary screen. (See screenshot for details)
      2. Run attached test application and make sure it's on the primary screen.
      3. Click on the 'Capture Screen' button.

      Outcome:
      The application crashes

      Notes:
      The crash occurs only when x or y is 0 when passed to grabWindow(). Changing x or y to e.g. 1 will not crash the application anymore. This can be done either in user application or in qcocoaintegration.mm:276

      Tested on:
      macOS Sierra 10.12

      Attachments

        1. backtrace.txt
          53 kB
        2. qtbug-63086.tar.gz
          1 kB
        3. screensetup1.png
          screensetup1.png
          7 kB
        4. screensetup2.png
          screensetup2.png
          7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            andysh Andy Shaw
            kileppal Kimmo Leppälä
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes