Ticket #455 (Fixed)Mon Jun 18 11:33:50 UTC 2018
FilterManager does not notice filtered task dying, so will reattach a filter to random new tasks
Reported by: | nemo (145) | Severity: | Major |
Part: | RISC OS: Module | Release: | |
Milestone: | Status | Fixed |
Details by nemo (145):
FilterManager ignores Service_WimpCloseDown, and so does not detach filters after their task has quit.
As the filter mechanism only uses undecorated 16bit task handles, such orphaned filters will match the next task to reuse that task index, so a filter will become attached to some random unintended task. eg, quitting ShareFS and running Paint causes this:
Filters should be permanently disabled once the targeted task shuts down, so that they are not called for unintended tasks, and so that a late DeRegisterFilter (issued after the targeted task quits) does not return an ‘Unknown filter’ error.
The event mask is not used for filter matching (when deregistering) so can be modified at will, so can already be used to disable a PostFilter. It would be trivial to add a simple test to the other filters to similarly ignore filters that are completely ‘masked’.
*Filters could list the task name of such filters as ‘Disabled’ to avoid confusion.
Changelog:
Modified by Sprow (202) Mon, January 20 2020 - 13:06:37 GMT
- Status changed from Open to Fixed
Fixed in Filter-0_29.