Skip to content

Scattergl does not always render markers #2999

Closed
@rhamner

Description

@rhamner

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:

Image of fake hover

That plot looks like the following when all points are rendered:

image

If I switch to 'scatter' or 'pointcloud' or use lines instead of markers, it works fine (lines example):

image

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:

image

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:

plotly/dash-core-components#204

Activity

etpinard

etpinard commented on Sep 11, 2018

@etpinard
Contributor

What version of plotly.js are you using?

rhamner

rhamner commented on Sep 11, 2018

@rhamner
Author

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

etpinard commented on Sep 11, 2018

@etpinard
Contributor

Ok, and are you using dash?

rhamner

rhamner commented on Sep 11, 2018

@rhamner
Author

I am not. Just straight javascript/plotly.js

etpinard

etpinard commented on Sep 11, 2018

@etpinard
Contributor

I am not. Just straight javascript/plotly.js

Can you share a snippet of your work then to help us out?

etpinard

etpinard commented on Sep 11, 2018

@etpinard
Contributor

... 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

rhamner commented on Sep 11, 2018

@rhamner
Author

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

etpinard commented on Sep 11, 2018

@etpinard
Contributor

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

rhamner commented on Sep 11, 2018

@rhamner
Author

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

alexcjohnson commented on Sep 11, 2018

@alexcjohnson
Collaborator

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

rhamner commented on Sep 11, 2018

@rhamner
Author

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

alexcjohnson commented on Sep 11, 2018

@alexcjohnson
Collaborator

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

etpinard commented on Sep 12, 2018

@etpinard
Contributor

Thanks very much for your efforts @rhamner !

kevinwuhoo

kevinwuhoo commented on Oct 2, 2018

@kevinwuhoo

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

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @kevinwuhoo@rfried@seansfkelley@alexcjohnson@etpinard

    Issue actions

      Scattergl does not always render markers · Issue #2999 · plotly/plotly.js