8000 Repeatedly calling `newPlot` with `scatter3d` causes graphs to disappear · Issue #2423 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Repeatedly calling newPlot with scatter3d causes graphs to disappear #2423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chriddyp opened this issue Feb 28, 2018 · 8 comments
Closed

Repeatedly calling newPlot with scatter3d causes graphs to disappear #2423

chriddyp opened this issue Feb 28, 2018 · 8 comments
Labels
bug something broken

Comments

@chriddyp
Copy link
Member

Originally reported in https://community.plot.ly/t/webgl-context-lost-after-updating-10-times/8581/4.
I created a reproducable example in https://codepen.io/chriddyp/pen/xYmbVQ?editors=0010. After a few plots, if I navigate away from the page and then return, the original plot is no longer visible. For the original reporter, it seems like the plot disappeared while they were viewing the app (they didn't need to navigate away).

dash-webgl-contexts

@chriddyp chriddyp added the bug something broken label Feb 28, 2018
@chriddyp chriddyp added this to the Dash milestone Feb 28, 2018
@chriddyp
Copy link
Member Author

cc @dfcreative

@etpinard
Copy link
Contributor

Not much we can do here I think.

1 second is probably not enough time for browsers to garbage collect a WebGL context, so yeah inevitably the context limit will be reached.

@etpinard
Copy link
Contributor

@dfcreative please don't spend time on this until April.

@chriddyp
Copy link
Member Author

Not much we can do here I think.

Is there anything I can do here? 1 second is just to demonstrate the problem. In Dash, graphs update frequently and if they end up disappearing irregularly then we can't reliably use any GL plots in Dash.

@chriddyp
Copy link
Member Author

i.e. are there any workarounds to this issue like calling plot instead of newPlot or something?

@etpinard
Copy link
Contributor

Plotly.react should do the right thing here.

chriddyp added a commit to plotly/dash-core-components that referenced this issue Feb 28, 2018
chriddyp added a commit to plotly/dash-core-components that referenced this issue Mar 1, 2018
@chriddyp chriddyp removed this from the Dash milestone Mar 1, 2018
@chriddyp
Copy link
Member Author
chriddyp commented Mar 1, 2018

Added Plotly.react in plotly/dash-core-components#170, so hopefully we're good here 👍

@etpinard
Copy link
Contributor
etpinard commented Mar 5, 2018

Closing as we won't attempt to solve this issue with newPlot. Switching to Plotly.react should fix the problem in all cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

2 participants
0