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

pyproj.crs.PrimeMeridian() core dumps on Ubuntu #433

Closed
JackKelly opened this issue Sep 11, 2019 · 5 comments · Fixed by #434 or #436
Closed

pyproj.crs.PrimeMeridian() core dumps on Ubuntu #433

JackKelly opened this issue Sep 11, 2019 · 5 comments · Fixed by #434 or #436
Labels

Comments

@JackKelly
Copy link

JackKelly commented Sep 11, 2019

I'm really enjoying using pyproj! Thanks loads to all the developers :)

Code Sample

import pyproj
pyproj.crs.PrimeMeridian()
python: iso19111/c_api.cpp:1115: const char* proj_as_wkt(PJ_CONTEXT*, const PJ*, PJ_WKT_TYPE, const char* const*): Assertion `obj' failed.
Aborted (core dumped)

Problem description

  • Core-dumps when I try to create PrimeMeridian()

Environment Information

In [1]: import pyproj                                                                                                                                                           

In [2]: pyproj.show_versions()                                                                                                                                                  

System:
    python: 3.7.3 | packaged by conda-forge | (default, Jul  1 2019, 21:52:21)  [GCC 7.3.0]
executable: /home/jack/miniconda3/envs/test/bin/python
   machine: Linux-5.0.0-27-generic-x86_64-with-debian-buster-sid

PROJ:
      PROJ: 6.1.1
  data dir: /home/jack/miniconda3/envs/test/share/proj

Python deps:
    pyproj: 2.3.1
       pip: 19.2.3
setuptools: 41.2.0
    Cython: None

Installation method

conda create --name test pyproj && conda activate pyproj

Conda environment information (if you installed with conda):


Environment (conda list):
# packages in environment at /home/jack/miniconda3/envs/test:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
bzip2                     1.0.8                h516909a_1    conda-forge
ca-certificates           2019.6.16            hecc5488_0    conda-forge
certifi                   2019.6.16                py37_1    conda-forge
libffi                    3.2.1             he1b5a44_1006    conda-forge
libgcc-ng                 9.1.0                hdf63c60_0  
libstdcxx-ng              9.1.0                hdf63c60_0  
ncurses                   6.1               hf484d3e_1002    conda-forge
openssl                   1.1.1c               h516909a_0    conda-forge
pip                       19.2.3                   py37_0    conda-forge
proj4                     6.1.1                hc80f0dc_1    conda-forge
pyproj                    2.3.1            py37h2fd02e8_0    conda-forge
python                    3.7.3                h33d41f4_1    conda-forge
readline                  8.0                  hf8c457e_0    conda-forge
setuptools                41.2.0                   py37_0    conda-forge
sqlite                    3.29.0               hcee41ef_1    conda-forge
tk                        8.6.9             hed695b0_1002    conda-forge
wheel                     0.33.6                   py37_0    conda-forge
xz                        5.2.4             h14c3975_1001    conda-forge
zlib                      1.2.11            h516909a_1006    conda-forge

Details about conda and system ( conda info ):
$ conda info
     active environment : test
    active env location : /home/jack/miniconda3/envs/test
            shell level : 1
       user config file : /home/jack/.condarc
 populated config files : /home/jack/.condarc
          conda version : 4.7.11
    conda-build version : not installed
         python version : 3.7.3.final.0
       virtual packages : 
       base environment : /home/jack/miniconda3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/jack/miniconda3/pkgs
                          /home/jack/.conda/pkgs
       envs directories : /home/jack/miniconda3/envs
                          /home/jack/.conda/envs
               platform : linux-64
             user-agent : conda/4.7.11 requests/2.22.0 CPython/3.7.3 Linux/5.0.0-27-generic ubuntu/19.04 glibc/2.29
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False
@JackKelly JackKelly added the bug label Sep 11, 2019
@snowman2
Copy link
Member

Thanks for the report! Definitely an unintended usage pattern. but we'll add a check for that as core dumping is never a good thing.

@JackKelly
Copy link
Author

Thanks for the very quick reply!

I've tested a few other operations

These cause a segfault:

  • pyproj.crs.CoordinateOperation()
  • pyproj.crs.Datum()
  • pyproj.crs.Ellipsoid()

These operations don't cause a segfault:

  • pyproj.crs.Geod()
  • pyproj.crs.CRS()
  • pyproj.crs.is_wkt()

@snowman2
Copy link
Member

Fix in #434

@JackKelly
Copy link
Author

Wow, that was quick, thank you!

@snowman2
Copy link
Member

Just happened to catch me when I was working on another PR. Probably won't happen every time :)

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