Fixes raster masks not being properly released#21243
Open
masterpiga wants to merge 1 commit into
Open
Conversation
Collaborator
|
Thanks
|
Collaborator
Author
Makes sense, I undid the changes to the public api. |
Member
|
I tend for waiting for 5.8 to stay safe for the release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
is_raster_mask_used()only ever checked the table membership — never whether the consumer is deleted, de-synced, in raster mode, or even enabled — so a disabled consumer could keep the producer publishing and invalidating all downstream cachelines every run.The fix
dt_iop_prune_stale_raster_usersnow drops a registered consumer when any of these holds — all evaluated without ever dereferencing a freed pointer:sink.source != this→ de-synced!sink->enabled→ disabled!(mask_mode & DEVELOP_MASK_RASTER)→ not in raster modeThe approach is self-correcting: re-enable a previously disabled module (or switch it back to a raster mask) and
commit_blend_paramsre-registers it before the next prune, so a producer resumes publishing exactly when a real consumer needs it.Should it wait for 5.8 (or 5.6.1)?
@TurboGit @jenshannoschwalm you be the judge. Unless I overlooked something very obvious, it is a pretty inoffensive change that brings significant improvements.
Co-authored with Claude.