Skip to content

load_data segfaults when WCSNAME is present in the header but blank #1145

Description

@mattkbrown

Description

Expected behavior

Actual behavior

When loading a fits file through load_data() the loader throws a segfault if WCSNAME is defined in the header but left blank. Giving WCSNAME a throwaway value of '' or None seems to get around this. I don't expect this to affect too many people as it likely will only be encountered by instrument teams during their development phase, eg they know they need a WCS so they put it into their header writer, but have not developed the instrument/code enough to fill it out.

Steps to Reproduce

  1. write WCSNAME to your fits file but do not give it any value.
  2. try to load the file through ginga.util.loader.load_data
  3. et voila. core dump.
# Put your Python code snippet here.

System Details

Linux-6.14.0-37-generic-x86_64-with-glibc2.39
Python 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0]
Numpy 1.26.4
astropy 6.0.0
Scipy 1.11.4
Matplotlib 3.6.3
QtPy 2.4.1
Ginga 5.0.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions