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

CreateDIBSection failed when moving window between screens

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.9.7
    • Widgets: Main Window
    • None
    • Windows 10, QT 5.9.7
      MSVC2015 32bit
    • Windows

    Description

      If there is a large difference between devicePixelRatio of two screens, moving the window from one screen to the other crashes the application.

      I have provided an example. To replicate the issue you have to use two monitors and devicePixelRatio ratio between them has to be at least 1:8. I have used QT_SCREEN_SCALE_FACTORS environment variable to simulate that since I do not have a 4K monitor. Moving the window from one screen to the other causes the crash as seen below.

       

      Program: C:\Qt\Qt5.9.7\5.9.7\msvc2015\bin\Qt5Cored.dll

      Module: 5.9.7

      File: windows\qwindowsnativeimage.cpp

      Line: 105

      createDIB: CreateDIBSection failed.

       

      1 QLocale::swap Qt5Cored 0x667a8381
      2 QLocale::swap Qt5Cored 0x667a700d
      3 qt_plugin_instance qwindowsd 0x399559b
      4 qt_plugin_instance qwindowsd 0x3995262
      5 qt_plugin_instance qwindowsd 0x3980c14
      6 QOpenGLFunctions_4_0_Core::glDrawElementsInstancedBaseVertex Qt5Guid 0x12a6074
      7 QOpenGLFunctions_4_0_Core::glDrawElementsInstancedBaseVertex Qt5Guid 0x12a6231
      8 QGraphicsRotation::axisChanged Qt5Widgetsd 0x649dd65b
      9 QGraphicsRotation::axisChanged Qt5Widgetsd 0x649dd26f
      10 QGraphicsRotation::axisChanged Qt5Widgetsd 0x649db227
      11 QGraphicsRotation::axisChanged Qt5Widgetsd 0x64a16931
      12 QGraphicsRotation::axisChanged Qt5Widgetsd 0x64a0da85
      13 QGraphicsRotation::axisChanged Qt5Widgetsd 0x64bccba3
      14 QGraphicsRotation::axisChanged Qt5Widgetsd 0x649ca2ab
      15 QGraphicsRotation::axisChanged Qt5Widgetsd 0x649c83ae
      16 QLocale::swap Qt5Cored 0x66a45adc
      17 QLocale::swap Qt5Cored 0x66a4ea99
      18 QGraphicsRotation::axisChanged Qt5Widgetsd 0x649dc131
      19 QGraphicsRotation::axisChanged Qt5Widgetsd 0x649dbea8
      20 QGraphicsRotation::axisChanged Qt5Widgetsd 0x64a466cb
      21 QGraphicsRotation::axisChanged Qt5Widgetsd 0x64a465e0
      22 QGraphicsRotation::axisChanged Qt5Widgetsd 0x64a43d98
      23 QLocale::swap Qt5Cored 0x66a8cddc
      24 QLocale::swap Qt5Cored 0x66a8c811
      25 QOpenGLFunctions_4_0_Core::glDrawElementsInstancedBaseVertex Qt5Guid 0x10abe6b
      26 QOpenGLFunctions_4_0_Core::glDrawElementsInstancedBaseVertex Qt5Guid 0x10adb20
      27 QOpenGLFunctions_4_0_Core::glDrawElementsInstancedBaseVertex Qt5Guid 0x10adabf
      28 QOpenGLFunctions_4_0_Core::glDrawElementsInstancedBaseVertex Qt5Guid 0x1097606
      29 QOpenGLFunctions_4_0_Core::glDrawElementsInstancedBaseVertex Qt5Guid 0x10977d2
      30 QOpenGLFunctions_4_0_Core::glDrawElementsInstancedBaseVertex Qt5Guid 0x10637e9
      31 qt_plugin_instance qwindowsd 0x39829ed
      32 QLocale::swap Qt5Cored 0x66adf692
      33 AddClipboardFormatListener USER32 0x748fbf1b
      34 DispatchMessageW USER32 0x748f83ea
      35 DispatchMessageW USER32 0x748f7c9e
      36 DispatchMessageW USER32 0x748f7a80
      37 QLocale::swap Qt5Cored 0x66ae0016
      38 qt_plugin_instance qwindowsd 0x39829b8
      39 QLocale::swap Qt5Cored 0x66a40dac
      40 QLocale::swap Qt5Cored 0x66a40fb7
      41 QLocale::swap Qt5Cored 0x66a43ce2
      42 QOpenGLFunctions_4_0_Core::glDrawElementsInstancedBaseVertex Qt5Guid 0x1093508
      43 QGraphicsRotation::axisChanged Qt5Widgetsd 0x649c61b9
      44 main main.cpp 28 0xfb25f2
      45 invoke_main exe_common.inl 64 0xfb43ae
      46 __scrt_common_main_seh exe_common.inl 253 0xfb4210
      47 __scrt_common_main exe_common.inl 296 0xfb40ad
      48 mainCRTStartup exe_main.cpp 17 0xfb43c8
      49 BaseThreadInitThunk KERNEL32 0x75bd8494
      50 RtlAreBitsSet ntdll 0x77e541c8
      51 RtlAreBitsSet ntdll 0x77e54198

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            semiro Semir Omerovic
            Votes:
            6 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes