Skip to content

pygmt.Figure.plot doesn't work in Linux. #1196

Closed

Description

@promise-yy

Description of the problem

This is an example from the manual.

import pygmt
data = pygmt.datasets.load_japan_quakes()
region = [
    data.longitude.min() - 1,
    data.longitude.max() + 1,
    data.latitude.min() - 1,
    data.latitude.max() + 1,
]  
fig = pygmt.Figure()
fig.basemap(region=region, projection="M15c", frame=True)
fig.coast(land="black", water="skyblue")
fig.plot(x=data.longitude, y=data.latitude, style="c0.3c", color="white", pen="black")
fig.show(method="external")

When i run the script in Windows, it works. But it gives the following error and drop out in Linux.
When the line 'fig.plot...' is commented out, it works again.
So, how can I solve this problem?
Full error message

double free or corruption (out)
Aborted (core dumped)

System information

Please paste the output of python -c "import pygmt; pygmt.show_versions()":

PyGMT information:
  version: v0.3.1
System information:
  python: 3.8.5 (default, Sep  4 2020, 07:30:14)  [GCC 7.3.0]
  executable: /home/work/anaconda3/bin/python
  machine: Linux-4.15.0-140-generic-x86_64-with-glibc2.10
Dependency information:
  numpy: 1.19.2
  pandas: 1.1.3
  xarray: 0.17.0
  netCDF4: 1.5.6
  packaging: 20.4
  ghostscript: 9.26
  gmt: 6.1.1
GMT library information:
  binary dir: /home/work/anaconda3/bin
  cores: 4
  grid layout: rows
  library path: /opt/GMT-6.1.1/lib/libgmt.so
  padding: 2
  plugin dir: /opt/GMT-6.1.1/lib/gmt/plugins
  share dir: /opt/GMT-6.1.1/share
  version: 6.1.1

Activity

  1. added
    bug
    on Apr 9, 2021
  2. welcome commented on Apr 9, 2021

    @welcome

    👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.

  3. weiji14 commented on Apr 9, 2021

    @weiji14
    Member

    Hi @promise-yy, thanks for your bug report, not nice having fig.plot crashing like that!

    To help you better, could you tell us how you installed your packages like PyGMT/GMT/etc. I notice that you have quite an old version of ghostscript (9.26) while the latest one on conda-forge is 9.53.3 (https://anaconda.org/conda-forge/ghostscript/files). Could you try upgrading to a newer ghostscript version if possible and trying again?

  4. promise-yy commented on Apr 9, 2021

    @promise-yy
    Author

    Hi @promise-yy, thanks for your bug report, not nice having fig.plot crashing like that!

    To help you better, could you tell us how you installed your packages like PyGMT/GMT/etc. I notice that you have quite an old version of ghostscript (9.26) while the latest one on conda-forge is 9.53.3 (https://anaconda.org/conda-forge/ghostscript/files). Could you try upgrading to a newer ghostscript version if possible and trying again?

    Thank you for your reply. I installed PyGMT by conda , I'm sure the GMT was installed correctly.
    I have upgrade to a newer ghostscript version, but the error is still.

    PyGMT information:
      version: v0.3.1
    System information:
      python: 3.8.5 (default, Sep  4 2020, 07:30:14)  [GCC 7.3.0]
      executable: /home/work/anaconda3/bin/python
      machine: Linux-4.15.0-140-generic-x86_64-with-glibc2.10
    Dependency information:
      numpy: 1.19.2
      pandas: 1.1.3
      xarray: 0.17.0
      netCDF4: 1.5.6
      packaging: 20.4
      ghostscript: 9.53.3
      gmt: 6.1.1
    GMT library information:
      binary dir: /home/work/anaconda3/bin
      cores: 4
      grid layout: rows
      library path: /opt/GMT-6.1.1/lib/libgmt.so
      padding: 2
      plugin dir: /opt/GMT-6.1.1/lib/gmt/plugins
      share dir: /opt/GMT-6.1.1/share
      version: 6.1.1
    

    error:
    (base) work@work-server1:~/yyseism$ python test.py
    double free or corruption (out)
    Aborted (core dumped)

  5. seisman commented on Apr 9, 2021

    @seisman
    Member

    Could you add verbose="d" to the fig.plot() call and post the verbose output?

  6. seisman commented on Apr 13, 2021

    @seisman
    Member

    Ping @promise-yy for more information, otherwise we'll close the issue because we can't reproduce it.

  7. seisman commented on Apr 15, 2021

    @seisman
    Member

    I'm closing the issue since there is no feedback and we can't reproduce it.

  8. added
    wontfix
    and removed
    bug
    on Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions