Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.6.2, 4.6.3, 5.0.0
-
None
-
Microsoft Windows XP SP3, 32-bit; Microsoft Visual C++ 2008 Express Edition
Red Hat Enterprise Linux 5, 64-bit; GNU GCC 4.1.2
-
8ea60a39a8c4661db505a6dc1342e524ec2e460c
Description
How to reproduce:
1. Build and run the following program
main.cpp
#include <QtGui/QApplication> #include <QtGui/QMenuBar> #include <QtGui/QAction> int main( int argc, char *argv[] ) { QApplication app( argc, argv ); QMenuBar mb; QMenu * m = mb.addMenu ( "&m" ); QAction * a = mb.addAction( "&a" ); a->setVisible( false ); mb.show(); return app.exec(); }
2. Activate its "m" menu item and press Right.
In the debug build, there's an assert:
Windows assert message box
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Error!
Program: ...\debug\main.exe
Module: 4.6.2
File: global\qglobal.cpp
Line: 2230
ASSERT failure in QList<T>::at: "index out of range", file ...\qt-everywhere-opensource-src-4.6.2\include\qtcore\../../src/corelib/tools/qlist.h, line 439
(Press Retry to debug the application)
---------------------------
Abort Retry Ignore
---------------------------
The real-life, release-built application crashes immediately.