JuliaPlots / PlotlyJS.jl

Julia library for plotting with plotly.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plotting fails after a couple of plot calls

dalekj opened this issue · comments

commented

The first 1 or 2 times calling plot works fine; an electron window will open with the plot displayed. On any subsequent calls, the plotting produces the following error:

julia> using PlotlyJS

julia> plot(randn(5))
[ Info: Listening on: 127.0.0.1:6891, thread id: 1

julia> plot(randn(5))
┌ Error: An error occurred while trying to initialize a Blink window!
│   exception =
│    Javascript error	ReferenceError: webio is not defined
│    Stacktrace:
│     [1] js(o::Blink.Page, js::WebIO.JSString; callback::Bool)
│       @ Blink ~/.julia/packages/Blink/SMxOp/src/rpc/rpc.jl:53
│     [2] js(win::Blink.AtomShell.Window, s::WebIO.JSString; callback::Bool)
│       @ Blink.AtomShell ~/.julia/packages/Blink/SMxOp/src/AtomShell/window.jl:263
│     [3] js(o::Blink.AtomShell.Window, j::Expr; callback::Bool)
│       @ Blink ~/.julia/packages/Blink/SMxOp/src/rpc/rpc.jl:61
│     [4] js
│       @ ~/.julia/packages/Blink/SMxOp/src/rpc/rpc.jl:61 [inlined]
│     [5] initwebio!(w::Blink.AtomShell.Window)
│       @ Blink.AtomShell ~/.julia/packages/Blink/SMxOp/src/AtomShell/webio.jl:17
│     [6] initwindow!(w::Blink.AtomShell.Window, callback_cond::Condition)
│       @ Blink.AtomShell ~/.julia/packages/Blink/SMxOp/src/AtomShell/window.jl:92
│     [7] (::Blink.AtomShell.var"#9#10"{Blink.AtomShell.Window, Condition})()
│       @ Blink.AtomShell ./task.jl:484
└ @ Blink.AtomShell ~/.julia/packages/Blink/SMxOp/src/AtomShell/window.jl:69

Version info

julia> versioninfo()
Julia Version 1.8.3
Commit 0434deb161e (2022-11-14 20:14 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 20 × 12th Gen Intel(R) Core(TM) i7-12700H
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, goldmont)
  Threads: 1 on 20 virtual cores
julia> using Pkg; pkg"status"
Status `~/.julia/environments/v1.8/Project.toml`
  [f0f68f2c] PlotlyJS v0.18.10
commented

The issue seems to be introduced with the recent (2023/01/06) v0.12.6 release of Blink.

Adding Blink@0.12.5 seems to solve the issue, even with latest PlotlyJS and WebIO.

Created the same ticket in Blink:

JuliaGizmos/Blink.jl#300