CairoMakie Errors out on 3D surface when displaying tooltip

Define MWE Module

module testtest

    export goGL, goCairo

    using CairoMakie
    using GLMakie  # Use as backend to work with tooltip!

    function thePlotStuff(;withTooltip=true)
        z=rand(100,100)
        f=surface(z,axis=(type=Axis3,))
        if withTooltip
            @info "Tooltip added"
            tooltip!(f.axis,Point3(50.0,50.0,1.0),"Tip")  # Comment this out to work.
        end
        f
    end


    function goCairo(;withTooltip=true)
        CairoMakie.activate!()
        @info "Running with CairoMakie"
        thePlotStuff(;withTooltip)
    end

    function goGL(;withTooltip=true)
        GLMakie.activate!()
        @info "Running with GLMakie"
        thePlotStuff(;withTooltip)
    end

    
# Run the example
    try
        f1=goGL()
        display(f1)
        @info "No Error"
    catch err
        @error "Failed goGL"
        @show err
    end

    try
        f2=goCairo(;withTooltip=false)
        display(f2)
        @info "No Error"
    catch err
        @error "Failed goCairoMakie without tooltip"
        @show err
    end

    try
        f3=goCairo(;withTooltip=true)
        display(f3)
        @info "No Error"
    catch err
        @error "Failed goCairoMakie with tooltip"
        @show err
    end

end

Saved this into a file called error_cairomakie.jl

