[Differential] [Request, 10 lines] D4631: Fix crash when switching activities.

Eike Hein noreply at phabricator.kde.org
Thu Feb 16 12:54:09 UTC 2017


hein created this revision.
hein added reviewers: Plasma, davidedmundson.
hein added a subscriber: plasma-devel.
Restricted Application added a project: Plasma.

REVISION SUMMARY
  What happens:
  
  - Activity switch calls invalidateFilter on TaskFilterProxyModel, which may remove rows in response.
  - Up the proxy chain, TasksModel may ask LauncherTasksModel to emit dataChanged for its contents in response to the row removal, to cause its own filtering to re-evaluate the launchers for the life cycle logic.
  - This can cause TFPM to do more filtering before invalidateFilter has actually returned, causing trip-ups such as duplicated rows in the proxy.
  - Eventually the corrupted maps cause a memory corruption crash.
  
  This patch changes step 2 to "find the launchers in the TFPM (the
  direct source model) and ask for a dataChanged for each". This
  costs us a loop and accesses to IsLauncher, but on the other hand
  fixes the crash and avoids a lot of filtering and mapping work
  between LTM and up to and including TFPM. It's also just better
  code to ask for the dataChanged only from the model we need it
  from.
  
  BUG:376055

REPOSITORY
  R120 Plasma Workspace

BRANCH
  Plasma/5.8

REVISION DETAIL
  https://phabricator.kde.org/D4631

AFFECTED FILES
  libtaskmanager/tasksmodel.cpp

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: hein, #plasma, davidedmundson
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170216/60f64a7f/attachment.html>


More information about the Plasma-devel mailing list