Makie error: ERROR: Failed to resolve cairo_attributes: [ComputeEdge] cairo_attributes = #15((grid_x, grid_y, image, interpolate, space, projectionview, model_f32c, clip_planes, cairo_uv_transform, resolution, computed_color, ), changed, cached)

I am having issues with the Julia Makie package, and I have two questions to ask everyone. First, how can I resolve the error messages? Second, why does the same code with the same data previously run without issues but now produces errors? What could be causing this?

ERROR: Failed to resolve cairo_attributes:
[ComputeEdge] cairo_attributes = #15((grid_x, grid_y, image, interpolate, space, projectionview, model_f32c, clip_planes, cairo_uv_transform, resolution, computed_color, ), changed, cached)
  @ C:\Users\whkdi\.julia\packages\CairoMakie\LRBPV\src\utils.jl:4
[ComputeEdge] grid_x, grid_y = #44((x_transformed_f32c, y_transformed_f32c, ), changed, cached)
  @ C:\Users\whkdi\.julia\packages\CairoMakie\LRBPV\src\image-hmap.jl:12
  with edge inputs:
    x_transformed_f32c = Float32[-1.0215657, -0.9784343, -0.93527305, -0.8920818]
    y_transformed_f32c = Float32[15.0086, 15.0266, 15.0449, 15.0635, 15.0821, 15.1004, 15.1187, 15.1373, 15.1556, 15.1739  …  20.8511, 20.8697, 20.888, 20.9063, 20.9249, 20.9435, 20.9618, 20.9801, 20.9987, 21.0173]
Triggered by update of:
  arg1, arg2, arg3, arg1, arg2, arg3, arg1, arg2, arg3, transform_func, arg1, arg2, arg3, arg1, arg2, arg3, arg1, arg2, arg3, transform_func, model, f32c, space, arg1, arg2, arg3, arg1, arg2, arg3, arg1, arg2, arg3, transform_func, arg1, arg2, arg3, arg1, arg2, arg3, arg1, arg2, arg3, transform_func, model, f32c or space
Due to ERROR: MethodError: Cannot `convert` an object of type Vector{Float32} to an object of type StepRangeLen{Float32, Float64, Float64, Int64}
The function `convert` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  StepRangeLen{T, R, S, L}(::R, ::S, ::Integer, ::Integer) where {T, R, S, L}
   @ Base range.jl:502
  StepRangeLen{T, R, S, L}(::R, ::S, ::Integer) where {T, R, S, L}
   @ Base range.jl:502
  convert(::Type{SL}, ::FillArrays.AbstractFill{T, 1} where T) where SL<:AbstractRange
   @ FillArrays C:\Users\whkdi\.julia\packages\FillArrays\lVl4c\src\FillArrays.jl:567
  ...

