Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-9167

Crash in editor context menu

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Duplicate
    • Affects Version/s: Qt Creator 2.7.0, Qt Creator 2.8.0-beta
    • Fix Version/s: None
    • Component/s: Editors
    • Labels:
      None
    • Environment:
      Windows / Qt 5 (stable after 5.1 alpha,dev)/ Qt Creator Master,2.7.

      Description

      This crash occurred out of the blue sky with Qt Creator master/2.7/Qt 5:

      To reproduce:

      • Open some code file
      • Open context menu, hover over menu options without invoking any
      • Repeat several times, observe crash
        (if it doesn't occur, over over sth else, say files combo without changing anything).

      Discussion:

      When hovering over the menu items, QAccessibleMenuItems are created that are associated with the (persistent) action from Qt Creator's action manager whose 'owner' is the CppMenu, which is deleted after use.

      A few invocations of the menu later, one sees that the debug in QAccessibleMenuItem::owner() of that action still shows the long-gone menu from a previous invocation and then crashes.

      That of course raises the question, how did this ever work, keeping actions around and adding them to several menus being a common technique. Either sth in QAccessibleMenuItem is completely borked or some QObject::disconnect severes a connection to some destroyed signal that would remove the QAccessibleMenuItem, but I cannot see that.

      Any help welcome.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              davschul David Schulz
              Reporter:
              kleint Friedemann Kleint
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes