Eike Hein <> changed:

           What    |Removed                     |Added
      Latest Commit|                            |
                   |                            |sma-workspace/05826bd5ba25f
                   |                            |6ed7be94ff8d760d6c8372f148c
             Status|CONFIRMED                   |RESOLVED
         Resolution|---                         |FIXED

--- Comment #15 from Eike Hein <> ---
Git commit 05826bd5ba25f6ed7be94ff8d760d6c8372f148c by Eike Hein.
Committed on 16/02/2017 at 12:57.
Pushed by hein into branch 'Plasma/5.8'.

Fix crash when switching activities.

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

Reviewers: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:

M  +7    -3    libtaskmanager/tasksmodel.cpp

You are receiving this mail because:
You are watching all bug changes.

Reply via email to