Stacktrace:
  [1] setproperty!(x::Base.RefValue{StepRangeLen{Float32, Float64, Float64, Int64}}, f::Symbol, v::Vector{Float32})
    @ Base .\Base.jl:52
  [2] setindex!(b::Base.RefValue{StepRangeLen{Float32, Float64, Float64, Int64}}, x::Vector{Float32})
    @ Base .\refvalue.jl:60
  [3] set_result!(edge::ComputePipeline.TypedEdge{…}, result::Tuple{…}, i::Int64, value::Vector{…})
    @ ComputePipeline C:\Users\whkdi\.julia\packages\ComputePipeline\SSXPs\src\ComputePipeline.jl:586
  [4] set_result!
    @ C:\Users\whkdi\.julia\packages\ComputePipeline\SSXPs\src\ComputePipeline.jl:599 [inlined]
  [5] resolve!(edge::ComputePipeline.TypedEdge{@NamedTuple{…}, Tuple{…}, CairoMakie.var"#44#45"})
    @ ComputePipeline C:\Users\whkdi\.julia\packages\ComputePipeline\SSXPs\src\ComputePipeline.jl:632
  [6] (::ComputePipeline.var"#52#54"{ComputePipeline.ComputeEdge{ComputePipeline.ComputeGraph}})()
    @ ComputePipeline C:\Users\whkdi\.julia\packages\ComputePipeline\SSXPs\src\ComputePipeline.jl:666
  [7] lock(f::ComputePipeline.var"#52#54"{ComputePipeline.ComputeEdge{ComputePipeline.ComputeGraph}}, l::ReentrantLock)
    @ Base .\lock.jl:232
  [8] resolve!(edge::ComputePipeline.ComputeEdge{ComputePipeline.ComputeGraph})
    @ ComputePipeline C:\Users\whkdi\.julia\packages\ComputePipeline\SSXPs\src\ComputePipeline.jl:659
  [9] _resolve!(computed::ComputePipeline.Computed)
    @ ComputePipeline C:\Users\whkdi\.julia\packages\ComputePipeline\SSXPs\src\ComputePipeline.jl:652
 [10] foreach
    @ .\abstractarray.jl:3187 [inlined]
 [11] (::ComputePipeline.var"#52#54"{ComputePipeline.ComputeEdge{ComputePipeline.ComputeGraph}})()
    @ ComputePipeline C:\Users\whkdi\.julia\packages\ComputePipeline\SSXPs\src\ComputePipeline.jl:661
 [12] lock(f::ComputePipeline.var"#52#54"{ComputePipeline.ComputeEdge{ComputePipeline.ComputeGraph}}, l::ReentrantLock)
    @ Base .\lock.jl:232
 [13] resolve!(edge::ComputePipeline.ComputeEdge{ComputePipeline.ComputeGraph})
    @ ComputePipeline C:\Users\whkdi\.julia\packages\ComputePipeline\SSXPs\src\ComputePipeline.jl:659
 [14] _resolve!(computed::ComputePipeline.Computed)
    @ ComputePipeline C:\Users\whkdi\.julia\packages\ComputePipeline\SSXPs\src\ComputePipeline.jl:652
 [15] resolve!(computed::ComputePipeline.Computed)
    @ ComputePipeline C:\Users\whkdi\.julia\packages\ComputePipeline\SSXPs\src\ComputePipeline.jl:644
 [16] getindex
    @ C:\Users\whkdi\.julia\packages\ComputePipeline\SSXPs\src\ComputePipeline.jl:563 [inlined]
 [17] draw_atomic(scene::Scene, screen::CairoMakie.Screen{CairoMakie.IMAGE}, plot::Heatmap{Tuple{…}})
    @ CairoMakie C:\Users\whkdi\.julia\packages\CairoMakie\LRBPV\src\image-hmap.jl:47
 [18] draw_plot(scene::Scene, screen::CairoMakie.Screen{CairoMakie.IMAGE}, primitive::Heatmap{Tuple{…}})
    @ CairoMakie C:\Users\whkdi\.julia\packages\CairoMakie\LRBPV\src\plot-primitives.jl:135
 [19] cairo_draw(screen::CairoMakie.Screen{CairoMakie.IMAGE}, scene::Scene)
    @ CairoMakie C:\Users\whkdi\.julia\packages\CairoMakie\LRBPV\src\plot-primitives.jl:49
 [20] colorbuffer(screen::CairoMakie.Screen{CairoMakie.IMAGE})
    @ CairoMakie C:\Users\whkdi\.julia\packages\CairoMakie\LRBPV\src\screen.jl:381
 [21] colorbuffer(screen::CairoMakie.Screen{CairoMakie.IMAGE}, format::Makie.ImageStorageFormat)
    @ Makie C:\Users\whkdi\.julia\packages\Makie\6zcxH\src\display.jl:394
 [22] recordframe!(io::VideoStream)
    @ Makie C:\Users\whkdi\.julia\packages\Makie\6zcxH\src\ffmpeg-util.jl:302
 [23] Record(func::var"#21#24"{…}, figlike::Figure, iter::StepRangeLen{…}; kw_args::@Kwargs{…})
    @ Makie C:\Users\whkdi\.julia\packages\Makie\6zcxH\src\recording.jl:174
 [24] record(func::Function, figlike::Figure, path::String, iter::StepRangeLen{…}; kw_args::@Kwargs{…})
    @ Makie C:\Users\whkdi\.julia\packages\Makie\6zcxH\src\recording.jl:154
 [25] top-level scope
    @ d:\JuliaLang\beginToLearn\ziwu_visualization\atmosphere_wind_temperature_metal_constituents_LiDAR\plot_MUCL_NDNI_Makie.jl:134 
