Skip to content

FFT segfault #1362

@jmeyers314

Description

@jmeyers314
import galsim

fwhm = 0.00012892424082577847
e1 = 0.0
e2 = 0.0
dx = -0.24762100026331102
dy = 0.3718091783120656
nx = ny = 90
scale = 0.2

print(f"Attempting drawImage with {fwhm=}, {e1=}, {e2=}, {dx=}, {dy=}, {nx=}, {scale=}")
obj = galsim.Kolmogorov(fwhm=fwhm).shear(e1=e1, e2=e2).shift(dx, dy)
img = obj.drawImage(nx=nx, ny=ny, scale=scale)
print(f"ok, sum={img.array.sum():.6f}")

This segfaults with galsim 2.8.4 for me at USDF. Certainly my fault for letting an optimizer try to draw such a thing, but shouldn't the failure be more graceful than a segfault?

Tail of the traceback is

  File "/sdf/group/rubin/sw/conda/envs/lsst-scipipe-13.0.0/lib/python3.13/site-packages/galsim/image.py", line 795 in _wrap
  File "/sdf/group/rubin/sw/conda/envs/lsst-scipipe-13.0.0/lib/python3.13/site-packages/galsim/gsobject.py", line 1997 in drawFFT_finish
  File "/sdf/group/rubin/sw/conda/envs/lsst-scipipe-13.0.0/lib/python3.13/site-packages/galsim/gsobject.py", line 2045 in drawFFT
  File "/sdf/group/rubin/sw/conda/envs/lsst-scipipe-13.0.0/lib/python3.13/site-packages/galsim/gsobject.py", line 1813 in drawImage

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions