I am experiencing slightly strange behaviour from a visualisation routine I have written using Plots.jl. The module I have written uses code of the following form (with some irrelevant details removed). It is intended to produce a 2D animation of the results of a 2D partial differential equation.
anim = @animate for (i,u) in enumerate(sol.u)
heatmap(u)
end
gif(anim,"output/anim_u.gif",fps=5)
If I run my program with this code at the end, the program hangs indefinitely after opening a "gksqt" application in the dock. Killing the program produces the following stacktrace.
Stacktrace:
[1] poptask(W::Base.InvasiveLinkedListSynchronized{Task})
@ Base ./task.jl:760
[2] wait
@ ./task.jl:768 [inlined]
[3] wait(c::Base.GenericCondition{Base.Threads.SpinLock})
@ Base ./condition.jl:106
[4] wait(x::Base.Process)
@ Base ./process.jl:621
[5] success
@ ./process.jl:483 [inlined]
[6] run(::Cmd; wait::Bool)
@ Base ./process.jl:440
[7] run
@ ./process.jl:438 [inlined]
[8] (::FFMPEG.var"#4#6"{Cmd})(command_path::String)
@ FFMPEG ~/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:112
[9] (::JLLWrappers.var"#2#3"{FFMPEG.var"#4#6"{Cmd}, String})()
@ JLLWrappers ~/.julia/packages/JLLWrappers/bkwIo/src/runtime.jl:49
[10] withenv(::JLLWrappers.var"#2#3"{FFMPEG.var"#4#6"{Cmd}, String}, ::Pair{String, String}, ::Vararg{Pair{String, String}, N} where N)
@ Base ./env.jl:161
[11] withenv_executable_wrapper(f::Function, executable_path::String, PATH::String, LIBPATH::String, adjust_PATH::Bool, adjust_LIBPATH::Bool)
@ JLLWrappers ~/.julia/packages/JLLWrappers/bkwIo/src/runtime.jl:48
[12] #invokelatest#2
@ ./essentials.jl:708 [inlined]
[13] invokelatest
@ ./essentials.jl:706 [inlined]
[14] #ffmpeg#7
@ ~/.julia/packages/JLLWrappers/bkwIo/src/products/executable_generators.jl:7 [inlined]
[15] ffmpeg
@ ~/.julia/packages/JLLWrappers/bkwIo/src/products/executable_generators.jl:7 [inlined]
[16] #exe#2
@ ~/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:111 [inlined]
[17] ffmpeg_exe
@ ~/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:123 [inlined]
[18] buildanimation(anim::Plots.Animation, fn::String, is_animated_gif::Bool; fps::Int64, loop::Int64, variable_palette::Bool, verbose::Bool, show_msg::Bool)
@ Plots ~/.julia/packages/Plots/S2aH5/src/animation.jl:96
I am completely baffled by this behaviour - if anyone has any suggestions it would be greatly appreciated.
Running on MacOS 11.2.3 with Julia 1.6.2.