Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.4, 4.8.0
-
MacOS X Lion 10.7.3 on a MacBook Air / Qt SDK version 1.2
-
-
6c564607770479173967b9a74926cbe1c4bc109e
Description
When using a menu 'computed' through aboutToShow() the application crashes randomly later (not immediatly) when a dialog is show. It is not necessary to select an entry in the 'computed' menu, to show the menu is enough.
Typical stack when the crash occurs :
0 QAction::isVisible 0 0x1003e5474
1 QMenuBarPrivate::macUpdateMenuBarImmediatly 0 0x1003d06f4
2 -[NSObject performSelector:] 0 0x7fff8aebe021
3 -[NSApplication(QApplicationIntegration) qt_sendPostedMessage:] 0 0x10039cad5
4 -[NSApplication(QApplicationIntegration) qt_filterEvent:] 0 0x10039c890
5 -[QNSApplication sendEvent:] 0 0x10039c94d
6 -[NSApplication _realDoModalLoop:peek:] 0 0x7fff89b7c3ff
7 -[NSApplication runModalSession:] 0 0x7fff89b75bb4
8 QEventDispatcherMac::processEvents 0 0x1003a75be
9 QEventLoop::processEvents 0 0x101309664
10 QEventLoop::exec 0 0x101309a14
11 QDialog::exec 0 0x10088eae5
12 UmlWindow::about UmlWindow.cpp 61 0x100002eee
13 UmlWindow::qt_static_metacall moc_UmlWindow.cpp 59 0x100005639
14 QMetaObject::activate 0 0x1013221fe
15 QAction::activated 0 0x1003e54e0
16 QAction::activate 0 0x1003e692b
17 -[QCocoaMenuLoader qtDispatcherToQAction:] 0 0x10039bd5a
18 -[NSObject performSelector:withObject:] 0 0x7fff8aeb675d
19 -[NSApplication sendAction:to:from:] 0 0x7fff899cacb2
20 -[NSMenuItem _corePerformAction] 0 0x7fff89ab7fe7
... <plus>
The problem is always in QAction::isVisible called by QMenuBarPrivate::macUpdateMenuBarImmediatly.
Unfortunately valgrind goes on error when it loads a QT application on MacOS, so can't have its help.
I attached a small application producing easily the crashes, this problem only occurs on mac (QMenuBarPrivate::macUpdateMenuBarImmediatly of course only exist on mac ), I don't have a similar problem under Windows Seven nor Linux Ubuntu / Debian /CentOS.
To reproduce the crash execute the small application then ask for to show at least one time the menu 'project', then ask for the 'about qt' or 'about bugmac' in the menu 'bugmac' or 'new' in the menu 'project', after few times the crash occurs.
Let's not also the first time the menu 'project' is shown the entry 'quit' is missing, it appears the next times.
Thank you, don't hesitate to contact me if you need