julia> x=include("error_cairomakie.jl")
WARNING: replacing module testtest.
[ Info: Running with GLMakie
[ Info: Tooltip added
[ Info: No Error
[ Info: Running with CairoMakie
[ Info: No Error
[ Info: Running with CairoMakie
[ Info: Tooltip added
┌ Error: Failed goCairoMakie with tooltip
└ @ Main.testtest D:\julia\development\LMMatchedFilters\examples\error_cairomakie.jl:56
err = MethodError(iterate, (nothing,), 0x0000000000007c33)
Main.testtest

Full Error stack.

julia> x.goCairo()
[ Info: Running with CairoMakie
[ Info: Tooltip added
Error showing value of type Makie.FigureAxisPlot:
ERROR: MethodError: no method matching iterate(::Nothing)

Closest candidates are:
  iterate(::Base.AsyncGenerator, ::Base.AsyncGeneratorState)
   @ Base asyncmap.jl:362
  iterate(::Base.AsyncGenerator)
   @ Base asyncmap.jl:362
  iterate(::RegexMatch, Any...)
   @ Base regex.jl:284
  ...

Stacktrace:
  [1] isempty(itr::Nothing)
    @ Base .\essentials.jl:957
  [2] collect_with_eltype(::Type{GeometryBasics.Vec{3, Float32}}, iter::Nothing)
    @ GeometryBasics D:\JULIA_DEPOT_PATH\.julia\packages\GeometryBasics\ebXl0\src\geometry_primitives.jl:77
  [3] decompose(NT::GeometryBasics.Normal{GeometryBasics.Vec{…}}, primitive::GeometryBasics.Mesh{2, Float32, GeometryBasics.Ngon{…}, GeometryBasics.SimpleFaceView{…}})
    @ GeometryBasics D:\JULIA_DEPOT_PATH\.julia\packages\GeometryBasics\ebXl0\src\interfaces.jl:131
  [4] decompose_normals(primitive::GeometryBasics.Mesh{2, Float32, GeometryBasics.Ngon{…}, GeometryBasics.SimpleFaceView{…}})
    @ GeometryBasics D:\JULIA_DEPOT_PATH\.julia\packages\GeometryBasics\ebXl0\src\interfaces.jl:126
  [5] draw_mesh3D(scene::Makie.Scene, screen::CairoMakie.Screen{…}, attributes::MakieCore.Mesh{…}, mesh::GeometryBasics.Mesh{…}; pos::GeometryBasics.Vec{…}, scale::Float32, rotation::StaticArraysCore.SMatrix{…})
    @ CairoMakie D:\JULIA_DEPOT_PATH\.julia\packages\CairoMakie\wKKMp\src\primitives.jl:1010
  [6] draw_mesh3D(scene::Makie.Scene, screen::CairoMakie.Screen{…}, attributes::MakieCore.Mesh{…}, mesh::GeometryBasics.Mesh{…})
    @ CairoMakie D:\JULIA_DEPOT_PATH\.julia\packages\CairoMakie\wKKMp\src\primitives.jl:1004
  [7] draw_atomic(scene::Makie.Scene, screen::CairoMakie.Screen{CairoMakie.IMAGE}, primitive::MakieCore.Mesh)
    @ CairoMakie D:\JULIA_DEPOT_PATH\.julia\packages\CairoMakie\wKKMp\src\primitives.jl:944
  [8] draw_plot(scene::Makie.Scene, screen::CairoMakie.Screen{CairoMakie.IMAGE}, primitive::MakieCore.Mesh{Tuple{GeometryBasics.Mesh{2, Float32, GeometryBasics.Ngon{…}, GeometryBasics.SimpleFaceView{…}}}})     
    @ CairoMakie D:\JULIA_DEPOT_PATH\.julia\packages\CairoMakie\wKKMp\src\infrastructure.jl:129
  [9] cairo_draw(screen::CairoMakie.Screen{CairoMakie.IMAGE}, scene::Makie.Scene)
    @ CairoMakie D:\JULIA_DEPOT_PATH\.julia\packages\CairoMakie\wKKMp\src\infrastructure.jl:51
 [10] backend_show(screen::CairoMakie.Screen{CairoMakie.IMAGE}, io::IOBuffer, ::MIME{Symbol("image/png")}, scene::Makie.Scene)
    @ CairoMakie D:\JULIA_DEPOT_PATH\.julia\packages\CairoMakie\wKKMp\src\display.jl:104
 [11] backend_show(screen::CairoMakie.Screen{CairoMakie.IMAGE}, io::IOBuffer, ::MIME{Symbol("juliavscode/html")}, scene::Makie.Scene)
    @ Makie D:\JULIA_DEPOT_PATH\.julia\packages\Makie\rEu75\src\display.jl:490
 [12] show(io::IOBuffer, m::MIME{Symbol("juliavscode/html")}, figlike::Makie.FigureAxisPlot)
    @ Makie D:\JULIA_DEPOT_PATH\.julia\packages\Makie\rEu75\src\display.jl:259
 [13] __binrepr(m::MIME{Symbol("juliavscode/html")}, x::Makie.FigureAxisPlot, context::Nothing)
    @ Base.Multimedia .\multimedia.jl:171
 [14] _textrepr
    @ .\multimedia.jl:163 [inlined]
 [15] repr(m::MIME{Symbol("juliavscode/html")}, x::Makie.FigureAxisPlot)
    @ Base.Multimedia .\multimedia.jl:159
 [16] display(d::VSCodeServer.InlineDisplay, m::MIME{Symbol("juliavscode/html")}, x::Any)
    @ VSCodeServer c:\Users\bakerar\.vscode\extensions\julialang.language-julia-1.105.2\scripts\packages\VSCodeServer\src\display.jl:68
 [17] display(d::VSCodeServer.InlineDisplay, mime::String, x::Any)
    @ Base.Multimedia .\multimedia.jl:228
 [18] display(d::VSCodeServer.InlineDisplay, x::Any)
    @ VSCodeServer c:\Users\bakerar\.vscode\extensions\julialang.language-julia-1.105.2\scripts\packages\VSCodeServer\src\display.jl:207
 [19] display(x::Any)
    @ Base.Multimedia .\multimedia.jl:340
 [20] display(figlike::Makie.FigureAxisPlot; backend::Module, inline::MakieCore.Automatic, update::Bool, screen_config::@Kwargs{})
    @ Makie D:\JULIA_DEPOT_PATH\.julia\packages\Makie\rEu75\src\display.jl:150
 [21] display(figlike::Makie.FigureAxisPlot)
    @ Makie D:\JULIA_DEPOT_PATH\.julia\packages\Makie\rEu75\src\display.jl:130
 [22] #invokelatest#2
    @ .\essentials.jl:892 [inlined]
 [23] invokelatest
    @ .\essentials.jl:889 [inlined]
 [24] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
    @ REPL C:\Users\bakerar\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\REPL\src\REPL.jl:315
 [25] (::REPL.var"#57#58"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
    @ REPL C:\Users\bakerar\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\REPL\src\REPL.jl:284
 [26] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL C:\Users\bakerar\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\REPL\src\REPL.jl:569
 [27] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
    @ REPL C:\Users\bakerar\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\REPL\src\REPL.jl:282
 [28] (::REPL.var"#do_respond#80"{Bool, Bool, REPL.var"#93#103"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
    @ REPL C:\Users\bakerar\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\REPL\src\REPL.jl:911
 [29] (::VSCodeServer.var"#103#106"{REPL.var"#do_respond#80"{Bool, Bool, REPL.var"#93#103"{…}, REPL.LineEditREPL, REPL.LineEdit.Prompt}})(mi::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ VSCodeServer c:\Users\bakerar\.vscode\extensions\julialang.language-julia-1.105.2\scripts\packages\VSCodeServer\src\repl.jl:122
 [30] #invokelatest#2
    @ .\essentials.jl:892 [inlined]
 [31] invokelatest
    @ .\essentials.jl:889 [inlined]
 [32] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit C:\Users\bakerar\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\REPL\src\LineEdit.jl:2656
 [33] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL C:\Users\bakerar\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\REPL\src\REPL.jl:1312
 [34] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL C:\Users\bakerar\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\REPL\src\REPL.jl:386
Some type information was truncated. Use `show(err)` to see complete types.

julia> 

julia> versioninfo()
Julia Version 1.10.2
Commit bd47eca2c8 (2024-03-01 10:14 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 12 × Intel(R) Core™ i7-10850H CPU @ 2.70GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 12 default, 0 interactive, 6 GC (on 12 virtual cores)
Environment:
JULIA_DEPOT_PATH = D:\JULIA_DEPOT_PATH.julia
JULIA_DIR = C:\Users\bakerar\AppData\Local\Programs\Julia-1.10.2
JULIA_PKG_DEVDIR = D:\JULIA\DEVELOPMENT
JULIA_PKG_USE_CLI_GIT = true
JULIA_SSL_CA_ROOTS_PATH =
JULIA_EDITOR = code
JULIA_NUM_THREADS =

julia>

[13f3f980] CairoMakie v0.12.5
[e9467ef8] GLMakie v0.10.5

This would be better as an issue :wink:

What is the way to do that.