"Reset" Makie without killing Julia process?

I semi-frequently seem to try things using Makie that stops it from working. Just now, I set rowsize! and colsize!(fig.layout,1,Aspect(1,1.0)), which gave an error. Not a problem, I thought I’d just create a new figure and not do that, but I am unable to create a new figure without getting the same error popup. Is there a way to just “reset” Makie? My usual approach when I don’t know how to fix something is to just restart the whole julia process, which is obviously annoying. I understand there might be a specific way to fix this error (not immediately obvious to me), but I’d like something that just lets me reset all of Makie so I can just start fresh. Is that possible?

This is the error I get when trying to create a new figure:

julia> f = Figure()
Error showing value of type Figure:
ERROR: TaskFailedException
Stacktrace:
  [1] wait
    @ .\task.jl:349 [inlined]
  [2] wait(x::GLMakie.Screen{GLFW.Window})
    @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:454
  [3] #stop_renderloop!#71
    @ C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:850 [inlined]
  [4] stop_renderloop!
    @ C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:840 [inlined]
  [5] close(screen::GLMakie.Screen{GLFW.Window}; reuse::Bool)
    @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:626
  [6] singleton_screen(debugging::Bool)
    @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:325
  [7] GLMakie.Screen(scene::Scene, config::GLMakie.ScreenConfig; visible::Nothing, start_renderloop::Bool)
    @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:422
  [8] GLMakie.Screen(scene::Scene, config::GLMakie.ScreenConfig)
    @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:421
  [9] getscreen(::Module, ::Scene, ::Dict{Symbol, Any})
    @ Makie C:\Users\username\.julia\packages\Makie\pCA2E\src\display.jl:427
 [10] display(figlike::Figure; backend::Module, inline::Bool, update::Bool, screen_config::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Makie C:\Users\username\.julia\packages\Makie\pCA2E\src\display.jl:165
 [11] display(figlike::Figure)
    @ Makie C:\Users\username\.julia\packages\Makie\pCA2E\src\display.jl:130
 [12] #invokelatest#2
    @ .\essentials.jl:816 [inlined]
 [13] invokelatest
    @ .\essentials.jl:813 [inlined]
 [14] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
    @ REPL C:\Users\username\.julia\juliaup\julia-1.9.2+0.x64.w64.mingw32\share\julia\stdlib\v1.9\REPL\src\REPL.jl:305
 [15] (::REPL.var"#57#58"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
    @ REPL C:\Users\username\.julia\juliaup\julia-1.9.2+0.x64.w64.mingw32\share\julia\stdlib\v1.9\REPL\src\REPL.jl:287
 [16] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL C:\Users\username\.julia\juliaup\julia-1.9.2+0.x64.w64.mingw32\share\julia\stdlib\v1.9\REPL\src\REPL.jl:557
 [17] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
    @ REPL C:\Users\username\.julia\juliaup\julia-1.9.2+0.x64.w64.mingw32\share\julia\stdlib\v1.9\REPL\src\REPL.jl:285
 [18] (::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\username\.julia\juliaup\julia-1.9.2+0.x64.w64.mingw32\share\julia\stdlib\v1.9\REPL\src\REPL.jl:899
 [19] (::VSCodeServer.var"#101#104"{REPL.var"#do_respond#80"{Bool, Bool, REPL.var"#93#103"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt}})(mi::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ VSCodeServer c:\Users\username\.vscode\extensions\julialang.language-julia-1.65.2\scripts\packages\VSCodeServer\src\repl.jl:122
 [20] #invokelatest#2
    @ .\essentials.jl:816 [inlined]
 [21] invokelatest
    @ .\essentials.jl:813 [inlined]
 [22] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit C:\Users\username\.julia\juliaup\julia-1.9.2+0.x64.w64.mingw32\share\julia\stdlib\v1.9\REPL\src\LineEdit.jl:2647
 [23] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL C:\Users\username\.julia\juliaup\julia-1.9.2+0.x64.w64.mingw32\share\julia\stdlib\v1.9\REPL\src\REPL.jl:1300
 [24] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL .\task.jl:514

    nested task error: Column 1 was given an Aspect size relative to row 1. This row's size could not be determined in time, therefore the layouting algorithm failed. This probably happened because you used an Aspect row and column size at the same time, which couldn't both be resolved.
    Stacktrace:
      [1] error(s::String)
        @ Base .\error.jl:35
      [2] (::GridLayoutBase.var"#68#86"{GridLayout, Vector{Bool}, Vector{Bool}, Vector{Float64}, Vector{Float64}})(::Tuple{Int64, Aspect})
        @ GridLayoutBase C:\Users\username\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:1367
      [3] filterenum(f::GridLayoutBase.var"#68#86"{GridLayout, Vector{Bool}, Vector{Bool}, Vector{Float64}, Vector{Float64}}, T::Type, iter::Vector{Union{Aspect, Auto, Fixed, Relative}})
        @ GridLayoutBase C:\Users\username\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:1223
      [4] compute_col_row_sizes(spaceforcolumns::Float32, spaceforrows::Float32, gl::GridLayout)
        @ GridLayoutBase C:\Users\username\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:1361
      [5] compute_rowcols(gl::GridLayout, suggestedbbox::GeometryBasics.HyperRectangle{2, Float32})
        @ GridLayoutBase C:\Users\username\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:923
      [6] align_to_bbox!(gl::GridLayout, suggestedbbox::GeometryBasics.HyperRectangle{2, 
Float32})
        @ GridLayoutBase C:\Users\username\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:1069
      [7] (::GridLayoutBase.var"#11#12"{GridLayout})(bbox::GeometryBasics.HyperRectangle{2, Float32})
        @ GridLayoutBase C:\Users\username\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:158
      [8] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
      [9] invokelatest
        @ .\essentials.jl:813 [inlined]
     [10] notify
        @ C:\Users\username\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [11] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\username\.julia\packages\Observables\YdEbO\src\Observables.jl:123
     [12] update_computedbbox!(computedbbox::Observable{GeometryBasics.HyperRectangle{2, 
Float32}}, suggestedbbox::GeometryBasics.HyperRectangle{2, Float32}, alignment::Tuple{Float32, Float32}, reporteddimensions::GridLayoutBase.Dimensions, alignmode::Inside, protrusions::GridLayoutBase.RectSides{Float32}, sizeattrs::Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, autosizeobservable::Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}})
        @ GridLayoutBase C:\Users\username\.julia\packages\GridLayoutBase\AhEkU\src\layoutobservables.jl:356
     [13] (::GridLayoutBase.var"#106#108"{Observable{GridLayoutBase.Dimensions}, Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}}, Observable{Union{Inside, Outside, Mixed}}, Observable{GridLayoutBase.RectSides{Float32}}, Observable{GeometryBasics.HyperRectangle{2, Float32}}})(sbbox::GeometryBasics.HyperRectangle{2, Float32}, ali::Tuple{Float32, Float32})
        @ GridLayoutBase C:\Users\username\.julia\packages\GridLayoutBase\AhEkU\src\layoutobservables.jl:218
     [14] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
        @ Base .\essentials.jl:816
     [15] invokelatest(::Any, ::Any, ::Vararg{Any})
        @ Base .\essentials.jl:813
     [16] (::Observables.OnAny)(value::Any)
        @ Observables C:\Users\username\.julia\packages\Observables\YdEbO\src\Observables.jl:420
     [17] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [18] invokelatest
        @ .\essentials.jl:813 [inlined]
     [19] notify
        @ C:\Users\username\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [20] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\username\.julia\packages\Observables\YdEbO\src\Observables.jl:123
     [21] (::Observables.MapCallback)(value::Any)
        @ Observables C:\Users\username\.julia\packages\Observables\YdEbO\src\Observables.jl:436
     [22] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [23] invokelatest
        @ .\essentials.jl:813 [inlined]
     [24] notify
        @ C:\Users\username\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [25] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\username\.julia\packages\Observables\YdEbO\src\Observables.jl:123
     [26] (::Makie.var"#182#184")(w_area::GeometryBasics.HyperRectangle{2, Int64})       
        @ Makie C:\Users\username\.julia\packages\Makie\pCA2E\src\scenes.jl:247
     [27] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [28] invokelatest
        @ .\essentials.jl:813 [inlined]
     [29] notify
        @ C:\Users\username\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [30] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\username\.julia\packages\Observables\YdEbO\src\Observables.jl:123
     [31] (::GLMakie.var"#windowsizecb#162"{Scene, GLMakie.Screen{GLFW.Window}})(window::GLFW.Window, width::Int32, height::Int32)
        @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\events.jl:56        
     [32] (::GLMakie.var"#161#163"{GLMakie.var"#windowsizecb#162"{Scene, GLMakie.Screen{GLFW.Window}}})(win::GLFW.Window, w::Int32, h::Int32)
        @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\events.jl:73        
     [33] _WindowSizeCallbackWrapper(window::GLFW.Window, width::Int32, height::Int32)   
        @ GLFW C:\Users\username\.julia\packages\GLFW\BWxfF\src\callback.jl:43
     [34] PollEvents
        @ C:\Users\username\.julia\packages\GLFW\BWxfF\src\glfw3.jl:620 [inlined]
     [35] pollevents(screen::GLMakie.Screen{GLFW.Window})
        @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:449       
     [36] on_demand_renderloop(screen::GLMakie.Screen{GLFW.Window})
        @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:937       
     [37] renderloop(screen::GLMakie.Screen{GLFW.Window})
        @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:963       
     [38] (::GLMakie.var"#69#70"{GLMakie.Screen{GLFW.Window}})()
        @ GLMakie .\task.jl:514
1 Like

I cant reproduce it with:

using GLMakie
f = Figure()
colsize!(f.layout,1,Aspect(1,1.0))

Is there more to reproducing it?

Sorry, you have to set rowsize! and colsize! to get the error:

using GLMakie
f = Figure()
colsize!(f.layout,1,Aspect(1,1.0))
rowsize!(f.layout,1,Aspect(1,1.0))

Just tried this in a fresh julia session, I get an error after running rowsize!(f.layout,1,Aspect(1,1.0)), but can create new figures and continue using Makie fine. So something about my setup / specific order of running things broke Makie before, and I can’t reproduce it. I’m not actually too worried about fixing the specific error that started happening, I just won’t set colsize! and rowsize! both to be Aspect(1,1.0). I’m not sure why Makie broke and I couldn’t create new Figures. I’m just assuming that something I do in the future will also break Makie, and I’d like to be able to “reset” Makie without restarting the entire Julia process.

1 Like

Hm hard to say what happened here… There shouldn’t be anything carried over to a completely new figure, so there shouldn’t be anything to reset.
My best guess is, that you did something like this:

f = Figure()
colsize!(f.layout,1,Aspect(1,1.0))
rowsize!(f.layout,1,Aspect(1,1.0))

fig = Figure()
f # old figure

Hi, thanks for your help. I have narrowed down something that I seem to run into semi-often, and I think is very similar to what went wrong yesterday. Seems to be an issue with 3D axes, and then some difficulty with automatic sizing of the axes.

I have shared code that just plots some random data into a bunch of 3D axes arranged into a 3*10 grid.

Running with size = (1200,300) is fine.

Running with size = (500,300) gives an error.

Running with size = (1200,300), and then shrinking the GLMakie window horizontally, gives error, causes GLMakie to not respond, and completely stops GLMakie from working. Running f = Figure() after this then results in an error, that is very similar to the error yesterday.

I did try all this in a temp environment with only GLMakie installed.

Here is the code, and the errors are at the end of the post:

using GLMakie

function plot1(f)
    x = rand(100)
    y = rand(100)
    z = rand(100)
    ax = Axis3(f[1,1])
    scatter!(ax,x,y,z)
end

fig = Figure(size = (1200,300),fontsize=10,pt_per_unit=1)

for i in 1:3, j in 1:10
    plot1(fig[i,j])
end

fig

Error when running with size = (500,300):

ERROR: DomainError with Inf:
tan(x) is only defined for finite x.
Stacktrace:
  [1] tan_domain_error(x::Float64)
    @ Base.Math .\special\trig.jl:214
  [2] tan(x::Float64)
    @ Base.Math .\special\trig.jl:225
  [3] perspectiveprojection
    @ C:\Users\user\.julia\packages\Makie\fyNiH\src\camera\projection_math.jl:99 [inlined]
  [4] perspectiveprojection
    @ C:\Users\user\.julia\packages\Makie\fyNiH\src\camera\projection_math.jl:107 [inlined]
  [5] projectionmatrix(viewmatrix::StaticArraysCore.SMatrix{4, 4, Float64, 16}, limits::GeometryBasics.HyperRectangle{3, Float32}, eyepos::Vec3{Float64}, radius::Float64, azim::Float64, elev::Float64, angle::Float64, width::Int64, height::Int64, scales::Vec3{Float64}, viewmode::Symbol)
    @ Makie C:\Users\user\.julia\packages\Makie\fyNiH\src\makielayout\blocks\axis3d.jl:242
  [6] calculate_matrices(limits::GeometryBasics.HyperRectangle{3, Float32}, viewport::GeometryBasics.HyperRectangle{2, Int64}, elev::Float64, azim::Float64, perspectiveness::Float32, aspect::Tuple{Float64, Float64, Float64}, viewmode::Symbol, xreversed::Bool, yreversed::Bool, zreversed::Bool)
    @ Makie C:\Users\user\.julia\packages\Makie\fyNiH\src\makielayout\blocks\axis3d.jl:224
  [7] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base .\essentials.jl:816
  [8] invokelatest(::Any, ::Any, ::Vararg{Any})
    @ Base .\essentials.jl:813
  [9] (::Observables.MapCallback)(value::Any)
    @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:436
 [10] #invokelatest#2
    @ .\essentials.jl:816 [inlined]
 [11] invokelatest
    @ .\essentials.jl:813 [inlined]
 [12] notify
    @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
 [13] setindex!(observable::Observable, val::Any)
    @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
