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

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • 5.15.2
    • None
    • windows 10 64bit, qt 5.15.2, vs2019 32bit
    • 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.22 MB
          hu laishun
        2. 2 primary_screen2.png
          1.45 MB
          hu laishun
        3. 2 primary screen1.png
          1.43 MB
          hu laishun
        4. 3 second_screen1.png
          1.43 MB
          hu laishun
        5. 3 second_screen2.png
          1.44 MB
          hu laishun
        6. 7 output.png
          557 kB
          hu laishun
        7. code1_QWindowsNativeImage.png
          398 kB
          hu laishun
        8. code2_QWindowsBackingStore resize.png
          554 kB
          hu laishun
        9. code3_QBackingStore resize.png
          341 kB
          hu laishun
        10. crash_stack.txt
          10 kB
          hu laishun
        11. QtMyDialog.zip
          20 kB
          hu laishun

        Issue Links

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

          Activity

            People

              kleint Friedemann Kleint
              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