Some type information was truncated. Use `show(err)` to see complete types.

The dataframe df_Ni and the code is as follows:
Row │ Elev NiDen DenEr time
│ Float64 Float64 Float64 DateTime
───────┼────────────────────────────────────────────────
1 │ 80.088 109.6 3.0 2023-11-02T12:07:47
2 │ 80.178 112.2 3.0 2023-11-02T12:07:47
3 │ 80.271 138.3 2.8 2023-11-02T12:07:47
4 │ 80.364 115.8 3.0 2023-11-02T12:07:47
5 │ 80.457 117.8 3.0 2023-11-02T12:07:47
6 │ 80.547 115.1 3.0 2023-11-02T12:07:47
7 │ 80.64 100.4 3.1 2023-11-02T12:07:47
8 │ 80.733 95.2 3.2 2023-11-02T12:07:47
9 │ 80.823 107.9 3.1 2023-11-02T12:07:47
10 │ 80.916 109.1 3.1 2023-11-02T12:07:47
⋮ │ ⋮ ⋮ ⋮ ⋮
10097 │ 109.209 1.9 12.6 2023-11-06T18:10:10
10098 │ 109.302 NaN 13.6 2023-11-06T18:10:10
10099 │ 109.395 0.0 12.8 2023-11-06T18:10:10
10100 │ 109.485 0.0 12.8 2023-11-06T18:10:10
10101 │ 109.578 NaN 14.4 2023-11-06T18:10:10
10102 │ 109.671 NaN 14.1 2023-11-06T18:10:10
10103 │ 109.764 NaN 14.0 2023-11-06T18:10:10
10104 │ 109.854 14.5 11.5 2023-11-06T18:10:10
10105 │ 109.947 10.7 11.8 2023-11-06T18:10:10
10106 │ 110.04 16.5 11.3 2023-11-06T18:10:10

df_Ni_unstack = unstack(df_Ni[!, [:Elev, :NiDen, :time]], :time, :Elev, :NiDen) #  rowkeys=:time, colkey=:Elev, value=:NiDen)
time = df_Ni_unstack[!, :time]
elevation = parse.(Float64, names(df_Ni_unstack[!, 2:end]))
matrix = Matrix(df_Ni_unstack[:, 2:end])

datetimes = time[1]:Day(1):time[end]
tick_positions = datetime2unix.(datetimes)  # Convert dates to Unix time (positions)
tick_labels = Dates.format.(datetimes, "HH:MM\ndd-mm")

t = Observable(1)

    time_ani = @lift(datetime2unix.(time[1:$t]))
    matrix_ani = @lift(matrix[1:$t, :])

    f = Figure(; size=(1200, 800))
    ax = Axis(f[1, 1], xlabel="Time UT", ylabel="Elevation(km)", title="Ni density",
        xticks=(tick_positions, tick_labels),
        titlesize=30,
        xlabelsize=20,
        ylabelsize=20)
    xlims!(ax, datetime2unix(time[1]), datetime2unix(time[end]))
    ylims!(ax, 80, 110)

    hm = heatmap!(ax, time_ani, elevation, matrix_ani,
        colormap=:jet, colorrange=(10, 150), lowclip=:black, highclip=:red,)
    Colorbar(f[1, 2], hm,
        height=Relative(0.9),
        width=20,
        labelsize=18
    )
    Label(f[1, 2, Top()], L"cm^{-3}",
        fontsize=20, valign=-2.0, halign=0.3
    )
    f

    framerate = 31
    timestamps = range(1, 31, length=31)
    record(f, "D:\\Ni_density.gif", timestamps; framerate=framerate) do i
        t[] = i
    end

The error has been resolved by changing the backend of Makie from CairoMakie to GLMakie. But I still don’t understand why the same code and data were able to run before, but now it’s giving an error.

it’s a bug in the backend!
Could you open an issue with the error and a minimal reproducible example?