Crash when disabling action of first menubar item



  • When adding a QAction to the first menu in the menubar, and disable the action using setDisabled(true) / setDisabled(false), the app crashes.

    EDIT: I am on Mac OS X 10.9, Qt 5.3.1.

    Backtrace:

    @Process 23018 launched: 'test' (x86_64)
    Process 23018 stopped

    • thread #1: tid = 0xa80cd, 0x00007fff72f06f30 AppKitNSRegion, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x7fff72f06f30) frame #0: 0x00007fff72f06f30 AppKitNSRegion
      AppKit`NSRegion:
      -> 0x7fff72f06f30: cmpb %bh, 0x45(%rax)
      0x7fff72f06f33: jne 0x7fff72f06f34 ; (void *)0x7545783800007fff
      0x7fff72f06f35: jg 0x7fff72f06f37 ; (void *)0x007fff7545783800
      0x7fff72f06f37: addb %bh, (%rax)
      (lldb) bt
    • thread #1: tid = 0xa80cd, 0x00007fff72f06f30 AppKit`NSRegion, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x7fff72f06f30)
      • frame #0: 0x00007fff72f06f30 AppKitNSRegion frame #1: 0x0000000100ca92fc QtCoreQMetaObject::cast(QObject*) const + 28
        frame #2: 0x0000000103e259fe libqcocoa.dylibQtPrivate::QVariantValueHelper<QObject*>::object(QVariant const&) + 94 frame #3: 0x0000000103e26307 libqcocoa.dylibQCocoaMenuItem::sync() + 631
        frame #4: 0x0000000103e247c3 libqcocoa.dylibQCocoaMenu::syncMenuItem(QPlatformMenuItem*) + 275 frame #5: 0x0000000101205bfa QtWidgetsQMenu::actionEvent(QActionEvent*) + 794
        frame #6: 0x00000001010dce60 QtWidgetsQWidget::event(QEvent*) + 1024 frame #7: 0x0000000101203e46 QtWidgetsQMenu::event(QEvent*) + 950
        frame #8: 0x00000001010a24ec QtWidgetsQApplicationPrivate::notify_helper(QObject*, QEvent*) + 252 frame #9: 0x00000001010a58ca QtWidgetsQApplication::notify(QObject*, QEvent*) + 8490
        frame #10: 0x0000000100ca3423 QtCoreQCoreApplication::notifyInternal(QObject*, QEvent*) + 115 frame #11: 0x0000000101097ed1 QtWidgetsQActionPrivate::sendDataChanged() + 113
        frame #12: 0x000000010109a182 QtWidgets`QAction::setEnabled(bool) + 194@


  • Is it simple app generated by a wizard or it is part of large app?
    A piece of source code may help to identify a problem.



  • No, it is handcoded and it is a large app, so I cannot share the exact code. But I will try to compile a simple example.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.