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

[linux]Crash when importing geopandas #57779

Closed
2 tasks done
eVen-gits opened this issue Jun 17, 2024 · 1 comment
Closed
2 tasks done

[linux]Crash when importing geopandas #57779

eVen-gits opened this issue Jun 17, 2024 · 1 comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@eVen-gits
Copy link

eVen-gits commented Jun 17, 2024

What is the bug or the crash?

Qgis crashes when importing geopandas withn a plugin.

Steps to reproduce the issue

Try to load a plugin that imports geopandas module.
Attached is a simple plugin that crashes qgis when attempting to load.
geopandas_crasher.zip

Console output:

❯ qgis
<trying to enable plugin here in GUI>
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
zsh: IOT instruction (core dumped)  qgis

Importing geopandas normally works - both in virtual environment, as well as system-wide python environment.

python
Python 3.12.3 (main, Apr 23 2024, 09:16:07) [GCC 13.2.1 20240417] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import geopandas
>>> geopandas.__file__
'.../.venv/lib/python3.12/site-packages/geopandas/__init__.py'

Additional information:
I am running qgis in virtual environment, but it is the same as if I was running it in global python environment.

Operating system information:

Kernel: 6.9.4-arch1-1 
Uptime: 3 days, 1 hour, 41 mins 
Packages: 1103 (pacman) 
Shell: zsh 5.9 
Resolution: 3840x1600 
DE: Plasma 6.0.5 
WM: kwin 
Theme: Breeze-Dark [GTK2], Breeze [GTK3] 
Icons: breeze-dark [GTK2/3] 
Terminal: konsole 
CPU: AMD Ryzen 5 5600X (12) @ 3.700GHz 
GPU: AMD ATI Radeon RX 5600 OEM/5600 XT / 5700/5700 XT 
Memory: 12866MiB / 128713MiB 

Versions

QGIS version 3.36.3-Maidenhead QGIS code branch Release 3.36
Qt version 5.15.14
Compiled against Python 3.12.4 Running against Python 3.12.3
GDAL/OGR version 3.9.0
PROJ version 9.4.1
EPSG Registry database version v11.006 (2024-03-13)
GEOS version 3.12.2-CAPI-1.18.2
SQLite version 3.46.0
PDAL version 2.7.1
PostgreSQL client version 16.2
SpatiaLite version 5.1.0
QWT version 6.2.0
QScintilla2 version 2.14.1
OS version EndeavourOS
       
Active Python plugins
skytek_admin version 1.0
debug_vs 0.8
processing 2.12.99
grassprovider 2.12.99
db_manager 0.1.20
QGIS version 3.36.3-Maidenhead
QGIS code branch Release 3.36
Qt version [5.15.14
Compiled against Python 3.12.4
Running against Python 3.12.3
GDAL/OGR version 3.9.0
PROJ version 9.4.1
EPSG Registry database version v11.006 (2024-03-13)
GEOS version 3.12.2-CAPI-1.18.2
SQLite version 3.46.0
PDAL version 2.7.1
PostgreSQL client version 16.2
SpatiaLite version 5.1.0
QWT version 6.2.0
QScintilla2 version 2.14.1
OS version EndeavourOS

Active Python plugins
debug_vs 0.8
processing 2.12.99
grassprovider 2.12.99
db_manager 0.1.20

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

Initially, I thought it was a problem with my (old) OS installation and that something broke when transitioning to plasma 6, but it seems that it is not related, as the problem persists on a fresh system.

Installed python packages in venv:

❯ pip list
Package                  Version
------------------------ -----------
attrs                    23.2.0
Brotli                   1.1.0
certifi                  2024.6.2
cffi                     1.16.0
charset-normalizer       3.3.2
click                    8.1.7
click-plugins            1.1.1
cligj                    0.7.2
contourpy                1.2.1
cssselect2               0.7.0
cycler                   0.12.1
ExifRead                 3.0.0
ezdxf                    1.3.1
filelock                 3.15.1
fiona                    1.9.6
fire                     0.6.0
fonttools                4.53.0
fsspec                   2024.6.0
GDAL                     3.9.0
geojson                  3.1.0
geomet                   1.1.0
geopandas                0.14.4
html5lib                 1.1
idna                     3.7
imageio                  2.34.1
inquirerpy               0.3.4
Jinja2                   3.1.4
joblib                   1.4.2
kiwisolver               1.4.5
laspy                    2.5.3
lazy_loader              0.4
lxml                     5.2.2
MarkupSafe               2.1.5
matplotlib               3.9.0
mock                     5.1.0
mpmath                   1.3.0
neo4j                    5.21.0
networkx                 3.3
numpy                    2.0.0
nvidia-cublas-cu12       12.1.3.1
nvidia-cuda-cupti-cu12   12.1.105
nvidia-cuda-nvrtc-cu12   12.1.105
nvidia-cuda-runtime-cu12 12.1.105
nvidia-cudnn-cu12        8.9.2.26
nvidia-cufft-cu12        11.0.2.54
nvidia-curand-cu12       10.3.2.106
nvidia-cusolver-cu12     11.4.5.107
nvidia-cusparse-cu12     12.1.0.106
nvidia-nccl-cu12         2.20.5
nvidia-nvjitlink-cu12    12.5.40
nvidia-nvtx-cu12         12.1.105
opencv-python            4.8.1.78
packaging                24.1
pandas                   2.2.2
pfzy                     0.3.4
pillow                   10.3.0
pip                      24.0
prettytable              3.10.0
prompt_toolkit           3.0.47
psutil                   5.9.8
psycopg2                 2.9.9
pybboxes                 0.1.6
pycocotools              2.0.8
pycparser                2.22
pydyf                    0.10.0
pyparsing                3.1.2
pyphen                   0.15.0
pyproj                   3.6.1
PyQt5-sip                12.13.0
PyQt6-sip                13.6.0
python-dateutil          2.9.0.post0
pytransform3d            3.5.0
pytz                     2024.1
PyYAML                   6.0.1
requests                 2.32.3
sahi                     0.11.16
scikit-image             0.23.2
scikit-learn             1.5.0
scipy                    1.13.1
setuptools               70.0.0
shapely                  2.0.4
six                      1.16.0
sympy                    1.12.1
termcolor                2.4.0
terminaltables           3.1.10
threadpoolctl            3.5.0
tifffile                 2024.5.22
tinycss2                 1.3.0
torch                    2.3.1
tqdm                     4.66.4
typing_extensions        4.12.2
tzdata                   2024.1
urllib3                  2.2.1
wcwidth                  0.2.13
weasyprint               62.2
webencodings             0.5.1
zopfli                   0.2.3
@eVen-gits eVen-gits added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jun 17, 2024
@eVen-gits
Copy link
Author

Update for anyone following: I was able to resolve this by installing system wide libraries through pacman in a similar way as qgis was installed.

The packages I installed this way:

python-numpy python-gdal python-owslib python-geopandas python-pyproj

I am not entirely sure which of these packages "fixed" the issue, but I included them all here, so that whoever finds this might try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

1 participant