-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
base: master
Are you sure you want to change the base?
fix(layertreeview): add checks on selectedModel to avoid segfault #59337
Conversation
Fixes qgis#59329 QGIS crashes when executing this line (and other from the same family) in the Python console: QgsLayerTreeView().selectedLayers()
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
PyQgsLayerTreeView crashes on QT6 https://github.com/qgis/QGIS/actions/runs/11690407551/job/32556700307?pr=59337 |
@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... |
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 ? |
@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... |
Description
Fixes #59329
QGIS crashes when executing this line (and other from the same family) in the Python console: