Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Crash when disabling action of first menubar item
Forum Updated to NodeBB v4.3 + New Features

Crash when disabling action of first menubar item

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 857 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    user2970139
    wrote on last edited by
    #1

    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@
    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • U Offline
        U Offline
        user2970139
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved