Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[processing] Fix alg. postprocessing regression failing to add all but one output to the project #60624

Merged
merged 1 commit into from
Feb 16, 2025

Conversation

nirvn
Copy link
Contributor

@nirvn nirvn commented Feb 16, 2025

Description

This fixes a regression caused by #59850 whereas only one output is ever added into the currently open project.

The long story short here is that python garbage collects output layers who's ownership is transferred on this line:

owned_map_layer = context.temporaryLayerStore().takeMapLayer(layer)

A way to workaround this is to add the owned_map_layer to the added_layers array of tuple to avoid the layer being deleted.

@nyalldawson , @ptitjano , open to better alternatives if there are any, but we should definitively not ship 3.42 with that regression in.

@github-actions github-actions bot added this to the 3.42.0 milestone Feb 16, 2025
Copy link

github-actions bot commented Feb 16, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 9c8c74d)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 9c8c74d)

@agiudiceandrea
Copy link
Member

agiudiceandrea commented Feb 16, 2025

we should definitively not ship 3.42 with that regression in.

The PR #59850 has been backported to release-3_40, so the issue will occur also running the upcoming QGIS LTR 3.40.4.

I can confirm this PR fixes the issue.

@agiudiceandrea agiudiceandrea added Bug Either a bug report, or a bug fix. Let's hope for the latter! backport release-3_40 labels Feb 16, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
backport release-3_40 Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants