Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix(layertreeview): add checks on selectedModel to avoid segfault #59337

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Djedouas
Copy link
Member

@Djedouas Djedouas commented Nov 5, 2024

Description

Fixes #59329

QGIS crashes when executing this line (and other from the same family) in the Python console:

QgsLayerTreeView().selectedLayers()

Fixes qgis#59329

QGIS crashes when executing this line (and other from the same family)
in the Python console:

QgsLayerTreeView().selectedLayers()
Copy link

github-actions bot commented Nov 5, 2024

🪟 Windows builds

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

🪟 Windows Qt6 builds

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

@rouault
Copy link
Contributor

rouault commented Nov 5, 2024

@Djedouas
Copy link
Member Author

Djedouas commented Nov 6, 2024

@nyalldawson @rouault do you have an idea why the Qt6 test has a segfault? I can run the test in both Qt5 and Qt6 on my machine and it is fine...

Is seems as if the Qt6 test uses the code without my modifications...

@rouault
Copy link
Contributor

rouault commented Nov 6, 2024

I can run the test in both Qt5 and Qt6 on my machine and it is fine...

did you try running under Valgrind, just in case this might be something subtle... Or maybe it is due to a difference of Qt6 versions between your machine and the CI one ?

@nyalldawson
Copy link
Collaborator

@Djedouas looks like the test is actually hanging and timing out and being forcefully closed. But I can't see anything here that would lead to a hang... 🤔

I'd check if it's the new test causing this (as opposed to an existing test impacted by these changes) by temporarily removing it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash after enter a python line
3 participants