Description
Occasionally when trying to render markers with scattergl, I get the following:
Offscreen-For-WebGL-000000C6A5E1D5E0]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to access out of range vertices in attribute 0
When this happens, most of the markers are not rendered. Hover and click still work for them though. An example of hovering over a point that doesn't render is included in the screenshot below:
That plot looks like the following when all points are rendered:
If I switch to 'scatter' or 'pointcloud' or use lines instead of markers, it works fine (lines example):
Stranger, I often get this error with a subset of the data but not with the full data set. The full data set looks like this using markers and scattergl:
When I switch to 'edit in chart studio' the problem goes away. When I dump the plot data to json then bring into codepen, the problem goes away (https://codepen.io/rhamner/pen/zJWREL). It is probably important to know that this is the same machine...the issue appears with the same data set on the same machine sometimes.
Any idea on what could be causing this? Unfortunately, I can't get the issue to reproduce with the exact same data in codepen so I'm hoping the warning/error, screenshots, and actual data set in that codepen link are sufficient.
I saw a maybe similar issue reported here:
Activity
etpinard commentedon Sep 11, 2018
What version of plotly.js are you using?
rhamner commentedon Sep 11, 2018
1.40.1. I have tried using https://cdn.plot.ly/plotly-latest.min.js also.
I'm not sure if it matters, but the code base that reproduces it is a Vue app built with webpack. I see the behavior using npm install or using the cdn to pull it in.
etpinard commentedon Sep 11, 2018
Ok, and are you using dash?
rhamner commentedon Sep 11, 2018
I am not. Just straight javascript/plotly.js
etpinard commentedon Sep 11, 2018
Can you share a snippet of your work then to help us out?
etpinard commentedon Sep 11, 2018
... or is the JS code in your https://codepen.io/rhamner/pen/zJWREL equivalent to the one that yield those
Offscreen-For-WebGL-000000C6A5E1D5E0]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to access out of range vertices in attribute 0
error messages?rhamner commentedon Sep 11, 2018
The code in the codepen is equivalent. That's the exact data and layout I'm using, and I'm using Plotly.react as the call.
etpinard commentedon Sep 11, 2018
All right, well that one as is is going to be a little hard to debug.
Can you think of anything else (e.g in the html or css) that differs from your page and the codepen you posted?
rhamner commentedon Sep 11, 2018
Ok...I thought of a way to reproduce it in codepen. It's order dependent...i.e., in our main app that shows it, it's when a single plot changes content that this occurs. I was able to mimic that in that codepen and here's the link again:
https://codepen.io/rhamner/pen/zJWREL
What should happen when you run this is that it plots a bunch of markers, then plots a subset as lines ~5 seconds later, then plots that same subset as markers after another ~5 seconds. That last marker plot should show the failure to render with the hover over non-rendered points.
alexcjohnson commentedon Sep 11, 2018
Ha, I was about to write "crazy, I see the failure in the last plot in your codepen, one of the ones labeled 'Always seems to work'" but I guess that was as you were editing it. Small style point: we very much appreciate your effort to find a way to make this bug reproducible - thanks very much! but once you've posted a codepen here, it's better to fork it and edit the copy, so the written record here is clear on what we should expect to see at any given link.
I see the points disappear (but remain active for hover, as you describe) consistently on both Chrome and FF on my mac.
rhamner commentedon Sep 11, 2018
Augh...I didn't think to fork. I'll fork and update the links after dinner. To confirm though...the link now shows the issue for you?
alexcjohnson commentedon Sep 11, 2018
Yes, I see the issue repeatably now.
Don't worry about forking now - I almost didn't mention it because we really do appreciate your help in zeroing in on the problem. The state you left it in is great, it shows the bug in a clear and straightforward way. Just something to keep in mind for future issues 😄
etpinard commentedon Sep 12, 2018
Thanks very much for your efforts @rhamner !
kevinwuhoo commentedon Oct 2, 2018
I'm also seeing this. This seems to be a regression between 1.36.1 and 1.37.0 if that helps any. Changing the plotly.js version in the codepen seems to yield a working version. Thanks all!
26 remaining items