Skip to content

Figure.solar crashes on Linux when drawing nautical terminator for 2024-04-16T06:00:00 #2959

@astro-jingtao

Description

@astro-jingtao

Description of the problem

When I try to draw nautical terminator for year=2024, month=4, day=16, hour=6, minute=0, second=0, I got

malloc(): invalid size (unsorted)
Aborted (core dumped)

There is no problem to draw it for other time, such as year=2024, month=4, day=16, hour=6, minute=1, second=0

Minimal Complete Verifiable Example

import datetime
import pygmt

fig = pygmt.Figure()
fig.coast(region="d", projection="W0/15c", land="darkgreen", water="lightblue")

terminator_datetime = datetime.datetime(year=2024,
                                        month=4,
                                        day=16,
                                        hour=6,
                                        minute=0,
                                        second=0)

fig.solar(
    terminator="nautical",
    terminator_datetime=terminator_datetime,
    fill="blue@90",
    pen="0.5p",
)

fig.savefig("demo.png")

Full error message

malloc(): invalid size (unsorted)
Aborted (core dumped)

System information

PyGMT information:
  version: v0.10.0
System information:
  python: 3.12.1 | packaged by conda-forge | (main, Dec 23 2023, 08:03:24) [GCC 12.3.0]
  executable: /home/{my_user_name}/software/anaconda3/envs/pygmt/bin/python
  machine: Linux-4.18.0-477.13.1.el8_8.x86_64-x86_64-with-glibc2.28
Dependency information:
  numpy: 1.26.3
  pandas: 2.1.4
  xarray: 2023.12.0
  netCDF4: 1.6.5
  packaging: 23.2
  contextily: None
  geopandas: None
  IPython: 8.19.0
  rioxarray: None
  ghostscript: 9.56.1
GMT library information:
  binary version: 6.4.0
  cores: 80
  grid layout: rows
  image layout: 
  library path: /work/{my_user_name}/anaconda3/envs/pygmt/lib/libgmt.so
  padding: 2
  plugin dir: /work/{my_user_name}/anaconda3/envs/pygmt/lib/gmt/plugins
  share dir: /home/{my_user_name}/software/anaconda3/envs/pygmt/share/gmt
  version: 6.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstreamBug or missing feature of upstream core GMT

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions