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

Windows 10 / 1809: access violation in qwindows!QWindowsWindow::checkForScreenChanged

    XMLWordPrintable

    Details

    • Platform/s:
      Windows
    • Commits:
      6c23f006e07b774b0eef863cccd36a992274ca32 (qt/qtbase/5.14.1)

      Description

      I do not have reproducable example, just a crash report, when my app crashed at user site with call stack
      error access violation at line 1884 using msvc2017-64 compiler
      I found the source

      void QWindowsWindow::checkForScreenChanged(ScreenChangeMode mode)
      {
          if (parent() || QWindowsScreenManager::isSingleScreen())
              return;
      
          QPlatformScreen *currentScreen = screen();
          const QWindowsScreen *newScreen =
              QWindowsContext::instance()->screenManager().screenForHwnd(m_data.hwnd);
          if (newScreen == nullptr || newScreen == currentScreen)
              return;
          // For screens with different DPI: postpone until WM_DPICHANGE
          if (mode == FromGeometryChange
           *   && !equalDpi(currentScreen->logicalDpi(), newScreen->logicalDpi())) { // the error happend here*
              return;
          }
          qCDebug(lcQpaWindows).noquote().nospace() << __FUNCTION__
              << ' ' << window() << " \"" << currentScreen->name()
              << "\"->\"" << newScreen->name() << '"';
          if (mode == FromGeometryChange)
              setFlag(SynchronousGeometryChangeEvent);
          updateFullFrameMargins();
          QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->screen());
      }
      

      the stack

      qwindows!QWindowsWindow::checkForScreenChanged
      1884
      c:\users\qt\work\qt\qtbase\src\plugins\platforms\windows\qwindowswindow.cpp
      qwindows!QWindowsWindow::handleGeometryChange
      1917
      c:\users\qt\work\qt\qtbase\src\plugins\platforms\windows\qwindowswindow.cpp
      qwindows!QWindowsContext::windowsProc
      1217
      c:\users\qt\work\qt\qtbase\src\plugins\platforms\windows\qwindowscontext.cpp
      qwindows!qWindowsWndProc
      1594
      c:\users\qt\work\qt\qtbase\src\plugins\platforms\windows\qwindowscontext.cpp
      USER32!UserCallWinProcCheckWow
      USER32!SendMessageWorker
      USER32!RealDefWindowProcWorker
      USER32!RealDefWindowProcW
      UxTheme!_ThemeDefWindowProc
      1096
      shell\themes\uxtheme\sethook.cpp
      UxTheme!ThemeDefWindowProcW
      1110
      shell\themes\uxtheme\sethook.cpp
      USER32!DefWindowProcW
      qwindows!qWindowsWndProc
      1603
      c:\users\qt\work\qt\qtbase\src\plugins\platforms\windows\qwindowscontext.cpp
      USER32!UserCallWinProcCheckWow
      USER32!DispatchClientMessage
      USER32!_fnINLPWINDOWPOS
      ntdll!KiUserCallbackDispatcherContinue
      win32u!NtUserPeekMessage
      USER32!_PeekMessage
      USER32!PeekMessageW
      Qt5Core!QEventDispatcherWin32::processEvents
      587
      c:\users\qt\work\qt\qtbase\src\corelib\kernel\qeventdispatcher_win.cpp
      qwindows!QWindowsGuiEventDispatcher::processEvents
      75
      c:\users\qt\work\qt\qtbase\src\platformsupport\eventdispatchers\qwindowsguieventdispatcher.cpp
      Qt5Core!QEventLoop::processEvents
      138
      c:\users\qt\work\qt\qtbase\src\corelib\kernel\qeventloop.cpp
      Qt5Core!QEventLoop::exec
      225
      c:\users\qt\work\qt\qtbase\src\corelib\kernel\qeventloop.cpp
      Qt5Core!QCoreApplication::exec
      1403
      c:\users\qt\work\qt\qtbase\src\corelib\kernel\qcoreapplication.cpp
      eyeblink!main
      172
      c:\git\eyeblink\sources\main.cpp
      eyeblink!WinMain
      97
      c:\users\qt\work\qt\qtbase\src\winmain\qtmain_win.cpp
      eyeblink!invoke_main
      102
      f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl
      eyeblink!__scrt_common_main_seh
      288
      f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl
      KERNEL32!BaseThreadInitThunk
      ntdll!RtlUserThreadStart
      

        Attachments

          Issue Links

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

            Activity

              People

              • Assignee:
                kleint Friedemann Kleint
                Reporter:
                fogelton fogelton
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes