Skip to content

Editor: crash when closing adject tab #128

@diegoiast

Description

@diegoiast
  1. Open 3 tabs: empty, a file, empty (the file must belong to a project)
  2. Move to the 3rd tab (the empty file)
  3. Click the menu of the send tab, and close it

Code crashes here:

    auto watcher = new QFutureWatcher<CommandArgs>(menu);
    connect(watcher, &QFutureWatcher<CommandArgs>::finished, this, [=, this]() {
        followSymbolMenu->removeAction(loadingAction);
        delete loadingAction;
        auto res = watcher->result(); // <- here
        auto pluginManager = dynamic_cast<PluginManager *>(mdiServer->mdiHost);
        createSubFollowSymbolSubmenu(res, followSymbolMenu, pluginManager);
    });

Two cascading problems:

  1. A menu is triggered for when clicking the right mouse button of the tabs. This opens the popup for the qmdiClient, and then the menu of the tab content itself. (another bug)
  2. We request completions for the current word
  3. When it arrives, it is no longer valid, and we deference a pointer

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions