-
Notifications
You must be signed in to change notification settings - Fork 408
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Currently, PyGMT opens virtual files using GMT_IN|GMT_IS_REFERENCE, and the following script works well:
import pygmt
grid = pygmt.datasets.load_earth_relief()
smooth_field = pygmt.grdfilter(grid=grid, filter="g600", distance="4")
However, if PyGMT uses GMT_IN, the above script crashes:
grdfilter [ERROR]: G->data is not NULL when memory allocation is about to happen
[Session pygmt-session (3)]: Error returned from GMT API: GMT_PTR_IS_NULL (75)
[Session pygmt-session (3)]: Error returned from GMT API: GMT_PTR_IS_NULL (75)
[Session pygmt-session (3)]: Error returned from GMT API: GMT_OBJECT_NOT_FOUND (60)
...
GMTCLibError: Failed to close virtual file '@GMTAPI@-S-I-G-M-G-N-000000'.
To reproduce the issue, please update your pygmt repository, checkout this PR (GenericMappingTools/pygmt#517), and run the above script.
It crashes with GMT 6.1.1 and GMT master, but it might work for old versions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working