Open pbouffard opened 1 year ago
I can't execute your example... Can you give a working MWE?
@SimonDanisch I'm not sure about the "W" in this MWE, as it's only been intermittent for me, but I think this should be close to what I was doing:
using GLMakie
f = Figure(; resolution=(800,600))
ax = Axis(f[1,1]); f
display(f)
T = rand(Float32, 13, 12001)
for (i, row) in enumerate(eachrow(T)); lines!(t, row; label="$i"); end
axislegend()
di = DataInspector()
Note that those last 3 lines were pasted together, so I don't think that it was necessarily the DataInspector
call that triggered the error (nor the axis legend
) -- you can probably tell from my earlier traceback.
Also, earlier in the session where this happened, I had called (with no arguments) another function of mine, new3dscreen
:
_FIGNUM = 1
"""Create a new Makie window with empty 3D axes and a coordinate triad at the origin"""
function new3dscreen(; perspectiveness=0.8, resolution=(1200, 900), windowtitle=nothing, title="", screen_config=Dict(), create_datainspector=true)
f = Figure(; resolution)
ax = Axis3(f[1, 1]; perspectiveness, aspect=:data, title=title)
rowsize!(f.layout, 1, Relative(1))
coordtriad!(; length=0.1)
if isnothing(windowtitle)
global _FIGNUM += 1
windowtitle="Figure $_FIGNUM"
end
s = GLMakie.Screen(; title=windowtitle, vsync=true, focus_on_show=true, framerate=60.0, screen_config...)
display(s, f)
if create_datainspector
_ = DataInspector()
end
s # return the Screen
end
I didn't end up doing anything with the resulting window. I don't recall but I may have closed it* before continuing with the stuff in the MWE.
Just wanted to report that I still see this, with Makie 0.20.0, though I still don't have a MWE unfortunately. I would say it does seem to be happening more frequently, at least right now.
Errors look similar; here's one:
ERROR: program 16 not linked. Error in:
/Users/patrick/.julia/packages/GLMakie/BFWek/assets/shader/util.vert or /Users/patrick/.julia/packages/GLMakie/BFWek/assets/shader/mesh.vert or /Users/patrick/.julia/packages/GLMakie/BFWek/assets/shader/fragment_output.frag or /Users/patrick/.julia/packages/GLMakie/BFWek/assets/shader/mesh.frag or /Users/patrick/.julia/packages/GLMakie/BFWek/assets/shader/lighting.frag
ERROR: No definition of render in vertex shader
I also just had, and I don't think I've seen this before, this message appear at the REPL - not sure exactly what I was doing at the time as it was obscured by the GLMakie windows:
UNSUPPORTED (log once): POSSIBLE ISSUE: unit 0 GLD_TEXTURE_INDEX_2D is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable
I do think I'm seeing now a correlation between this error and having multiple GLMakie windows open - though it still is intermittent. Also, just now I exited Julia and on the way out got this:
error in running finalizer: GLFW.GLFWError(code=GLFW.ErrorCode(0x00010001), description="The GLFW library is not initialized")
jl_f_throw at /Users/patrick/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
ijl_apply_generic at /Users/patrick/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
_ErrorCallbackWrapper at /Users/patrick/.julia/packages/GLFW/BWxfF/src/callback.jl:43
jfptr__ErrorCallbackWrapper_129 at /Users/patrick/.julia/compiled/v1.9/GLFW/n8HlT_AFqiP.dylib (unknown line)
ijl_apply_generic at /Users/patrick/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
jlcapi__ErrorCallbackWrapper_142 at /Users/patrick/.julia/compiled/v1.9/GLFW/n8HlT_AFqiP.dylib (unknown line)
_glfwInputError at /Users/patrick/.julia/artifacts/7f4d1479db8bfb628aff3806c483e5fec617271a/lib/libglfw.3.3.dylib (unknown line)
glfwMakeContextCurrent at /Users/patrick/.julia/artifacts/7f4d1479db8bfb628aff3806c483e5fec617271a/lib/libglfw.3.3.dylib (unknown line)
MakeContextCurrent at /Users/patrick/.julia/packages/GLFW/BWxfF/src/glfw3.jl:694 [inlined]
native_switch_context! at /Users/patrick/.julia/packages/GLMakie/BFWek/src/glwindow.jl:200 [inlined]
switch_context! at /Users/patrick/.julia/packages/ShaderAbstractions/WdAfM/src/context.jl:51
jfptr_switch_contextNOT._17013 at /Users/patrick/.julia/compiled/v1.9/GLMakie/nfnZR_c9dgm.dylib (unknown line)
ijl_apply_generic at /Users/patrick/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
destroy! at /Users/patrick/.julia/packages/GLMakie/BFWek/src/screen.jl:526
unknown function (ip: 0x349dc4467)
ijl_apply_generic at /Users/patrick/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
delete! at /Users/patrick/.julia/packages/GLMakie/BFWek/src/screen.jl:558
ijl_apply_generic at /Users/patrick/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
delete! at /Users/patrick/.julia/packages/GLMakie/BFWek/src/screen.jl:551
ijl_apply_generic at /Users/patrick/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
delete! at /Users/patrick/.julia/packages/Makie/AyuSG/src/scenes.jl:488
jfptr_deleteNOT._18784 at /Users/patrick/.julia/compiled/v1.9/Makie/iZ1Bl_c9dgm.dylib (unknown line)
ijl_apply_generic at /Users/patrick/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
#empty!#189 at /Users/patrick/.julia/packages/Makie/AyuSG/src/scenes.jl:418
empty! at /Users/patrick/.julia/packages/Makie/AyuSG/src/scenes.jl:414 [inlined]
free at /Users/patrick/.julia/packages/Makie/AyuSG/src/scenes.jl:402
jfptr_free_14490 at /Users/patrick/.julia/compiled/v1.9/Makie/iZ1Bl_c9dgm.dylib (unknown line)
ijl_apply_generic at /Users/patrick/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
run_finalizer at /Users/patrick/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
jl_gc_run_finalizers_in_list at /Users/patrick/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
run_finalizers at /Users/patrick/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
ijl_atexit_hook at /Users/patrick/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
jl_repl_entrypoint at /Users/patrick/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
I'm wondering if somehow some global GPU resources are not being freed. I'm going to try restarting and see if it triggers as often as it is right now...
... hmm, it does still trigger pretty reliably after a restart
Aha! So, if I introduce a brief sleep
call in between successive windows creation, with any duration (even zero), I don't get this error. That's a good enough workaround for me for now.
Edit: actually it looks like there is a sensitivity to where the sleep
happens. If I place it after the creation of the window but before anything has been plotted, the error (though slightly different, in this case I'm seeing program 19 and ERROR: No definition of write2framebuffer in fragment shader
).
Might be that GLMakie tries to reuse a screen that hasn't been cleaned up completely yet due to the async renderloop.
I've been seeing an error like this intermittently. Once it starts happening it seems like restarting Julia clears it and typically it won't happen again in the next session. I think I've usually seen it during interactive work so the conditions may not always be the same. Since it's not very reproducible thus far I have no MWE but I'll at least paste the most recent backtrace I've seen:
The second
ERROR:
line isn't always the same across different times I've seen this. The mentionedprogram NN
tends to be low double-digit (I think 20 is the highest I've seen) and seems to be different (possibly always incrementing) when I try again in the same session.I've seen this a handful of times before this time today; if I see it again I'll capture the output.
Julia 1.8.5 GLMakie 0.8.1 MacOS 13.2 MacBook Pro M2 Max