Skip to content

StackOverflowError with DateTime in contour plot #5570

@ValentinKaisermayer

Description

@ValentinKaisermayer
  • what version of Makie are you running? (]st -m Makie) 0.24.9
  • can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie)
  • What platform + GPU are you on?
julia> versioninfo()
Julia Version 1.12.5
Commit 5fe89b8ddc (2026-02-09 16:05 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 16 × 13th Gen Intel(R) Core(TM) i5-13400T
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, alderlake)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 16 virtual cores)
Environment:
  JULIA_EDITOR = code
  JULIA_VSCODE_REPL = 1
  • Which backend are you using? (CairoMakie,)
  • Please provide an minimal example of the failing code. If the problem is with the visualization, please provide a picture or video of it.
x = Dates.DateTime.(2024, 1, 1) .+ Dates.Second.(round.(Int, 0:3600:3600*24*10))
y = 1:10
z = rand(length(x), length(y))
fig = Figure()
ax = Axis(fig[1, 1])
contourf!(ax, x, y, z)
fig
Warning: detected a stack overflow; program state may be corrupted, so further execution might be unreliable.
ERROR: StackOverflowError:
Stacktrace:
  [1] /
    @ .\twiceprecision.jl:331 [inlined]
  [2] /
    @ .\twiceprecision.jl:326 [inlined]
  [3] Base.TwicePrecision{Float64}(nd::Tuple{Int128, Int128})
    @ Base .\twiceprecision.jl:224
  [4] steprangelen_hp
    @ .\twiceprecision.jl:345 [inlined]
  [5] _linspace(::Type{Float64}, start_n::Int64, stop_n::Int64, len::Int64, den::Int64)
    @ Base .\twiceprecision.jl:731
  [6] range_start_stop_length(start::Float64, stop::Float64, len::Int64)
    @ Base .\twiceprecision.jl:661
  [7] _range
    @ .\range.jl:174 [inlined]
  [8] range
    @ .\range.jl:155 [inlined]
  [9] to_linspace
    @ C:\Users\KaisermayerV\.julia\packages\Makie\kJl0u\src\conversions.jl:737 [inlined]
 [10] convert_arguments(P::VertexGrid, x::LinRange{…}, y::StepRangeLen{…}, z::Matrix{…}) (repeats 30718 times)
    @ Makie C:\Users\KaisermayerV\.julia\packages\Makie\kJl0u\src\conversions.jl:372
 [11] convert_arguments(P::VertexGrid, x::Vector{Dates.DateTime}, y::UnitRange{Int64}, z::Matrix{Float64})
    @ Makie C:\Users\KaisermayerV\.julia\packages\Makie\kJl0u\src\conversions.jl:372
 [12] convert_arguments(::Type{Contourf}, ::Vector{Dates.DateTime}, ::Vararg{Any}; kw::@Kwargs{})
    @ Makie C:\Users\KaisermayerV\.julia\packages\Makie\kJl0u\src\conversions.jl:26
 [13] convert_arguments(::Type{Contourf}, ::Vector{Dates.DateTime}, ::UnitRange{Int64}, ::Matrix{Float64})
    @ Makie C:\Users\KaisermayerV\.julia\packages\Makie\kJl0u\src\conversions.jl:14
 [14] _register_argument_conversions!(::Type{Contourf}, attr::ComputePipeline.ComputeGraph, user_kw::Dict{Symbol, Any})
    @ Makie C:\Users\KaisermayerV\.julia\packages\Makie\kJl0u\src\compute-plots.jl:496
 [15] register_arguments!
    @ C:\Users\KaisermayerV\.julia\packages\Makie\kJl0u\src\compute-plots.jl:382 [inlined]
 [16] (Contourf)(user_args::Tuple{Vector{…}, UnitRange{…}, Matrix{…}}, user_attributes::Dict{Symbol, Any})
    @ Makie C:\Users\KaisermayerV\.julia\packages\Makie\kJl0u\src\compute-plots.jl:777
 [17] _create_plot!(::Function, ::Dict{Symbol, Any}, ::Axis, ::Vector{Dates.DateTime}, ::Vararg{Any})
    @ Makie C:\Users\KaisermayerV\.julia\packages\Makie\kJl0u\src\figureplotting.jl:403
 [18] contourf!(::Axis, ::Vararg{Any}; kw::@Kwargs{})
    @ Makie C:\Users\KaisermayerV\.julia\packages\Makie\kJl0u\src\recipes.jl:534
 [19] contourf!(::Axis, ::Vararg{Any})
    @ Makie C:\Users\KaisermayerV\.julia\packages\Makie\kJl0u\src\recipes.jl:532
 [20] eval(m::Module, e::Any)
    @ Core .\boot.jl:489
Some type information was truncated. Use `show(err)` to see complete types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions