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
QGIS PyQGIS bug/crash regression #273561
Comments
@dvkon , thanks for reporting. I confirm that QGIS is crashing on my system as well |
@dvdkon , are you able to check which Python version is used in your Flatpak QGIS package ? |
Sure, here's |
QGIS Flatpak configuration - https://github.com/flathub/org.qgis.qgis/blob/master/org.qgis.qgis.json |
I tried to build QGIS with Python 3.10 and it can be crashed with the same command. |
I did some investigation, but for now, I can't see any potential nixpkgs packaging issue related to this problem. |
Thanks, @imincik. I did some digging of my own, and I think it's a problem with SIP. In one of the generated files ( I'm trying to build QGIS with a different version of SIP, but the latest 6.8.0 doesn't seem to work right now. EDIT: SIP 6.8.1 was just released, so I'll try with that. |
Thank you very much for debugging @dvdkon . I very much appreciate it and hope it will help us to move forward with this issue. If this is really silent regression which we didn't notice at all, then we pay a big price for not running unit tests (#267919). |
@timlinux , any ideas ? |
Looking at failed tests from #267919 , many of them fail on Like this one
|
Sadly my build with SIP 6.8.1 crashes just as with 6.7.11. I'm not entirely sure I built it correctly. It might also be a good idea to try downgrading SIP to 6.7.7, but full builds take an hour+ on my computer, so I won't be doing that today. I finally found what the |
Upstream is installing python3-sip in their testing container. python3-sip in Ubuntu 22.04 or even in Debian Sid is SIP version 4 . Maybe we should try to build with |
To build with |
didn't help with |
I just noticed that the backtrace from the crash contains I don't know what the difference is actually, but it could be that we have a problem with using different sip packages to build and to run the resulting binary. Running |
This is most likely the cause. The issue can be fixed by updating I also think upstream should add more runtime checks here. They version ABIs, but apparently never check them. Also, throwing an error on an unknown arg specifier would have saved us both some hours of debugging. |
In latest nixpkgs master:
|
I can now confirm upgrading |
Great thanks once again ! I'll make a PR tomorrow. I am just building QGIS with updated pyqt5_sip to version 12.13.0. |
@dvdkon , you are very welcome to join Nix Geospatial team if you are interested. |
PyQT5_SIP PR created - #273914 |
@dvdkon , update of I am not sure what is the best approach to fix QGIS in stable What I need before starting some changes in stable branch is to know what are the compatible options. I was trying to find some compatibility matrix between |
Or maybe do it other way around and write some code which will test compatibility. Then we can use it as a package test for both of them. |
Checking Flatpak com.riverbankcomputing.PyQt.BaseApp which is used to build QGIS Flatpak package:
In Nixpkgs we have
|
Found some sip tests in QGIS. |
Unfortunately, all sip tests passed with both pyqt5_sip 12.13.0 and 12.11.0 . |
I'm about as confused as you are, so I sent a message to the PyQt mailing list, hopefully someone will clarify. My guess is that the version of |
Yes, this makes a sense. |
PR for stable branch created #274408 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/week-in-geospatial-team-11-17-dec-2023/37035/1 |
Describe the bug
I ran into a bug in QGIS which I described in an upstream bug report. To summarise, constructing some objects in the embedded Python is not possible as usual, and trying to work around the bug results in a crash.
Importantly, this only happens in the current (unstable or 23.11) NixOS build of QGIS, not in the upstream Flatpak or in a 22.05 NixOS build.
Steps To Reproduce
nix run github:NixOS/nixpkgs/nixos-23.11#qgis
.Ctrl-Alt-P
) and runQgsRuleBasedRenderer.Rule(QgsSymbol.defaultSymbol(QgsWkbTypes.LineGeometry))
You should get this error:
Rule(): not enough arguments
QgsRuleBasedRenderer.Rule(QgsSymbol.defaultSymbol(QgsWkbTypes.LineGeometry), None, label="")
QGIS should crash with SIGSEGV.
nix run github:NixOS/nixpkgs/nixos-22.05#qgis
) or from the Flatpak. The first example should work without errors and the second should throw an error (invalid args).Expected behavior
Same as the official Flatpak: no crashes and a success for the first code snippet.
Notify maintainers
@imincik @lsix
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: