-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
This works:
(jl_03spvp) pkg> st
Status `/tmp/jl_03spvp/Project.toml`
⌃ [e9467ef8] GLMakie v0.8.12
[5c1252a2] GeometryBasics v0.4.11
⌃ [8315f7d3] MakieDraw v0.2.1
using GLMakie
using MakieDraw
using GeometryBasics
fig = Figure()
ax = Axis(fig[1,1])
scatter!(ax, rand(20), rand(20))
pc = GeometryCanvas{Polygon}(; figure=fig, axis=ax)When I upgrade, this code runs, but when I click on the axis:
(jl_3RSnhJ) pkg> st
Status `/tmp/jl_3RSnhJ/Project.toml`
[e9467ef8] GLMakie v0.10.8
[5c1252a2] GeometryBasics v0.4.11
[8315f7d3] MakieDraw v0.3.1
julia> Error in callback:
MethodError: Cannot `convert` an object of type
Polygon{2, Float32, Point{2, Float32}, LineString{2, Float32, Point{2, Float32}, Base.ReinterpretArray{Line{2, Float32}, 1, Tuple{Point{2, Float32}, Point{2, Float32}}, TupleView{Tuple{Point{2, Float32}, Point{2, Float32}}, 2, 1, Vector{Point{2, Float32}}}, false}}, Vector{LineString{2, Float32, Point{2, Float32}, Base.ReinterpretArray{Line{2, Float32}, 1, Tuple{Point{2, Float32}, Point{2, Float32}}, TupleView{Tuple{Point{2, Float32}, Point{2, Float32}}, 2, 1, Vector{Point{2, Float32}}}, false}}}} to an object of type
Polygon{2, Float64, Point{2, Float64}, L, V} where {L<:(AbstractVector{<:Line{2, Float64}}), V<:AbstractVector{L}}Full stack trace
Error in callback:
MethodError: Cannot `convert` an object of type
Polygon{2, Float32, Point{2, Float32}, LineString{2, Float32, Point{2, Float32}, Base.ReinterpretArray{Line{2, Float32}, 1, Tuple{Point{2, Float32}, Point{2, Float32}}, TupleView{Tuple{Point{2, Float32}, Point{2, Float32}}, 2, 1, Vector{Point{2, Float32}}}, false}}, Vector{LineString{2, Float32, Point{2, Float32}, Base.ReinterpretArray{Line{2, Float32}, 1, Tuple{Point{2, Float32}, Point{2, Float32}}, TupleView{Tuple{Point{2, Float32}, Point{2, Float32}}, 2, 1, Vector{Point{2, Float32}}}, false}}}} to an object of type
Polygon{2, Float64, Point{2, Float64}, L, V} where {L<:(AbstractVector{<:Line{2, Float64}}), V<:AbstractVector{L}}
Closest candidates are:
convert(::Type{T}, ::T) where T
@ Base Base.jl:84
Stacktrace:
[1] setindex!(A::Vector{Polygon{2, Float64, Point{2, Float64}, L, V} where {L<:(AbstractVector{<:Line{2, Float64}}), V<:AbstractVector{L}}}, x::Polygon{2, Float32, Point{2, Float32}, LineString{2, Float32, Point{2, Float32}, Base.ReinterpretArray{Line{2, Float32}, 1, Tuple{Point{2, Float32}, Point{2, Float32}}, TupleView{Tuple{Point{2, Float32}, Point{2, Float32}}, 2, 1, Vector{Point{2, Float32}}}, false}}, Vector{LineString{2, Float32, Point{2, Float32}, Base.ReinterpretArray{Line{2, Float32}, 1, Tuple{Point{2, Float32}, Point{2, Float32}}, TupleView{Tuple{Point{2, Float32}, Point{2, Float32}}, 2, 1, Vector{Point{2, Float32}}}, false}}}}, i1::Int64)
@ Base ./array.jl:1021
[2] _unsafe_copyto!(dest::Vector{Polygon{2, Float64, Point{2, Float64}, L, V} where {L<:(AbstractVector{<:Line{2, Float64}}), V<:AbstractVector{L}}}, doffs::Int64, src::Vector{Polygon{2, Float32, Point{2, Float32}, LineString{2, Float32, Point{2, Float32}, Base.ReinterpretArray{Line{2, Float32}, 1, Tuple{Point{2, Float32}, Point{2, Float32}}, TupleView{Tuple{Point{2, Float32}, Point{2, Float32}}, 2, 1, Vector{Point{2, Float32}}}, false}}, Vector{LineString{2, Float32, Point{2, Float32}, Base.ReinterpretArray{Line{2, Float32}, 1, Tuple{Point{2, Float32}, Point{2, Float32}}, TupleView{Tuple{Point{2, Float32}, Point{2, Float32}}, 2, 1, Vector{Point{2, Float32}}}, false}}}}}, soffs::Int64, n::Int64)
@ Base ./array.jl:299
[3] unsafe_copyto!
@ ./array.jl:353 [inlined]
[4] _copyto_impl!
@ ./array.jl:376 [inlined]
[5] copyto!
@ ./array.jl:363 [inlined]
[6] copyto!
@ ./array.jl:385 [inlined]
[7] copyto_axcheck!
@ ./abstractarray.jl:1177 [inlined]
[8] Vector{Polygon{2, Float64, Point{2, Float64}, L, V} where {L<:(AbstractVector{<:Line{2, Float64}}), V<:AbstractVector{L}}}(x::Vector{Polygon{2, Float32, Point{2, Float32}, LineString{2, Float32, Point{2, Float32}, Base.ReinterpretArray{Line{2, Float32}, 1, Tuple{Point{2, Float32}, Point{2, Float32}}, TupleView{Tuple{Point{2, Float32}, Point{2, Float32}}, 2, 1, Vector{Point{2, Float32}}}, false}}, Vector{LineString{2, Float32, Point{2, Float32}, Base.ReinterpretArray{Line{2, Float32}, 1, Tuple{Point{2, Float32}, Point{2, Float32}}, TupleView{Tuple{Point{2, Float32}, Point{2, Float32}}, 2, 1, Vector{Point{2, Float32}}}, false}}}}})
@ Base ./array.jl:673
[9] convert(::Type{Vector{Polygon{2, Float64, Point{2, Float64}, L, V} where {L<:(AbstractVector{<:Line{2, Float64}}), V<:AbstractVector{L}}}}, a::Vector{Polygon{2, Float32, Point{2, Float32}, LineString{2, Float32, Point{2, Float32}, Base.ReinterpretArray{Line{2, Float32}, 1, Tuple{Point{2, Float32}, Point{2, Float32}}, TupleView{Tuple{Point{2, Float32}, Point{2, Float32}}, 2, 1, Vector{Point{2, Float32}}}, false}}, Vector{LineString{2, Float32, Point{2, Float32}, Base.ReinterpretArray{Line{2, Float32}, 1, Tuple{Point{2, Float32}, Point{2, Float32}}, TupleView{Tuple{Point{2, Float32}, Point{2, Float32}}, 2, 1, Vector{Point{2, Float32}}}, false}}}}})
@ Base ./array.jl:665
[10] setproperty!(x::Observable{Vector{Polygon{2, Float64, Point{2, Float64}, L, V} where {L<:(AbstractVector{<:Line{2, Float64}}), V<:AbstractVector{L}}}}, f::Symbol, v::Vector{Polygon{2, Float32, Point{2, Float32}, LineString{2, Float32, Point{2, Float32}, Base.ReinterpretArray{Line{2, Float32}, 1, Tuple{Point{2, Float32}, Point{2, Float32}}, TupleView{Tuple{Point{2, Float32}, Point{2, Float32}}, 2, 1, Vector{Point{2, Float32}}}, false}}, Vector{LineString{2, Float32, Point{2, Float32}, Base.ReinterpretArray{Line{2, Float32}, 1, Tuple{Point{2, Float32}, Point{2, Float32}}, TupleView{Tuple{Point{2, Float32}, Point{2, Float32}}, 2, 1, Vector{Point{2, Float32}}}, false}}}}})
@ Base ./Base.jl:40
[11] setindex!(observable::Observable, val::Any)
@ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:122
[12] (::MakieDraw.var"#8#13"{UnionAll})(ps::Vector{Vector{Point{2, Float32}}})
@ MakieDraw ~/.julia/packages/MakieDraw/Vbn12/src/geometry_canvas.jl:150
[13] #invokelatest#2
@ ./essentials.jl:892 [inlined]
[14] invokelatest
@ ./essentials.jl:889 [inlined]
[15] notify
@ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
[16] (::MakieDraw.var"#58#64"{Polygon, GeometryCanvas{Polygon, Observable{Vector{Polygon{2, Float64, Point{2, Float64}, L, V} where {L<:(AbstractVector{<:Line{2, Float64}}), V<:AbstractVector{L}}}}, Observable{Vector{Vector{Point{2, Float32}}}}, Observable{Tuple{Int64, Int64}}, Nothing, @NamedTuple{}, @NamedTuple{}, Figure, Axis, Nothing}, Observable{Float64}, Observable{Bool}, Axis, Figure})(event::Makie.MouseButtonEvent)
@ MakieDraw ~/.julia/packages/MakieDraw/Vbn12/src/geometry_canvas.jl:615
[17] #invokelatest#2
@ ./essentials.jl:892 [inlined]
[18] invokelatest
@ ./essentials.jl:889 [inlined]
[19] notify
@ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
[20] setindex!
@ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123 [inlined]
[21] (::GLMakie.var"#mousebuttons#167"{Observable{Makie.MouseButtonEvent}})(window::GLFW.Window, button::GLFW.MouseButton, action::GLFW.Action, mods::Int32)
@ GLMakie ~/.julia/packages/GLMakie/GjxNU/src/events.jl:104
[22] _MouseButtonCallbackWrapper(window::GLFW.Window, button::GLFW.MouseButton, action::GLFW.Action, mods::Int32)
@ GLFW ~/.julia/packages/GLFW/wmoTL/src/callback.jl:43
[23] PollEvents
@ ~/.julia/packages/GLFW/wmoTL/src/glfw3.jl:702 [inlined]
[24] pollevents(screen::GLMakie.Screen{GLFW.Window}, frame_state::Makie.TickState)
@ GLMakie ~/.julia/packages/GLMakie/GjxNU/src/screen.jl:483
[25] on_demand_renderloop(screen::GLMakie.Screen{GLFW.Window})
@ GLMakie ~/.julia/packages/GLMakie/GjxNU/src/screen.jl:979
[26] renderloop(screen::GLMakie.Screen{GLFW.Window})
@ GLMakie ~/.julia/packages/GLMakie/GjxNU/src/screen.jl:1007
[27] (::GLMakie.var"#68#69"{GLMakie.Screen{GLFW.Window}})()
@ GLMakie ~/.julia/packages/GLMakie/GjxNU/src/screen.jl:867
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels