SciTools / cartopy

Cartopy - a cartographic python library with matplotlib support
https://scitools.org.uk/cartopy/docs/latest
BSD 3-Clause "New" or "Revised" License
1.43k stars 365 forks source link

Invalid Pointer error #2009

Closed hastiin-manuelito closed 2 years ago

hastiin-manuelito commented 2 years ago

Description: In trying to run example python scripts for the purpose of learning how to use Cartopy the script terminates with an error,

In a suite of python example scripts that utilize cartopy, all scripts terminated with the error:

munmap_chunk(): invalid pointer
Aborted (core dumped)

I will provide one of the example scripts

Code to reproduce

"""
Global Map
----------

An example of a simple map that compares Geodetic and Plate Carree lines
between two locations.

"""
__tags__ = ['Lines and polygons']

import matplotlib.pyplot as plt

import cartopy.crs as ccrs

def main():
    fig = plt.figure(figsize=(10, 5))
    ax = fig.add_subplot(1, 1, 1, projection=ccrs.Robinson())

    # make the map global rather than have it zoom in to
    # the extents of any plotted data
    ax.set_global()

    ax.stock_img()
    ax.coastlines()

    ax.plot(-0.08, 51.53, 'o', transform=ccrs.PlateCarree())
    ax.plot([-0.08, 132], [51.53, 43.17], transform=ccrs.PlateCarree())
    ax.plot([-0.08, 132], [51.53, 43.17], transform=ccrs.Geodetic())

    plt.show()

if __name__ == '__main__':
    main()

Traceback

global_map_traceback.txt

Full environment definition ### Operating system Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 39 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Vendor ID: GenuineIntel Model name: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz CPU family: 6 Model: 142 Thread(s) per core: 2 Core(s) per socket: 2 Socket(s): 1 Stepping: 9 CPU max MHz: 3100.0000 CPU min MHz: 400.0000 BogoMIPS: 5401.81 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_ 2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb inv pcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust sgx bmi1 a vx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida ara t pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d arch_capabilities Virtualization features: Virtualization: VT-x Caches (sum of all): L1d: 64 KiB (2 instances) L1i: 64 KiB (2 instances) L2: 512 KiB (2 instances) L3: 3 MiB (1 instance) NUMA: NUMA node(s): 1 NUMA node0 CPU(s): 0-3 Vulnerabilities: Itlb multihit: KVM: Mitigation: VMX disabled L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable Mds: Mitigation; Clear CPU buffers; SMT vulnerable Meltdown: Mitigation; PTI Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Spectre v2: Mitigation; Full generic retpoline, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling Srbds: Mitigation; Microcode Tsx async abort: Not affected ### Cartopy version Name: Cartopy Version: 0.20.2 Summary: A cartographic python library with Matplotlib support for visualisation Home-page: https://scitools.org.uk/cartopy/docs/latest/ Author: UK Met Office Author-email: None License: LGPLv3 Location: /home/derrick/.local/lib/python3.10/site-packages Requires: shapely, matplotlib, pyshp, numpy, pyproj Required-by: ### conda list - N/A ``` ``` ### pip list ``` Package Version ---------------------- ----------------- adblock 0.5.1 appdirs 1.4.4 argcomplete 1.12.3 asttokens 2.0.5 backcall 0.2.0 black 22.1.0 CacheControl 0.12.6 cairocffi 1.3.0 Cartopy 0.20.2 certifi 2021.10.8 cffi 1.15.0 chardet 4.0.0 click 8.0.4 colorama 0.4.4 colorthief 0.2.1 colorz 1.0.3 contextlib2 0.6.0.post1 cryptography 36.0.1 cycler 0.11.0 decorator 5.1.1 distlib 0.3.4 distro 1.7.0 docopt 0.6.2 executing 0.8.3 filelock 3.4.1 fonttools 4.29.1 gradspy 1.0 h5py 3.6.0 haishoku 1.1.8 html5lib 1.1 idna 3.3 importlib-metadata 4.8.1 ipython 8.1.0 ipython-genutils 0.2.0 jedi 0.18.1 Jinja2 3.0.3 kiwisolver 1.3.2 louis 3.20.0 MarkupSafe 2.0.1 matplotlib 3.5.1 matplotlib-inline 0.1.3 more-itertools 8.10.0 msgpack 1.0.3 mypy 0.930 mypy-extensions 0.4.3 nftables 0.1 numpy 1.22.0 ordered-set 4.0.2 OWSLib 0.24.1 packaging 20.9 pandas 1.4.1 parso 0.8.2 pathspec 0.9.0 pbr 5.8.1 pep517 0.12.0 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.0.0 pip 21.0 pip-shims 0.6.0 pipenv 2022.1.8 pipenv-to-requirements 0.9.0 pipreqs 0.4.11 pipx 0.16.4 platformdirs 2.4.1 ply 3.11 progress 1.6 prompt-toolkit 3.0.28 ptyprocess 0.7.0 pure-eval 0.2.2 pycparser 2.21 Pygments 2.11.2 PyGObject 3.42.0 pyOpenSSL 21.0.0 pyparsing 3.0.1 pyproj 3.0.1 PyQt5 5.15.6 PyQt5-sip 12.9.1 PyQtWebEngine 5.15.5 pyshp 2.2.0 python-dateutil 2.8.2 pytz 2021.3 pywal 3.3.0 PyYAML 6.0 qtile 0.20.0 qutebrowser 2.4.0 ranger-fm 1.9.3 Reflector 2021.11.20.2.41.3 requests 2.27.1 resolvelib 0.5.5 retrying 1.3.3 scipy 1.7.3 setuptools 59.3.0 Shapely 1.8.1.post1 six 1.16.0 stack-data 0.2.0 team 1.0 toml 0.10.2 tomli 2.0.0 traitlets 5.1.1 typing-extensions 4.0.1 urllib3 1.26.8 userpath 1.7.0 virtualenv 20.11.0 virtualenv-clone 0.5.7 wcwidth 0.2.5 webencodings 0.5.1 wheel 0.37.1 xarray 0.21.1 xcffib 0.11.1 yarg 0.1.9 youtube-dl 2021.12.17 zipp 3.7.0 ```
greglucas commented 2 years ago

Duplicate of #2006.