--- the last 5 lines are repeated 1 more time ---
 [19] update_computedbbox!(computedbbox::Observable{GeometryBasics.HyperRectangle{2, Float32}}, suggestedbbox::GeometryBasics.HyperRectangle{2, Float32}, alignment::Tuple{Float32, Float32}, reporteddimensions::GridLayoutBase.Dimensions, alignmode::Inside, protrusions::GridLayoutBase.RectSides{Float32}, sizeattrs::Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, autosizeobservable::Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}})
    @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\layoutobservables.jl:356
 [20] (::GridLayoutBase.var"#106#108"{Observable{GridLayoutBase.Dimensions}, Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}}, Observable{Any}, Observable{GridLayoutBase.RectSides{Float32}}, Observable{GeometryBasics.HyperRectangle{2, Float32}}})(sbbox::GeometryBasics.HyperRectangle{2, Float32}, ali::Tuple{Float32, Float32})
    @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\layoutobservables.jl:218
 [21] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base .\essentials.jl:816
 [22] invokelatest(::Any, ::Any, ::Vararg{Any})
    @ Base .\essentials.jl:813
 [23] (::Observables.OnAny)(value::Any)
    @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:420
 [24] #invokelatest#2
    @ .\essentials.jl:816 [inlined]
 [25] invokelatest
    @ .\essentials.jl:813 [inlined]
 [26] notify
    @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
 [27] setindex!(observable::Observable, val::Any)
    @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
 [28] align_to_bbox!(gl::GridLayout, suggestedbbox::GeometryBasics.HyperRectangle{2, Float32})
    @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:1085
 [29] (::GridLayoutBase.var"#11#12"{GridLayout})(bbox::GeometryBasics.HyperRectangle{2, Float32})
    @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:158
 [30] #invokelatest#2
    @ .\essentials.jl:816 [inlined]
 [31] invokelatest
    @ .\essentials.jl:813 [inlined]
 [32] notify
    @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
 [33] setindex!(observable::Observable, val::Any)
    @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
 [34] update_computedbbox!(computedbbox::Observable{GeometryBasics.HyperRectangle{2, Float32}}, suggestedbbox::GeometryBasics.HyperRectangle{2, Float32}, alignment::Tuple{Float32, Float32}, reporteddimensions::GridLayoutBase.Dimensions, alignmode::Inside, protrusions::GridLayoutBase.RectSides{Float32}, sizeattrs::Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, autosizeobservable::Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}})
    @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\layoutobservables.jl:356
 [35] (::GridLayoutBase.var"#106#108"{Observable{GridLayoutBase.Dimensions}, Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}}, Observable{Union{Inside, Outside, Mixed}}, Observable{GridLayoutBase.RectSides{Float32}}, Observable{GeometryBasics.HyperRectangle{2, Float32}}})(sbbox::GeometryBasics.HyperRectangle{2, Float32}, ali::Tuple{Float32, Float32})
    @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\layoutobservables.jl:218
 [36] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base .\essentials.jl:816
 [37] invokelatest(::Any, ::Any, ::Vararg{Any})
    @ Base .\essentials.jl:813
 [38] (::Observables.OnAny)(value::Any)
    @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:420
 [39] #invokelatest#2
    @ .\essentials.jl:816 [inlined]
 [40] invokelatest
    @ .\essentials.jl:813 [inlined]
 [41] notify
    @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
 [42] setindex!(observable::Observable, val::Any)
    @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
 [43] align_to_bbox!(gl::GridLayout, suggestedbbox::GeometryBasics.HyperRectangle{2, Float32})
    @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:1085
 [44] (::GridLayoutBase.var"#11#12"{GridLayout})(bbox::GeometryBasics.HyperRectangle{2, Float32})
    @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:158
 [45] #invokelatest#2
    @ .\essentials.jl:816 [inlined]
 [46] invokelatest
    @ .\essentials.jl:813 [inlined]
 [47] notify
    @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
 [48] update!(gl::GridLayout)
    @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:193
 [49] add_to_gridlayout!
    @ C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:287 [inlined]
 [50] add_content!(g::GridLayout, content::GridLayout, rows::UnitRange{Int64}, cols::UnitRange{Int64}, side::GridLayoutBase.Inner)
    @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:1540
 [51] setindex!(g::GridLayout, content::GridLayout, rows::UnitRange{Int64}, cols::UnitRange{Int64}, side::GridLayoutBase.Inner)
    @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:1434
 [52] setindex!(gp::GridPosition, element::GridLayout)
    @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:1573
 [53] get_layout_at!(gp::GridPosition; createmissing::Bool)
    @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:1650
 [54] get_layout_at!
    @ C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:1645 [inlined]
 [55] setindex!(parent::GridSubposition, obj::Axis3)
    @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:1640
 [56] _block(::Type{Axis3}, ::GridSubposition; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Makie C:\Users\user\.julia\packages\Makie\fyNiH\src\makielayout\blocks.jl:270
 [57] _block
    @ C:\Users\user\.julia\packages\Makie\fyNiH\src\makielayout\blocks.jl:263 [inlined]
 [58] #_#1341
    @ C:\Users\user\.julia\packages\Makie\fyNiH\src\makielayout\blocks.jl:254 [inlined]
 [59] Block
    @ C:\Users\user\.julia\packages\Makie\fyNiH\src\makielayout\blocks.jl:253 [inlined]
 [60] plot1(f::GridPosition)
    @ Main .\REPL[18]:5

Error when running f=Figure() after resizing GLMakie window:

julia> f = Figure()
Error showing value of type Figure:
ERROR: TaskFailedException
Stacktrace:
  [1] wait
    @ .\task.jl:349 [inlined]
  [2] wait(x::GLMakie.Screen{GLFW.Window})
    @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:454
  [3] #stop_renderloop!#71
    @ C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:850 [inlined]
  [4] stop_renderloop!
    @ C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:840 [inlined]
  [5] close(screen::GLMakie.Screen{GLFW.Window}; reuse::Bool)
    @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:626
  [6] singleton_screen(debugging::Bool)
    @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:325
  [7] GLMakie.Screen(scene::Scene, config::GLMakie.ScreenConfig; visible::Nothing, start_renderloop::Bool)
    @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:422
  [8] GLMakie.Screen(scene::Scene, config::GLMakie.ScreenConfig)
    @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:421
  [9] getscreen(::Module, ::Scene, ::Dict{Symbol, Any})
    @ Makie C:\Users\user\.julia\packages\Makie\fyNiH\src\display.jl:427
 [10] display(figlike::Figure; backend::Module, inline::Bool, update::Bool, screen_config::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Makie C:\Users\user\.julia\packages\Makie\fyNiH\src\display.jl:165
 [11] display(figlike::Figure)
    @ Makie C:\Users\user\.julia\packages\Makie\fyNiH\src\display.jl:130
 [12] #invokelatest#2
    @ .\essentials.jl:816 [inlined]
 [13] invokelatest
    @ .\essentials.jl:813 [inlined]
 [14] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
    @ REPL C:\Users\user\.julia\juliaup\julia-1.9.2+0.x64.w64.mingw32\share\julia\stdlib\v1.9\REPL\src\REPL.jl:305
 [15] (::REPL.var"#57#58"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
    @ REPL C:\Users\user\.julia\juliaup\julia-1.9.2+0.x64.w64.mingw32\share\julia\stdlib\v1.9\REPL\src\REPL.jl:287
 [16] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL C:\Users\user\.julia\juliaup\julia-1.9.2+0.x64.w64.mingw32\share\julia\stdlib\v1.9\REPL\src\REPL.jl:557
 [17] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
    @ REPL C:\Users\user\.julia\juliaup\julia-1.9.2+0.x64.w64.mingw32\share\julia\stdlib\v1.9\REPL\src\REPL.jl:285
 [18] (::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\user\.julia\juliaup\julia-1.9.2+0.x64.w64.mingw32\share\julia\stdlib\v1.9\REPL\src\REPL.jl:899
 [19] #invokelatest#2
    @ .\essentials.jl:816 [inlined]
 [20] invokelatest
    @ .\essentials.jl:813 [inlined]
 [21] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit C:\Users\user\.julia\juliaup\julia-1.9.2+0.x64.w64.mingw32\share\julia\stdlib\v1.9\REPL\src\LineEdit.jl:2647
 [22] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL C:\Users\user\.julia\juliaup\julia-1.9.2+0.x64.w64.mingw32\share\julia\stdlib\v1.9\REPL\src\REPL.jl:1300
 [23] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL .\task.jl:514

    nested task error: DomainError with Inf:
    tan(x) is only defined for finite x.
    Stacktrace:
      [1] tan_domain_error(x::Float64)
        @ Base.Math .\special\trig.jl:214
      [2] tan(x::Float64)
        @ Base.Math .\special\trig.jl:225
      [3] perspectiveprojection
        @ C:\Users\user\.julia\packages\Makie\fyNiH\src\camera\projection_math.jl:99 [inlined]
      [4] perspectiveprojection
        @ C:\Users\user\.julia\packages\Makie\fyNiH\src\camera\projection_math.jl:107 [inlined]
      [5] projectionmatrix(viewmatrix::StaticArraysCore.SMatrix{4, 4, Float64, 16}, limits::GeometryBasics.HyperRectangle{3, Float32}, eyepos::Vec3{Float64}, radius::Float64, azim::Float64, elev::Float64, angle::Float64, width::Int64, height::Int64, scales::Vec3{Float64}, viewmode::Symbol)
        @ Makie C:\Users\user\.julia\packages\Makie\fyNiH\src\makielayout\blocks\axis3d.jl:242
      [6] calculate_matrices(limits::GeometryBasics.HyperRectangle{3, Float32}, viewport::GeometryBasics.HyperRectangle{2, Int64}, elev::Float64, azim::Float64, perspectiveness::Float32, aspect::Tuple{Float64, Float64, Float64}, viewmode::Symbol, xreversed::Bool, yreversed::Bool, zreversed::Bool)
        @ Makie C:\Users\user\.julia\packages\Makie\fyNiH\src\makielayout\blocks\axis3d.jl:224
      [7] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
        @ Base .\essentials.jl:816
      [8] invokelatest(::Any, ::Any, ::Vararg{Any})
        @ Base .\essentials.jl:813
      [9] (::Observables.MapCallback)(value::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:436
     [10] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [11] invokelatest
        @ .\essentials.jl:813 [inlined]
     [12] notify
        @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [13] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
    --- the last 5 lines are repeated 1 more time ---
     [19] update_computedbbox!(computedbbox::Observable{GeometryBasics.HyperRectangle{2, Float32}}, suggestedbbox::GeometryBasics.HyperRectangle{2, Float32}, alignment::Tuple{Float32, Float32}, reporteddimensions::GridLayoutBase.Dimensions, alignmode::Inside, protrusions::GridLayoutBase.RectSides{Float32}, sizeattrs::Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, autosizeobservable::Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}})
        @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\layoutobservables.jl:356
     [20] (::GridLayoutBase.var"#106#108"{Observable{GridLayoutBase.Dimensions}, Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}}, Observable{Any}, Observable{GridLayoutBase.RectSides{Float32}}, Observable{GeometryBasics.HyperRectangle{2, Float32}}})(sbbox::GeometryBasics.HyperRectangle{2, Float32}, ali::Tuple{Float32, Float32})
        @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\layoutobservables.jl:218
     [21] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
        @ Base .\essentials.jl:816
     [22] invokelatest(::Any, ::Any, ::Vararg{Any})
        @ Base .\essentials.jl:813
     [23] (::Observables.OnAny)(value::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:420
     [24] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [25] invokelatest
        @ .\essentials.jl:813 [inlined]
     [26] notify
        @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [27] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
     [28] align_to_bbox!(gl::GridLayout, suggestedbbox::GeometryBasics.HyperRectangle{2, Float32})
        @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:1085
     [29] (::GridLayoutBase.var"#11#12"{GridLayout})(bbox::GeometryBasics.HyperRectangle{2, Float32})
        @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:158
     [30] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [31] invokelatest
        @ .\essentials.jl:813 [inlined]
     [32] notify
        @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [33] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
    --- the last 15 lines are repeated 1 more time ---
     [49] update_computedbbox!(computedbbox::Observable{GeometryBasics.HyperRectangle{2, Float32}}, suggestedbbox::GeometryBasics.HyperRectangle{2, Float32}, alignment::Tuple{Float32, Float32}, reporteddimensions::GridLayoutBase.Dimensions, alignmode::Inside, protrusions::GridLayoutBase.RectSides{Float32}, sizeattrs::Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, autosizeobservable::Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}})
        @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\layoutobservables.jl:356
     [50] (::GridLayoutBase.var"#106#108"{Observable{GridLayoutBase.Dimensions}, Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}}, Observable{Union{Inside, Outside, Mixed}}, Observable{GridLayoutBase.RectSides{Float32}}, Observable{GeometryBasics.HyperRectangle{2, Float32}}})(sbbox::GeometryBasics.HyperRectangle{2, Float32}, ali::Tuple{Float32, Float32})
        @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\layoutobservables.jl:218
     [51] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
        @ Base .\essentials.jl:816
     [52] invokelatest(::Any, ::Any, ::Vararg{Any})
        @ Base .\essentials.jl:813
     [53] (::Observables.OnAny)(value::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:420
     [54] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [55] invokelatest
        @ .\essentials.jl:813 [inlined]
     [56] notify
        @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [57] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
     [58] (::Observables.MapCallback)(value::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:436
     [59] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [60] invokelatest
        @ .\essentials.jl:813 [inlined]
     [61] notify
        @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [62] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
     [63] (::Makie.var"#182#184")(w_area::GeometryBasics.HyperRectangle{2, Int64})
        @ Makie C:\Users\user\.julia\packages\Makie\fyNiH\src\scenes.jl:247
     [64] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [65] invokelatest
        @ .\essentials.jl:813 [inlined]
     [66] notify
        @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [67] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
     [68] (::GLMakie.var"#windowsizecb#166"{Scene, GLMakie.Screen{GLFW.Window}})(window::GLFW.Window, width::Int32, height::Int32)
        @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\events.jl:56
     [69] (::GLMakie.var"#165#167"{GLMakie.var"#windowsizecb#166"{Scene, GLMakie.Screen{GLFW.Window}}})(win::GLFW.Window, w::Int32, h::Int32)
        @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\events.jl:73
     [70] _WindowSizeCallbackWrapper(window::GLFW.Window, width::Int32, height::Int32)
        @ GLFW C:\Users\user\.julia\packages\GLFW\BWxfF\src\callback.jl:43
     [71] PollEvents
        @ C:\Users\user\.julia\packages\GLFW\BWxfF\src\glfw3.jl:620 [inlined]
     [72] pollevents(screen::GLMakie.Screen{GLFW.Window})
        @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:449
     [73] on_demand_renderloop(screen::GLMakie.Screen{GLFW.Window})
        @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:937
     [74] renderloop(screen::GLMakie.Screen{GLFW.Window})
        @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:963
1 Like

I think I’ve seen this before that some observable connection was still being triggered when creating a new scene/figure and when that observable caused an error you couldn’t advance. Does it help if you call GLMakie.closeall() before you try to make a new figure?

1 Like

GLMakie.closeall() gives this error:

julia> GLMakie.closeall()
ERROR: TaskFailedException
Stacktrace:
 [1] wait
   @ .\task.jl:349 [inlined]
 [2] wait(x::GLMakie.Screen{GLFW.Window})
   @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:454
 [3] #stop_renderloop!#71
   @ C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:850 [inlined]
 [4] stop_renderloop!
   @ C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:840 [inlined]
 [5] close(screen::GLMakie.Screen{GLFW.Window}; reuse::Bool)
   @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:626
 [6] close
   @ C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:623 [inlined]
 [7] destroy!(screen::GLMakie.Screen{GLFW.Window})
   @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:599
 [8] closeall()
   @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:651
 [9] top-level scope
   @ REPL[29]:1

    nested task error: DomainError with Inf:
    tan(x) is only defined for finite x.
    Stacktrace:
      [1] tan_domain_error(x::Float64)
        @ Base.Math .\special\trig.jl:214
      [2] tan(x::Float64)
        @ Base.Math .\special\trig.jl:225
      [3] perspectiveprojection
        @ C:\Users\user\.julia\packages\Makie\fyNiH\src\camera\projection_math.jl:99 [inlined]
      [4] perspectiveprojection
        @ C:\Users\user\.julia\packages\Makie\fyNiH\src\camera\projection_math.jl:107 [inlined]
      [5] projectionmatrix(viewmatrix::StaticArraysCore.SMatrix{4, 4, Float64, 16}, limits::GeometryBasics.HyperRectangle{3, Float32}, eyepos::Vec3{Float64}, radius::Float64, azim::Float64, elev::Float64, angle::Float64, width::Int64, height::Int64, scales::Vec3{Float64}, viewmode::Symbol)
        @ Makie C:\Users\user\.julia\packages\Makie\fyNiH\src\makielayout\blocks\axis3d.jl:242
      [6] calculate_matrices(limits::GeometryBasics.HyperRectangle{3, Float32}, viewport::GeometryBasics.HyperRectangle{2, Int64}, elev::Float64, azim::Float64, perspectiveness::Float32, aspect::Tuple{Float64, Float64, Float64}, viewmode::Symbol, xreversed::Bool, yreversed::Bool, zreversed::Bool)
        @ Makie C:\Users\user\.julia\packages\Makie\fyNiH\src\makielayout\blocks\axis3d.jl:224
      [7] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
        @ Base .\essentials.jl:816
      [8] invokelatest(::Any, ::Any, ::Vararg{Any})
        @ Base .\essentials.jl:813
      [9] (::Observables.MapCallback)(value::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:436
     [10] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [11] invokelatest
        @ .\essentials.jl:813 [inlined]
     [12] notify
        @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [13] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
    --- the last 5 lines are repeated 1 more time ---
     [19] update_computedbbox!(computedbbox::Observable{GeometryBasics.HyperRectangle{2, Float32}}, suggestedbbox::GeometryBasics.HyperRectangle{2, Float32}, alignment::Tuple{Float32, Float32}, reporteddimensions::GridLayoutBase.Dimensions, alignmode::Inside, protrusions::GridLayoutBase.RectSides{Float32}, sizeattrs::Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, autosizeobservable::Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}})
        @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\layoutobservables.jl:356
     [20] (::GridLayoutBase.var"#106#108"{Observable{GridLayoutBase.Dimensions}, Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}}, Observable{Any}, Observable{GridLayoutBase.RectSides{Float32}}, Observable{GeometryBasics.HyperRectangle{2, Float32}}})(sbbox::GeometryBasics.HyperRectangle{2, Float32}, ali::Tuple{Float32, Float32})
        @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\layoutobservables.jl:218
     [21] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
        @ Base .\essentials.jl:816
     [22] invokelatest(::Any, ::Any, ::Vararg{Any})
        @ Base .\essentials.jl:813
     [23] (::Observables.OnAny)(value::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:420
     [24] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [25] invokelatest
        @ .\essentials.jl:813 [inlined]
     [26] notify
        @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [27] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
     [28] align_to_bbox!(gl::GridLayout, suggestedbbox::GeometryBasics.HyperRectangle{2, Float32})
        @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:1085
     [29] (::GridLayoutBase.var"#11#12"{GridLayout})(bbox::GeometryBasics.HyperRectangle{2, Float32})
        @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\gridlayout.jl:158
     [30] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [31] invokelatest
        @ .\essentials.jl:813 [inlined]
     [32] notify
        @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [33] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
    --- the last 15 lines are repeated 1 more time ---
     [49] update_computedbbox!(computedbbox::Observable{GeometryBasics.HyperRectangle{2, Float32}}, suggestedbbox::GeometryBasics.HyperRectangle{2, Float32}, alignment::Tuple{Float32, Float32}, reporteddimensions::GridLayoutBase.Dimensions, alignmode::Inside, protrusions::GridLayoutBase.RectSides{Float32}, sizeattrs::Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, autosizeobservable::Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}})
        @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\layoutobservables.jl:356
     [50] (::GridLayoutBase.var"#106#108"{Observable{GridLayoutBase.Dimensions}, Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}}, Observable{Union{Inside, Outside, Mixed}}, Observable{GridLayoutBase.RectSides{Float32}}, Observable{GeometryBasics.HyperRectangle{2, Float32}}})(sbbox::GeometryBasics.HyperRectangle{2, Float32}, ali::Tuple{Float32, Float32})
        @ GridLayoutBase C:\Users\user\.julia\packages\GridLayoutBase\AhEkU\src\layoutobservables.jl:218
     [51] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
        @ Base .\essentials.jl:816
     [52] invokelatest(::Any, ::Any, ::Vararg{Any})
        @ Base .\essentials.jl:813
     [53] (::Observables.OnAny)(value::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:420
     [54] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [55] invokelatest
        @ .\essentials.jl:813 [inlined]
     [56] notify
        @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [57] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
     [58] (::Observables.MapCallback)(value::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:436
     [59] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [60] invokelatest
        @ .\essentials.jl:813 [inlined]
     [61] notify
        @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [62] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
     [63] (::Makie.var"#182#184")(w_area::GeometryBasics.HyperRectangle{2, Int64})
        @ Makie C:\Users\user\.julia\packages\Makie\fyNiH\src\scenes.jl:247
     [64] #invokelatest#2
        @ .\essentials.jl:816 [inlined]
     [65] invokelatest
        @ .\essentials.jl:813 [inlined]
     [66] notify
        @ C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
     [67] setindex!(observable::Observable, val::Any)
        @ Observables C:\Users\user\.julia\packages\Observables\YdEbO\src\Observables.jl:123
     [68] (::GLMakie.var"#windowsizecb#166"{Scene, GLMakie.Screen{GLFW.Window}})(window::GLFW.Window, width::Int32, height::Int32)
        @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\events.jl:56
     [69] (::GLMakie.var"#165#167"{GLMakie.var"#windowsizecb#166"{Scene, GLMakie.Screen{GLFW.Window}}})(win::GLFW.Window, w::Int32, h::Int32)
        @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\events.jl:73
     [70] _WindowSizeCallbackWrapper(window::GLFW.Window, width::Int32, height::Int32)
        @ GLFW C:\Users\user\.julia\packages\GLFW\BWxfF\src\callback.jl:43
     [71] PollEvents
        @ C:\Users\user\.julia\packages\GLFW\BWxfF\src\glfw3.jl:620 [inlined]
     [72] pollevents(screen::GLMakie.Screen{GLFW.Window})
        @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:449
     [73] on_demand_renderloop(screen::GLMakie.Screen{GLFW.Window})
        @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:937
     [74] renderloop(screen::GLMakie.Screen{GLFW.Window})
        @ GLMakie C:\Users\user\.julia\packages\GLMakie\aReVM\src\screen.jl:963

I just created a new screen, and that seemed to get things going again.

This ran fine:

julia> screen2 = GLMakie.Screen()
GLMakie.Screen(...)

julia> f = Figure()

julia> lines(1:10,1:10)
1 Like

Yeah I think there’s a PollEvents being called before repurposing an existing screen, and that goes and triggers the bug you’re trying to avoid.

It would be good to know what is going wrong originally, as I seem to be running into it a lot with the figures I’m currently making (lots of subplots, lots of 3D axes). I think when the figure size is too small, something is going to zero as subplots are automatically resized to zero size? I say this knowing approximately nothing about how any of this works…

Yeah that could be the mechanism. A tan call in the projection code is erroring, so probably a side of some scene is sized 0. In your example code you’re creating ten columns of Axis3 so maybe those don’t have enough space. I’ll have to look into it.

Might the new Malt help:

Malt is a sub-project of Pluto, used in it, while it’s now an independent package. I believe it’s used to interrupt Pluto, then it restarts, the whole notebook, but you want only the plot/Makie to restart. For now you might need to use it together manually.

It’s of course best to prevent errors (in Makie or your code), and I don’t know about that, nor looked into, but I’m curious if it makes sense to use Malt with Makie, for you at least. I’m not sure it should be a default for Makie or other plotting, it likely is better to have Makie in the same process, rather than is a Malt sandbox, but you could try. Maybe it could become a non-default option?