This may or may not be useful. I set the breakpoint at menuAboutToHide(). One is with just invoking the zone menu and the letting it go away. The other is with invoking the zone menu and selecting an option.
[UPDATE: I also had a breakpoint set at ZoneContextMenuInteraction::menuItemTriggered, but it was not hit before menuAboutToHide(). I also set one on QtSignalForwarder::handleSignal() just to verify the logic flow but that was not called first either. It was called *after* menuAboutToHide().
Code: Select all
Menu call without selection:
Breakpoint 1, ZoneContextMenuInteraction::menuAboutToHide (this=0x25b4c50) at /usr/local/src/scantailor/scantailor-9224b0d/zones/ZoneContextMenuInteraction.cpp:193
193 if (m_menuItemTriggered) {
(gdb) n
197 InteractionHandler* next_handler = m_rContext.createDefaultInteraction();
(gdb)
198 if (next_handler) {
(gdb)
199 makePeerPreceeder(*next_handler);
(gdb)
202 unlink();
(gdb)
203 m_rContext.imageView().update();
(gdb)
204 deleteLater();
(gdb)
205 }
(gdb)
ZoneContextMenuInteraction::qt_metacall (this=0x25b4c50, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x25e8390) at ZoneContextMenuInteraction.h.moc:81
81 _id -= 2;
(gdb)
83 return _id;
(gdb)
84 }
(gdb)
0x01cfd799 in QMetaObject::metacall ()
(gdb)
Single stepping until exit from function _ZN11QMetaObject8metacallEP7QObjectNS_4CallEiPPv,
which has no line number information.
0x01e0bc85 in QMetaCallEvent::placeMetaCall ()
(gdb)
Single stepping until exit from function _ZN14QMetaCallEvent13placeMetaCallEP7QObject,
which has no line number information.
0x01e11fe6 in QObject::event ()
(gdb)
Single stepping until exit from function _ZN7QObject5eventEP6QEvent,
which has no line number information.
0x009bfac8 in QApplicationPrivate::notify_helper ()
(gdb)
Single stepping until exit from function _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent,
which has no line number information.
0x009c7af8 in QApplication::notify ()
(gdb)
Single stepping until exit from function _ZN12QApplication6notifyEP7QObjectP6QEvent,
which has no line number information.
0x01cf95fe in QCoreApplication::notifyInternal ()
(gdb)
Single stepping until exit from function _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent,
which has no line number information.
0x01cfba81 in QCoreApplication::sendEvent ()
(gdb)
Single stepping until exit from function _ZN16QCoreApplication9sendEventEP7QObjectP6QEvent,
which has no line number information.
0x01dfde07 in QCoreApplicationPrivate::sendPostedEvents ()
(gdb)
Single stepping until exit from function _ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData,
which has no line number information.
0x0094fe88 in processPostedEvents ()
(gdb)
Single stepping until exit from function _Z19processPostedEventsP26QEventDispatcherMacPrivateb,
which has no line number information.
0x0094fed7 in QEventDispatcherMacPrivate::postedEventsSourcePerformCallback ()
(gdb)
Single stepping until exit from function _ZN26QEventDispatcherMacPrivate33postedEventsSourcePerformCallbackEPv,
which has no line number information.
0x972154cb in __CFRunLoopDoSources0 ()
(gdb)
Single stepping until exit from function __CFRunLoopDoSources0,
which has no line number information.
0x97212f8f in __CFRunLoopRun ()
(gdb)
Single stepping until exit from function __CFRunLoopRun,
which has no line number information.
0x97212464 in CFRunLoopRunSpecific ()
(gdb)
Single stepping until exit from function CFRunLoopRunSpecific,
which has no line number information.
0x97212291 in CFRunLoopRunInMode ()
(gdb)
Single stepping until exit from function CFRunLoopRunInMode,
which has no line number information.
0x90d5ff58 in RunCurrentEventLoopInMode ()
(gdb)
Single stepping until exit from function RunCurrentEventLoopInMode,
which has no line number information.
0x90d5fc4b in ReceiveNextEventCommon ()
(gdb)
Single stepping until exit from function ReceiveNextEventCommon,
which has no line number information.
0x90ee81ed in ReceiveNextEvent ()
(gdb)
Single stepping until exit from function ReceiveNextEvent,
which has no line number information.
0x00951c01 in QEventDispatcherMac::processEvents ()
(gdb)
Single stepping until exit from function _ZN19QEventDispatcherMac13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE,
which has no line number information.
0x01dfaa6e in QEventLoop::processEvents ()
(gdb)
Single stepping until exit from function _ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE,
which has no line number information.
0x01dfacf8 in QEventLoop::exec ()
(gdb)
Single stepping until exit from function _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE,
which has no line number information.
0x00eefd86 in QMenuPrivate::hideUpToMenuBar ()
(gdb)
Single stepping until exit from function _ZN12QMenuPrivate15hideUpToMenuBarEv,
which has no line number information.
0x00ef3077 in QMenu::mousePressEvent ()
(gdb)
Single stepping until exit from function _ZN5QMenu15mousePressEventEP11QMouseEvent,
which has no line number information.
0x00a33d89 in QWidget::event ()
(gdb)
Single stepping until exit from function _ZN7QWidget5eventEP6QEvent,
which has no line number information.
0x00eef765 in QMenu::event ()
(gdb)
Single stepping until exit from function _ZN5QMenu5eventEP6QEvent,
which has no line number information.
0x009bfac8 in QApplicationPrivate::notify_helper ()
(gdb)
Single stepping until exit from function _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent,
which has no line number information.
0x009c88be in QApplication::notify ()
(gdb)
Single stepping until exit from function _ZN12QApplication6notifyEP7QObjectP6QEvent,
which has no line number information.
0x01cf95fe in QCoreApplication::notifyInternal ()
(gdb)
Single stepping until exit from function _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent,
which has no line number information.
0x0093755f in QCoreApplication::sendSpontaneousEvent ()
(gdb)
Single stepping until exit from function _ZN16QCoreApplication20sendSpontaneousEventEP7QObjectP6QEvent,
which has no line number information.
0x00935c65 in QApplicationPrivate::globalEventProcessor ()
(gdb)
Single stepping until exit from function _ZN19QApplicationPrivate20globalEventProcessorEP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv,
which has no line number information.
0x90d32eef in DispatchEventToHandlers ()
(gdb)
Single stepping until exit from function _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec,
which has no line number information.
0x90d321b6 in SendEventToEventTargetInternal ()
(gdb)
Single stepping until exit from function _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec,
which has no line number information.
0x90d5497b in SendEventToEventTarget ()
(gdb)
Single stepping until exit from function SendEventToEventTarget,
which has no line number information.
0x0094808c in QWidgetPrivate::qt_window_event ()
(gdb)
Single stepping until exit from function _ZN14QWidgetPrivate15qt_window_eventEP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv,
which has no line number information.
0x90d32eef in DispatchEventToHandlers ()
(gdb)
Single stepping until exit from function _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec,
which has no line number information.
0x90d321b6 in SendEventToEventTargetInternal ()
(gdb)
Single stepping until exit from function _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec,
which has no line number information.
0x90d5497b in SendEventToEventTarget ()
(gdb)
Single stepping until exit from function SendEventToEventTarget,
which has no line number information.
0x90d66497 in ToolboxEventDispatcherHandler ()
(gdb)
Single stepping until exit from function _ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv,
which has no line number information.
0x90d33340 in DispatchEventToHandlers ()
(gdb)
Single stepping until exit from function _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec,
which has no line number information.
0x90d321b6 in SendEventToEventTargetInternal ()
(gdb)
Single stepping until exit from function _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec,
which has no line number information.
0x90d5497b in SendEventToEventTarget ()
(gdb)
Single stepping until exit from function SendEventToEventTarget,
which has no line number information.
0x0094fd49 in qt_mac_send_event ()
(gdb)
Single stepping until exit from function _Z17qt_mac_send_event6QFlagsIN10QEventLoop17ProcessEventsFlagEEP14OpaqueEventRefP15OpaqueWindowPtr,
which has no line number information.
0x00951cd0 in QEventDispatcherMac::processEvents ()
(gdb)
Single stepping until exit from function _ZN19QEventDispatcherMac13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE,
which has no line number information.
0x01dfaa6e in QEventLoop::processEvents ()
(gdb)
Single stepping until exit from function _ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE,
which has no line number information.
0x01dfacf8 in QEventLoop::exec ()
(gdb)
Single stepping until exit from function _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE,
which has no line number information.
Code: Select all
Menu called with selection:
Breakpoint 1, ZoneContextMenuInteraction::menuAboutToHide (this=0x19a15670) at /usr/local/src/scantailor/scantailor-9224b0d/zones/ZoneContextMenuInteraction.cpp:193
193 if (m_menuItemTriggered) {
(gdb) n
197 InteractionHandler* next_handler = m_rContext.createDefaultInteraction();
(gdb)
198 if (next_handler) {
(gdb)
199 makePeerPreceeder(*next_handler);
(gdb)
202 unlink();
(gdb)
203 m_rContext.imageView().update();
(gdb)
204 deleteLater();
(gdb)
205 }
(gdb)
ZoneContextMenuInteraction::qt_metacall (this=0x19a15670, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x25e3a50) at ZoneContextMenuInteraction.h.moc:81
81 _id -= 2;
(gdb)
83 return _id;
(gdb)
84 }
(gdb)
0x01cfd799 in QMetaObject::metacall ()
(gdb)
Single stepping until exit from function _ZN11QMetaObject8metacallEP7QObjectNS_4CallEiPPv,
which has no line number information.
0x01e0bc85 in QMetaCallEvent::placeMetaCall ()
(gdb)
Single stepping until exit from function _ZN14QMetaCallEvent13placeMetaCallEP7QObject,
which has no line number information.
0x01e11fe6 in QObject::event ()
(gdb)
Single stepping until exit from function _ZN7QObject5eventEP6QEvent,
which has no line number information.
0x009bfac8 in QApplicationPrivate::notify_helper ()
(gdb)
Single stepping until exit from function _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent,
which has no line number information.
0x009c7af8 in QApplication::notify ()
(gdb)
Single stepping until exit from function _ZN12QApplication6notifyEP7QObjectP6QEvent,
which has no line number information.
0x01cf95fe in QCoreApplication::notifyInternal ()
(gdb)
Single stepping until exit from function _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent,
which has no line number information.
0x01cfba81 in QCoreApplication::sendEvent ()
(gdb)
Single stepping until exit from function _ZN16QCoreApplication9sendEventEP7QObjectP6QEvent,
which has no line number information.
0x01dfde07 in QCoreApplicationPrivate::sendPostedEvents ()
(gdb)
Single stepping until exit from function _ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData,
which has no line number information.
0x0094fe88 in processPostedEvents ()
(gdb)
Single stepping until exit from function _Z19processPostedEventsP26QEventDispatcherMacPrivateb,
which has no line number information.
0x0094fed7 in QEventDispatcherMacPrivate::postedEventsSourcePerformCallback ()
(gdb)
Single stepping until exit from function _ZN26QEventDispatcherMacPrivate33postedEventsSourcePerformCallbackEPv,
which has no line number information.
0x972154cb in __CFRunLoopDoSources0 ()
(gdb)
Single stepping until exit from function __CFRunLoopDoSources0,
which has no line number information.
0x97212f8f in __CFRunLoopRun ()
(gdb)
Single stepping until exit from function __CFRunLoopRun,
which has no line number information.
0x97212464 in CFRunLoopRunSpecific ()
(gdb)
Single stepping until exit from function CFRunLoopRunSpecific,
which has no line number information.
0x97212291 in CFRunLoopRunInMode ()
(gdb)
Single stepping until exit from function CFRunLoopRunInMode,
which has no line number information.
0x90d5ff58 in RunCurrentEventLoopInMode ()
(gdb)
Single stepping until exit from function RunCurrentEventLoopInMode,
which has no line number information.
0x90d5fc4b in ReceiveNextEventCommon ()
(gdb)
Single stepping until exit from function ReceiveNextEventCommon,
which has no line number information.
0x90ee81ed in ReceiveNextEvent ()
(gdb)
Single stepping until exit from function ReceiveNextEvent,
which has no line number information.
0x00951c01 in QEventDispatcherMac::processEvents ()
(gdb)
Single stepping until exit from function _ZN19QEventDispatcherMac13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE,
which has no line number information.
0x01dfaa6e in QEventLoop::processEvents ()
(gdb)
Single stepping until exit from function _ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE,
which has no line number information.
0x01dfacf8 in QEventLoop::exec ()
(gdb)
Single stepping until exit from function _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE,
which has no line number information.
0x00eefd86 in QMenuPrivate::hideUpToMenuBar ()
(gdb)
Single stepping until exit from function _ZN12QMenuPrivate15hideUpToMenuBarEv,
which has no line number information.
0x00eeff0b in QMenuPrivate::activateAction ()
(gdb)
Single stepping until exit from function _ZN12QMenuPrivate14activateActionEP7QActionNS0_11ActionEventEb,
which has no line number information.
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xffffffff
0xffffffff in ?? ()
(gdb)
- program continued normally -