Closed JobJob closed 4 years ago
I added some debugging output on the Julia side of WebIO and tracked this down to something going wrong on the isopen
call here (probably a deadlock):
I noticed that Blink's isopen
changed slightly when the webio integration got moved to Blink.jl previously it was called on the Page (BlinkConnection defined here)
And now it's called on the Window (WebIOBlinkComm defined here)
So I made the obvious change, and it works:
Base.isopen(comm::WebIOBlinkComm) = active(comm.window.content)
I have no idea what the difference is between those two, or the exact cause of the problem, but it fixes my cases, and seems reasonable.
Will PR to Blink if everyone/anyone's happy? (besides me, I'm already happy 😄)
Just checked and it also fixes https://github.com/JuliaGizmos/WebIO.jl/issues/357 for me.
It'd be good to have a test for this in WebIO, ~I saw that most of test/communication.jl is commented out.~ oh I see there's test/multiple-connections.jl
I'm still experiencing this. Observables holding an image update in atom or served with mux, but don't update with a Blink.jl electron window. Any ideas?
Ahh bummer. @rafaqz does add Blink#jb/fix-isopen
from the package REPL fix this for you?
I figured this had probably been fixed in @travigd's recent-ish comms overhaul so didn't follow this up. (Aside: commanding work in this org btw @travigd ❤️)
Anyway, @travigd was there a reason to change the Blink isopen call from
Base.isopen(comm::WebIOBlinkComm) = active(comm.window.content)
to
Base.isopen(comm::WebIOBlinkComm) = active(comm.window)
when the webio integration got moved to Blink.jl?
If not I can PR to Blink from add my branch there.
was there a reason to change the Blink isopen call
I don't think so, though I'm curious why active(window)
and active(window.content)
are different.
Feel free to make the PR. :^)
commanding work in this org btw @travigd ❤️
Thanks! I just wish I had more time to dedicate - clearly there are still quite a few issues around the Gizmos ecosystem, but $DAYJOB is eating up all of my time.
@JobJob add Blink#jb/fix-isopen
fixes the problem for me.
Would be great to get your changes into master for Blink.jl.
Thanks for checking @rafaqz
Thanks! I just wish I had more time to dedicate - clearly there are still quite a few issues around the Gizmos ecosystem, but $DAYJOB is eating up all of my time.
😄 Know the feeling very well
Managed to whittle this down to a very simple repro. At the REPL:
When the slider is moved the
observe(s)
outputs don't update. The value ofs[]
is in sync with the slider though in Julia.The same example in Jupyter Notebook (without the last two lines) works fine, it also works with Mux.
This isn't just happening in this contrived example. The actual code that I ran into this with has a PlotlyJS plot between the slider and some output.
https://github.com/JuliaGizmos/WebIO.jl/issues/357 might also be related to this.
How do you even see what messages get sent to the Blink Window in order to debug this? Does this update happen on the js side, or is it slider->julia->window? What code should I look at to get started trying to fix this? It's been a while...
This is with Julia 1.1.0