org-arl/InteractiveViz.jl

No Backend available error when working with GLMakie 0.3.x and above

Closed this issue · 7 comments

When I want to plot with InteractiveViz, I get a no backend available error:

┌ Warning: Printing Scene as text because no backend is available (GLMakie, CairoMakie, WGLMakie).
│ Maybe you imported GLMakie but it didn't build correctly.
│ In that case, try `]build GLMakie` and watch out for any warnings.
└ @ AbstractPlotting ~/.julia/packages/AbstractPlotting/JCbJs/src/display.jl:110
Scene (1024px, 768px):
  0 Plots
  0 Child Scenes
LineCanvas

This applies to the minimal examples in the README.
Plotting with Makie without InteractiveViz works, though.

Did you do a using GLMakie before the plotting?

yes.

using InteractiveViz
using Makie
using GLMakie
iplot(sin, 0, 100);

does not work. if I run plot(sin.(0:100)) Makie opens a window and plots the result.
This runs in a minimal environment where I only added Makie and InteractiveViz.

   Status `~/tmp/Project.toml`
  [537997a7] AbstractPlotting v0.16.10
  [5ae59095] Colors v0.12.8
  [e9467ef8] GLMakie v0.4.2
  [d14badfc] InteractiveViz v0.1.4
  [ee78f7c6] Makie v0.14.2

The only thing is that I need to use Makie explicitly, otherwise I get a Makie error:

MethodError: no method matching shadertype(::FileIO.File{FileIO.DataFormat{:UNKNOWN}, String})

There have been a view changes to Makie. AbstractPlotting is deprecated, so you should not use it anymore.
I have removed and instead use only GLMakie, now just plotting works.
Unfortunately, the keyboard and mouse interaction callbacks have changed as well so this is not working anymore.
Alternatively, you'd need to specify the GLMakie version you know it work with.

Yes, compatibility problem with the latest version. I am able to reproduce the problem with the latest Makie, and so will debug.

If the fix takes time, I might resort to upper bounding the compatibility to an older GLMakie version, but it's tricky since the way AbstractPlotting was meant to work was to not have an explicit dependency on GLMakie.

Tested with GLMakie versions:

  • v0.1.13 :: works
  • v0.2.3 :: works
  • v0.3.4 :: doesn't work

So broke somewhere in between v0.2.3 and v0.3.4.

Investigating cause... but in the meantime, if you need to use it, install GLMakie v0.2.3.

Updated doc in 7c1770b to reflect the need for v0.2.3.

With PR #13, we no longer need older GLMakie.