-
Notifications
You must be signed in to change notification settings - Fork 4
Segmentation fault in qgis_process when running PCRaster algorithms #55
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
Comments
@OliverSchmitz Is this this something on the PCRaster side? |
I'll have a look and try to reproduce |
I never used qgis_process, is this supposed to just work? on Debian testing I only get this
does something else need to be installed or set up? |
Yes, should just work. Entering The Qt message may not be directly related to
If no success, can you print the output of |
@OliverSchmitz any progress on getting |
Thanks for the reminder. We are mainly busy with preparing a new PCRaster release that includes more checks and fixes, and hopefully resolves segfaults...
I also tried the QT_QPA_PLATFORM, doesn't help either. PYTHONPATH is not set |
I can try a conda qgis if that helps... |
Thanks – if indeed it can be solved on the PCRaster side that would be great! AFAIK it should not need
This seems like a bug in itself, somehow tied to your Debian system. Never seen it before, but I only test Ubuntu for the Linux platform. QGIS runs automated tests on Ubuntu and Fedora it seems. IMO best to post this finding as such to QGIS. Indeed you can use another QGIS install to try and get |
With a conda QGIS |
I'm glad you can reproduce the error 🙂. |
I just pushed a fix that should resolve this. Perhaps you can try to rebuild PCRaster and check? Thanks! |
You solved it @OliverSchmitz 🚀!! Thank you very much. R package qgisprocess can now use PCRaster through QGIS! $ qgis_process run pcraster:Slope --INPUT=dem.map --OUTPUT=dem_slope.map
----------------
Inputs
----------------
INPUT: dem.map
OUTPUT: dem_slope.map
/usr/lib/python3/dist-packages/qgis/utils.py:888: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
mod = _builtin_import(name, globals, locals, fromlist, level)
----------------
Results
----------------
OUTPUT: dem_slope.map
$
$ ls dem_slope.map
dem_slope.map
$
$ rm dem_slope.map
$
$ myJSON=$(</dev/stdin)
{
"inputs": {
"INPUT": "dem.map",
"OUTPUT": "dem_slope.map"
}
}
$
$ echo "$myJSON" | qgis_process run pcraster:Slope - | tail -8
/usr/lib/python3/dist-packages/qgis/utils.py:888: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
mod = _builtin_import(name, globals, locals, fromlist, level)
"python_version": "3.10.12",
"qgis_code_revision": "c0b88339649",
"qgis_version": "3.32.2-Lima",
"qt_version": "5.15.3",
"results": {
"OUTPUT": "dem_slope.map"
}
}$
$
$ ls dem_slope.map
dem_slope.map
$
$ qgis_process --version
QGIS 3.32.2-Lima 'Lima' (c0b88339649)
QGIS code revision c0b88339649
Qt version 5.15.3
Python version 3.10.12
GDAL/OGR version 3.6.4
PROJ version 9.1.1
EPSG Registry database version v10.076 (2022-08-31)
GEOS version 3.11.1-CAPI-1.17.1
SQLite version 3.37.2
OS Linux Mint 21.2 |
When calling the QGIS CLI program
qgis_process
(which we call in R package qgisprocess) to run a PCRaster algorithm, the algorithm is run and the output is written, but in the end a segfault happens (which at the R side interrupts further handling in R and throws an error). It is specific to PCRaster, not seen for other QGIS processing providers.I compiled and installed PCRaster from source in Linux Mint, using the Ubuntu guidelines at https://jvdkwast.github.io/qgis-processing-pcraster/. A Windows R user appeared to have similar results (r-spatial/qgisprocess#159).
I'm not sure whether this is to be solved on the PCRaster side alone, or also in
qgis_process
. Feel free to move this as appropriate.Example below.
The text was updated successfully, but these errors were encountered: