Hi all! I’ve created a program using GLMakie that uses sliders and buttons. Everything works when I run the script, though sometimes it can be a little laggy (I presume because I’m generating a new trajectory for a dynamical system everytime I change the slider or use the button), but I noticed that anytime my mouse clicks on one of these widgets, I get this huge error:
Error in callback:
KeyError: key :model not found
Stacktrace:
[1] getindex
@ Base .\dict.jl:498 [inlined]
[2] getindex
@ MakieCore C:\Users\smahn\.julia\packages\MakieCore\5nuEY\src\attributes.jl:106 [inlined]
[3] getindex(x::Lines{Tuple{Vector{Point{2, Float32}}}}, key::Symbol)
@ MakieCore C:\Users\smahn\.julia\packages\MakieCore\5nuEY\src\attributes.jl:202
[4] getproperty
@ C:\Users\smahn\.julia\packages\MakieCore\5nuEY\src\attributes.jl:86 [inlined]
[5] (::GLMakie.var"#209#216"{GLMakie.var"#241#244"{GLMakie.Screen{GLFW.Window}, Lines{Tuple{Vector{Point{2, Float32}}}}}, GLMakie.Screen{GLFW.Window}, Scene, Lines{Tuple{Vector{Point{2, Float32}}}}})()
@ GLMakie C:\Users\smahn\.julia\packages\GLMakie\aReVM\src\drawing_primitives.jl:246
[6] get!(default::GLMakie.var"#209#216"{GLMakie.var"#241#244"{GLMakie.Screen{GLFW.Window}, Lines{Tuple{Vector{Point{2, Float32}}}}}, GLMakie.Screen{GLFW.Window}, Scene, Lines{Tuple{Vector{Point{2, Float32}}}}}, h::Dict{UInt64, GLMakie.GLAbstraction.RenderObject}, key::UInt64)
@ Base .\dict.jl:479
[7] cached_robj!(robj_func::GLMakie.var"#241#244"{GLMakie.Screen{GLFW.Window}, Lines{Tuple{Vector{Point{2, Float32}}}}}, screen::GLMakie.Screen{GLFW.Window}, scene::Scene, plot::Lines{Tuple{Vector{Point{2, Float32}}}})
@ GLMakie C:\Users\smahn\.julia\packages\GLMakie\aReVM\src\drawing_primitives.jl:234
[8] draw_atomic(screen::GLMakie.Screen{GLFW.Window}, scene::Scene, plot::Lines)
@ GLMakie C:\Users\smahn\.julia\packages\GLMakie\aReVM\src\drawing_primitives.jl:445
[9] insert!(screen::GLMakie.Screen{GLFW.Window}, scene::Scene, x::Plot)
@ GLMakie C:\Users\smahn\.julia\packages\GLMakie\aReVM\src\drawing_primitives.jl:322
[10] #invokelatest#2
@ Base .\essentials.jl:887 [inlined]
[11] invokelatest
@ Base .\essentials.jl:884 [inlined]
[12] push!(scene::Scene, plot::AbstractPlot)
@ Makie C:\Users\smahn\.julia\packages\Makie\fyNiH\src\scenes.jl:453
[13] plot!
@ Makie C:\Users\smahn\.julia\packages\Makie\fyNiH\src\interfaces.jl:261 [inlined]
[14] plot!(ax::Axis, plot::Lines{Tuple{Vector{Point{2, Float32}}}})
@ Makie C:\Users\smahn\.julia\packages\Makie\fyNiH\src\figureplotting.jl:291
[15] _create_plot!(::Function, ::Dict{Symbol, Any}, ::Axis, ::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, ::Vararg{Any})
@ Makie C:\Users\smahn\.julia\packages\Makie\fyNiH\src\figureplotting.jl:259
[16] lines!
@ C:\Users\smahn\.julia\packages\MakieCore\5nuEY\src\recipes.jl:176 [inlined]
[17] (::var"#plot_timeseries#669"{ODENetworkModel, Vector{RGB{Float32}}, Axis, GridLayout})(X::StateSpaceSet{2, Float64}, t::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, freq::Float64, peak::Float64)
@ Main c:\Users\smahn\JuliaScripts2\Pipeline\appv6_inputfunc.jl:212
[18] (::var"#665#677"{Vector{Any}, Vector{Any}, var"#plot_trajectory#668"{ODENetworkModel, var"#plot_3d_trajectory#667", var"#plot_2d_trajectory#666"}, Float64})(arg1#8950::Float64, arg2#8951::Float64)
@ Main c:\Users\smahn\JuliaScripts2\Pipeline\appv6_inputfunc.jl:290
[19] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
@ Base .\essentials.jl:887
[20] invokelatest(::Any, ::Any, ::Vararg{Any})
@ Base .\essentials.jl:884
[21] (::Observables.MapCallback)(value::Any)
@ Observables C:\Users\smahn\.julia\packages\Observables\YdEbO\src\Observables.jl:436
[22] #invokelatest#2
@ Base .\essentials.jl:887 [inlined]
[23] invokelatest
@ Base .\essentials.jl:884 [inlined]
[24] notify
@ Observables C:\Users\smahn\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
[25] setindex!(observable::Observable, val::Any)
@ Observables C:\Users\smahn\.julia\packages\Observables\YdEbO\src\Observables.jl:123
[26] (::Makie.var"#1885#1900"{Slider, Observable{Any}})(i::Int64)
@ Makie C:\Users\smahn\.julia\packages\Makie\fyNiH\src\makielayout\blocks\slider.jl:63
[27] #invokelatest#2
@ Base .\essentials.jl:887 [inlined]
[28] invokelatest
@ Base .\essentials.jl:884 [inlined]
[29] notify
@ Observables C:\Users\smahn\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
[30] setindex!(observable::Observable, val::Any)
@ Observables C:\Users\smahn\.julia\packages\Observables\YdEbO\src\Observables.jl:123
[31] (::Makie.var"#1889#1904"{Slider, Observable{Float64}, Observable{Bool}, Observable{Int64}, Observable{Vector{Point{2, Float32}}}, Observable{Any}})(event::MouseEvent)
@ Makie C:\Users\smahn\.julia\packages\Makie\fyNiH\src\makielayout\blocks\slider.jl:110
[32] (::Makie.var"#1393#1394"{Makie.var"#1889#1904"{Slider, Observable{Float64}, Observable{Bool}, Observable{Int64}, Observable{Vector{Point{2, Float32}}}, Observable{Any}}})(event::MouseEvent)
@ Makie C:\Users\smahn\.julia\packages\Makie\fyNiH\src\makielayout\mousestatemachine.jl:94
[33] #invokelatest#2
@ .\essentials.jl:887 [inlined]
[34] invokelatest
@ .\essentials.jl:884 [inlined]
[35] notify
@ C:\Users\smahn\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
[36] setindex!
@ C:\Users\smahn\.julia\packages\Observables\YdEbO\src\Observables.jl:123 [inlined]
[37] (::Makie.var"#1435#1437"{Scene, Makie.var"#is_mouse_over_relevant_area#1434"{Scene, Observable{GeometryBasics.HyperRectangle{2, Float32}}}, Base.RefValue{Float64}, Base.RefValue{Bool}, Base.RefValue{Bool}, Base.RefValue{Union{Nothing, Makie.Mouse.Button}}, Base.RefValue{Bool}, Base.RefValue{Point{2, Float32}}, Base.RefValue{Point{2, Float32}}, Base.RefValue{Makie.Mouse.Action}, Observable{MouseEvent}, Module})(mp::Tuple{Float64, Float64})
@ Makie C:\Users\smahn\.julia\packages\Makie\fyNiH\src\makielayout\mousestatemachine.jl:227
[38] #invokelatest#2
@ Base .\essentials.jl:887 [inlined]
[39] invokelatest
@ Base .\essentials.jl:884 [inlined]
[40] notify
@ Observables C:\Users\smahn\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
[41] setindex!
@ Observables C:\Users\smahn\.julia\packages\Observables\YdEbO\src\Observables.jl:123 [inlined]
[42] (::GLMakie.MousePositionUpdater)(::Nothing)
@ GLMakie C:\Users\smahn\.julia\packages\GLMakie\aReVM\src\events.jl:6
[43] #invokelatest#2
@ Base .\essentials.jl:887 [inlined]
[44] invokelatest
@ Base .\essentials.jl:884 [inlined]
[45] notify
@ Observables C:\Users\smahn\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
[46] pollevents(screen::GLMakie.Screen{GLFW.Window})
@ GLMakie C:\Users\smahn\.julia\packages\GLMakie\aReVM\src\screen.jl:450
[47] on_demand_renderloop(screen::GLMakie.Screen{GLFW.Window})
@ GLMakie C:\Users\smahn\.julia\packages\GLMakie\aReVM\src\screen.jl:937
[48] renderloop(screen::GLMakie.Screen{GLFW.Window})
@ GLMakie C:\Users\smahn\.julia\packages\GLMakie\aReVM\src\screen.jl:963
[49] (::GLMakie.var"#69#70"{GLMakie.Screen{GLFW.Window}})()
@ GLMakie C:\Users\smahn\.julia\packages\GLMakie\aReVM\src\screen.jl:824
Has anyone encountered this? It’s more puzzling because the program is still functioning, and I couldn’t really figure out what the error message is referring to. I just wanted to know in case resolving this problem could improve the performance.
Many thanks!