FrameTransformations.jl
FrameTransformations.jl copied to clipboard
Segmentation Fault with bcrtod axes
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)
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
Outdated, closing.