Details
-
Bug
-
Resolution: Out of scope
-
P1: Critical
-
None
-
6.2.5, 6.3.1, 6.4.0 Beta2
Description
Example Code
#include <qmfcapp.h> #include <windows.h> #include <QTableView> #include <QFileSystemModel> BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpvReserved*/ ) { static bool ownApplication = FALSE; if ( dwReason == DLL_PROCESS_ATTACH ) ownApplication = QMfcApp::pluginInstance( hInstance ); if ( dwReason == DLL_PROCESS_DETACH && ownApplication ) delete qApp; return TRUE; } extern "C" __declspec(dllexport) bool showDialog( HWND parent ) { Q_UNUSED(parent) auto model = new QFileSystemModel; model->setRootPath("C:/"); auto tableView = new QTableView; tableView->setModel(model); tableView->setWindowTitle("Freezing Header Example"); tableView->resize(640, 480); tableView->show(); return TRUE; }
Steps to reproduce
- Check out https://codereview.qt-project.org/c/qt-solutions/qt-solutions/+/427169 to enable Qt 6 builds
- Replace qtwinmigrate/examples/qtdll/main.cpp [1] with the example above (e.g. by applying qtbug-105719-example.diff)
- Build qtwinmigrate and its examples with Qt 6.2.4 or newer (cd qtwinmigrate && configure.bat && qmake && nmake)
- Run windeployqt.exe on qtwinmigrate/examples/qtdll/release/qtdialog.dll
- Open qtwinmigrate/examples/mfc/step1/QtMfc.dsp [2] in Visual Studio and build it
- Move QtMfc.exe to qtwinmigrate/examples/qtdll/release/ and run it
- Click "Help" > "About QtMfc..." to launch the QTableView
- Keep resizing the column header
After doing the final step for a short while, the application will hang and one CPU core will run at 100% (see attached animation)
[1] https://github.com/qtproject/qt-solutions/tree/master/qtwinmigrate/examples/qtdll
[2] https://github.com/qtproject/qt-solutions/tree/master/qtwinmigrate/examples/mfc/step1
Notes
- Qt 6.2.3 does not have this issue. Reverting https://codereview.qt-project.org/c/qt/qtbase/+/387409 makes the issue disappear (tested on Qt 6.2.4)
- Resizing QTreeView's header does not seem to cause this issue
Attachments
Issue Links
- resulted from
-
QTBUG-99323 [REG: 5.14.2 -> 5.15.0] Posted events get stuck when QCoreApplication::processEvents with QEventLoop::WaitForMoreEvents is used
- Closed