FrameTransformations.jl icon indicating copy to clipboard operation
FrameTransformations.jl copied to clipboard

Segmentation Fault with bcrtod axes

Open MicheleCeresoli opened this issue 1 year ago • 1 comments

When you call twice the bcrtod axes registration for a specific point, either on the same frame system or on a different one a segmentation fault error is thrown.

MWE:

using FrameTransformations

@axes ICRF 1 
@axes IAU_MOON 400001 

@point Moon 301

iau = load(TPC("/home/michele/spice/kernels/pck/pck00011.tpc"));

frames = FrameSystem{3, Float64}();
add_axes_inertial!(frames, ICRF)
add_axes_bcrtod!(frames, IAU_MOON, Moon, iau)


frames2 = FrameSystem{3, Float64}();
add_axes_inertial!(frames2, ICRF)
add_axes_bcrtod!(frames2, IAU_MOON, Moon, iau)

MicheleCeresoli avatar Feb 07 '24 17:02 MicheleCeresoli

The segmentation fault error is thrown when the code tries to execute these lines within the build_axes function:

    # Check that the given functions have the correct signature 
    for i in 1:O
        otype = funs[i](T(1), SVector{3O}(zeros(T, 3O)), SVector{3O}(zeros(T, 3O)))

        !(otype isa Rotation{O,T}) && throw(
            ArgumentError(
                "$(funs[i]) return type is $(typeof(otype)) but should be Rotation{$O, $T}.",
            ),
        )
    end

MicheleCeresoli avatar Feb 07 '24 18:02 MicheleCeresoli

Outdated, closing.

andreapasquale94 avatar May 31 '24 10:05 andreapasquale94