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

Windows: Crash after calling DestroyWindow on a manually created window parented on a QWidget's hwnd.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.3.1
    • 5.2.0
    • QPA: Windows
    • None
    • Windows7, Windows8.1
      VS2010
    • 6ef8eee8d42485ce3e1f6ef3bd60413d4bad7ecd (14.5.2014 , stable, 5.3.1)

    Description

      1)Create a new window by Win32API (CreateWindowEx)
      2)After destroy the window by DestroyWindow, Qt App will be crashed:

      qwindowsd.dll!QWindowsWindow::testFlag(unsigned int f=8192) line 258 + 0xa byte C++
      qwindowsd.dll!QWindowsContext::windowsProc(HWND__ * hwnd=0x000c09d4, unsigned int message=2, QtWindows::WindowsEventType et=DestroyEvent, unsigned int wParam=0, long lParam=0, long * result=0x0026c560) line 798 + 0xd byte C++
      qwindowsd.dll!qWindowsWndProc(HWND__ * hwnd=0x000c09d4, unsigned int message=2, unsigned int wParam=0, long lParam=0) line 1097 + 0x24 byte C++

      because of null pointer access at
      qt-everywhere-opensource-src-5.3.0\qtbase\src\plugins\platforms\windows\qwindowscontext.cpp
      line 798
      if (!platformWindow->testFlag(QWindowsWindow::WithinDestroy)) {

      which code was added by Qt5.2.0.
      So Qt5.1.1 was no problem.

      Attachments

        1. MainWindow.h
          1.0 kB
        2. main.cpp
          0.2 kB
        3. qtbug39227.zip
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            akihiro miwa Akihiro Miwa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes