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

CreateDIBSection Failed,app crash when move window from second screen to prime screen while resize

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Incomplete
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      windows 10 64bit, qt 5.15.2, vs2019 32bit
    • Platform/s:
      Windows

      Description

      my comuter OS is window10 64bit, QT version is 5.15.2, Compiler is msvc2019 32bit, IDE is vs2019, qt addin version is 2.7.1。

      it has two screen。

      the first screen is 4K, scaling ratio is:250%,screen resolution is 3840*2160。

      the second screen is normal  LED screen, scaling radio is:100%, screen resolution is 1920*1280。

      When I move my app window from second screen to first second, the app will auto quit,vs2019 will show the qt crash stack.

      the param of size is 2750*1800(QBackingStore::resize(const QSize &size),but the param of size change to 6875*4500(QWindowsBackingStore::resize(const QSize &size, const QRegion &region)。6875*4500 is more than 3840*2160(the first screen resolution), it is over the screen max width and height。

      so  i think funtion of QHighDpi::toNativePixels not judge the size of the current screen max width and height.

        Attachments

        1. 1 my notebook_os.png
          1 my notebook_os.png
          1.22 MB
        2. 2 primary_screen2.png
          2 primary_screen2.png
          1.45 MB
        3. 2 primary screen1.png
          2 primary screen1.png
          1.43 MB
        4. 3 second_screen1.png
          3 second_screen1.png
          1.43 MB
        5. 3 second_screen2.png
          3 second_screen2.png
          1.44 MB
        6. 7 output.png
          7 output.png
          557 kB
        7. code1_QWindowsNativeImage.png
          code1_QWindowsNativeImage.png
          398 kB
        8. code2_QWindowsBackingStore resize.png
          code2_QWindowsBackingStore resize.png
          554 kB
        9. code3_QBackingStore resize.png
          code3_QBackingStore resize.png
          341 kB
        10. crash_stack.txt
          10 kB
        11. QtMyDialog.zip
          20 kB

          Issue Links

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

            Activity

              People

              Assignee:
              kleint Friedemann Kleint
              Reporter:
              hulaishun hu laishun
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes