[plasmashell] [Bug 520065] plasmashell crashes in TaskManager::TaskGroupingProxyModel::Private::sourceDataChanged when switching activities with Pager in a panel

2026-05-15 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=520065

Nate Graham  changed:

   What|Removed |Added

Version||6.6.6
  Fixed/Implemented||
 In||

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

[plasmashell] [Bug 520065] plasmashell crashes in TaskManager::TaskGroupingProxyModel::Private::sourceDataChanged when switching activities with Pager in a panel

2026-05-14 Thread Marco Martin
https://bugs.kde.org/show_bug.cgi?id=520065

Marco Martin  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
  Latest Commit||https://invent.kde.org/plas
   ||ma/plasma-workspace/-/commi
   ||t/919a8a92a5c3437f6406a0970
   ||c548ecf7100e439

--- Comment #7 from Marco Martin  ---
Git commit 919a8a92a5c3437f6406a0970c548ecf7100e439 by Marco Martin.
Committed on 14/05/2026 at 12:14.
Pushed by mart into branch 'master'.

Libtaskmanager: invalidate filter on source row insertion

When a source row is inserted, is possible it's a row we have either
a launcher or a startup entry existing, which will now need to be
filtered out. previously it was emitting dataChanged on the source
launcher or startup task, causing then a reevaluation of the filter.
But since we still were in the rowsInserted handler, the state
might have not been settled yet, so
TaskManager::TaskGroupingProxyModel::Private::sourceDataChanged
could find itself with an invalid source index, triggering an assert.

Instead simply call invalidateFilter, which will cause all the
filterAcceptsRow to be called again at the right moment.
It is a bit more inefficient as the row iteration will be done for
each entry instead of only as many times as there are new rows,
but should be much safer.

### Test plan

launch an app, the startup task should still change immediately to
the "real" one as soon the window appears without the task being
duplicated for a split second. same thing when starting a task from a
launcher.

### Bugs fixed

M  +4-33   libtaskmanager/tasksmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/919a8a92a5c3437f6406a0970c548ecf7100e439

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

[plasmashell] [Bug 520065] plasmashell crashes in TaskManager::TaskGroupingProxyModel::Private::sourceDataChanged when switching activities with Pager in a panel

2026-05-14 Thread Marco Martin
https://bugs.kde.org/show_bug.cgi?id=520065

Marco Martin  changed:

   What|Removed |Added

  Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
   |ma/plasma-workspace/-/commi |ma/plasma-workspace/-/commi
   |t/ddc45b08e9a536e36933292f0 |t/1b4a83f48bff48a64166f2152
   |e68f8e495b64668 |8675bd7455fc539

--- Comment #9 from Marco Martin  ---
Git commit 1b4a83f48bff48a64166f21528675bd7455fc539 by Marco Martin.
Committed on 14/05/2026 at 12:15.
Pushed by mart into branch 'Plasma/6.6'.

Libtaskmanager: invalidate filter on source row insertion

When a source row is inserted, is possible it's a row we have either
a launcher or a startup entry existing, which will now need to be
filtered out. previously it was emitting dataChanged on the source
launcher or startup task, causing then a reevaluation of the filter.
But since we still were in the rowsInserted handler, the state
might have not been settled yet, so
TaskManager::TaskGroupingProxyModel::Private::sourceDataChanged
could find itself with an invalid source index, triggering an assert.

Instead simply call invalidateFilter, which will cause all the
filterAcceptsRow to be called again at the right moment.
It is a bit more inefficient as the row iteration will be done for
each entry instead of only as many times as there are new rows,
but should be much safer.

### Test plan

launch an app, the startup task should still change immediately to
the "real" one as soon the window appears without the task being
duplicated for a split second. same thing when starting a task from a
launcher.

### Bugs fixed


(cherry picked from commit 919a8a92a5c3437f6406a0970c548ecf7100e439)

61c20099 Libtaskmanager: invalidate filter on source row insertion

Co-authored-by: Marco Martin 

M  +4-33   libtaskmanager/tasksmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/1b4a83f48bff48a64166f21528675bd7455fc539

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

[plasmashell] [Bug 520065] plasmashell crashes in TaskManager::TaskGroupingProxyModel::Private::sourceDataChanged when switching activities with Pager in a panel

2026-05-14 Thread Marco Martin
https://bugs.kde.org/show_bug.cgi?id=520065

Marco Martin  changed:

   What|Removed |Added

  Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
   |ma/plasma-workspace/-/commi |ma/plasma-workspace/-/commi
   |t/919a8a92a5c3437f6406a0970 |t/ddc45b08e9a536e36933292f0
   |c548ecf7100e439 |e68f8e495b64668

--- Comment #8 from Marco Martin  ---
Git commit ddc45b08e9a536e36933292f0e68f8e495b64668 by Marco Martin.
Committed on 14/05/2026 at 12:14.
Pushed by mart into branch 'Plasma/6.7'.

Libtaskmanager: invalidate filter on source row insertion

When a source row is inserted, is possible it's a row we have either
a launcher or a startup entry existing, which will now need to be
filtered out. previously it was emitting dataChanged on the source
launcher or startup task, causing then a reevaluation of the filter.
But since we still were in the rowsInserted handler, the state
might have not been settled yet, so
TaskManager::TaskGroupingProxyModel::Private::sourceDataChanged
could find itself with an invalid source index, triggering an assert.

Instead simply call invalidateFilter, which will cause all the
filterAcceptsRow to be called again at the right moment.
It is a bit more inefficient as the row iteration will be done for
each entry instead of only as many times as there are new rows,
but should be much safer.

### Test plan

launch an app, the startup task should still change immediately to
the "real" one as soon the window appears without the task being
duplicated for a split second. same thing when starting a task from a
launcher.

### Bugs fixed


(cherry picked from commit 919a8a92a5c3437f6406a0970c548ecf7100e439)

61c20099 Libtaskmanager: invalidate filter on source row insertion

Co-authored-by: Marco Martin 

M  +4-33   libtaskmanager/tasksmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/ddc45b08e9a536e36933292f0e68f8e495b64668

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

[plasmashell] [Bug 520065] plasmashell crashes in TaskManager::TaskGroupingProxyModel::Private::sourceDataChanged when switching activities with Pager in a panel

2026-05-13 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=520065

Nate Graham  changed:

   What|Removed |Added

 CC||[email protected]

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

[plasmashell] [Bug 520065] plasmashell crashes in TaskManager::TaskGroupingProxyModel::Private::sourceDataChanged when switching activities with Pager in a panel

2026-05-13 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=520065

Bug Janitor Service  changed:

   What|Removed |Added

 Status|CONFIRMED   |ASSIGNED

--- Comment #6 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6581

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

[plasmashell] [Bug 520065] plasmashell crashes in TaskManager::TaskGroupingProxyModel::Private::sourceDataChanged when switching activities with Pager in a panel

2026-05-13 Thread David Edmundson
https://bugs.kde.org/show_bug.cgi?id=520065

--- Comment #5 from David Edmundson  ---
>probably.. we could also check on that side whether the index is valid

See be417b4d3d0f5e6eb3c9c0f492aa031bc0d2d4d8 which I think is the crash fix.


I put the debug in to work out why we got a dataChanged from an index we
couldn't map, which starts to make sense if we're in some re-entrant situation.

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

[plasmashell] [Bug 520065] plasmashell crashes in TaskManager::TaskGroupingProxyModel::Private::sourceDataChanged when switching activities with Pager in a panel

2026-05-13 Thread Marco Martin
https://bugs.kde.org/show_bug.cgi?id=520065

Marco Martin  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #4 from Marco Martin  ---
(In reply to David Edmundson from comment #3)
> It's super weird for a model to be emitting dataChanged for source model in
> a tree.

So, if i understand correctly, is 
* groupingProxyModel has filterProxyModel as its source
* groupingProxyModel has a new row inserted
* if the new row is a startup or a launcher, searcg it in the... source model
and emits a datachanged there?

> We probably could just turn my assert into a comment explaining what's
> happening.

probably.. we could also check on that side whether the index is valid

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

[plasmashell] [Bug 520065] plasmashell crashes in TaskManager::TaskGroupingProxyModel::Private::sourceDataChanged when switching activities with Pager in a panel

2026-05-13 Thread David Edmundson
https://bugs.kde.org/show_bug.cgi?id=520065

David Edmundson  changed:

   What|Removed |Added

 CC||[email protected]
 Status|REPORTED|CONFIRMED
 Ever confirmed|0   |1

--- Comment #3 from David Edmundson  ---
It's an assert rather than a crash, I have no idea why Neon builds with asserts
on for non-developer setups.

The good news is we used to have a crash there and at least we finally found
out what's causing it.

tasksmodel.cpp:290

QObject::connect(groupingProxyModel, &QAbstractItemModel::rowsInserted, q,
[this](const QModelIndex &parent, int first, int last) {

ends up calling Q_EMIT
filterProxyModel->dataChanged(filterIndex, filterIndex);

but we're still inside the groupingProxyModel::rowsInserted so our state isn't
settled.

It's super weird for a model to be emitting dataChanged for source model in a
tree.


---

We probably could just turn my assert into a comment explaining what's
happening.

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

[plasmashell] [Bug 520065] plasmashell crashes in TaskManager::TaskGroupingProxyModel::Private::sourceDataChanged when switching activities with Pager in a panel

2026-05-12 Thread TraceyC
https://bugs.kde.org/show_bug.cgi?id=520065

TraceyC  changed:

   What|Removed |Added

 CC||[email protected]
Summary|plasmashell crashes when|plasmashell crashes in
   |switching activities|TaskManager::TaskGroupingPr
   ||oxyModel::Private::sourceDa
   ||taChanged  when switching
   ||activities with Pager in a
   ||panel

--- Comment #2 from TraceyC  ---
I'm not able to reproduce this in Plasma built from git-master or Plasma 6.6.4
on Solus.

- Laptop connected to an external monitor, making 2 displays active
- Panel with a pager widget and other widgets on the laptop
- Default panel on the monitor, which also has a pager widget

I'll leave this open so others can try to reproduce

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