GLVis / pyglvis

GLVis Jupyter Widget
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link

Disappearing viz #7

Open rw-anderson opened 3 years ago

rw-anderson commented 3 years ago

I'm curious if anyone else has seen the glitch where after visualizing a "lot" of pyglvis plots in a jupyter notebook (20+?), that they just stop showing up? There's a window, but it's blank. Usually reloading the webpage gets them to start appearing again. But not always. Sometimes I have to close the browser and relaunch jupyter.

tomstitt commented 3 years ago

Would you be able to get the console output when this happens? I haven't personally seen this but my guess would be you've hit the limit of WebGL contexts, which seems to be somewhere around 16 but it will depend on your browser.

rw-anderson commented 3 years ago

By console output do you mean in the terminal, or in a javascript console perhaps?

tzanio commented 3 years ago

Yes, the javascript console in the browser.

tomstitt commented 3 years ago

On Safari I can create 16 plots but then I start losing the oldest and see this message in the browser console: There are too many active WebGL contexts on this page, the oldest context will be lost.

I don't think we can get portably get around the WebGL context limit but we can improve the handling of it. One idea would be to "lock" old contexts when this would happen but keep a static image of the plot and have some ability to restore plots that have been "locked".