You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WeakOutput::is_alive() simply checks if the strong count is 0. In cosmic-comp I seem to be seeing an issue with it. Perhaps a strong reference is being held somewhere it shouldn't, either in Smithay or cosmic-comp.
Careful use of WeakOutput should avoid that, but I wonder if it would also be a good idea to explicitly track if the output is valid, instead of relying on reference count.
A compositor can set a compare callback that has an additional check to see if the old Output is still valid. But default_primary_scanout_output_compare won't do that. So this may be causing issues for any Smithay compositors that don't have a custom callback with some check for old removed/disabled outputs.
The text was updated successfully, but these errors were encountered:
ids1024
added a commit
to pop-os/cosmic-comp
that referenced
this issue
Nov 13, 2024
`Output` in Smithay doesn't track if the output still exists, other than
based on whether or not it has strong references. Which doesn't seem to
be working correctly.
There may be leaked strong references to `Output`s somewhere, and maybe
Smithay should track if an output is still valid, generally when it is
exposed as a Wayland global
(Smithay/smithay#1584). But a check like this
works for now.
Addresses #985.
`Output` in Smithay doesn't track if the output still exists, other than
based on whether or not it has strong references. Which doesn't seem to
be working correctly.
There may be leaked strong references to `Output`s somewhere, and maybe
Smithay should track if an output is still valid, generally when it is
exposed as a Wayland global
(Smithay/smithay#1584). But a check like this
works for now.
Addresses #985.
smithay/src/backend/renderer/element/mod.rs
Lines 194 to 197 in 28417d2
WeakOutput::is_alive()
simply checks if the strong count is0
. Incosmic-comp
I seem to be seeing an issue with it. Perhaps a strong reference is being held somewhere it shouldn't, either in Smithay or cosmic-comp.Careful use of
WeakOutput
should avoid that, but I wonder if it would also be a good idea to explicitly track if the output is valid, instead of relying on reference count.A compositor can set a
compare
callback that has an additional check to see if the oldOutput
is still valid. Butdefault_primary_scanout_output_compare
won't do that. So this may be causing issues for any Smithay compositors that don't have a custom callback with some check for old removed/disabled outputs.The text was updated successfully, but these errors were encountered: