Is it ok to post a PyGMT bug report here? The code below causes a crash on the plot command, when using PyGMT 0.6 and GMT 6.3.0. It worked/works as expected when using the older PyGMT 0.4 and GMT 6.2.0.
I’ve also tried the equivalent shell commands with GMT 6.3.0 (so without Python and by using an external file for providing the polygon coordinates), and this does still work ok, so I guess the issue was introduced in a recent version of PyGMT.
Here’s the basic code example:
import pygmt
fig = pygmt.Figure()
fig.basemap(region=["2021-01-01","2021-01-15",0,1], projection='X10cT/10c', frame=True)
fig.plot(x=["2021-01-01", "2021-01-05", "2021-01-10", "2021-01-15"], y=[0.75, 0.25, 0.4, 0.8], color='blue')
fig.show()
I get the following error messages:
Python(16886,0x1154ae600) malloc: *** error for object 0x6000006adde0: pointer being freed was not allocated
Python(16886,0x1154ae600) malloc: *** set a breakpoint in malloc_error_break to debug
Not sure if this plays a role (probably not), but I’ve installed PyGMT using pip (in pipenv) and GMT using the MacOS .dmg, after which I’ve ‘fixed’ the GMT library for use with PyGMT using the script in this issue: https://github.com/GenericMappingTools/gmt/issues/1930