Skip to content

ScatterGL plot fails with WebGL errors if more than 16 symbols are used. #4628

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
brian428 opened this issue Mar 11, 2020 · 15 comments
Closed
Labels
bug something broken regression this used to work

Comments

@brian428
Copy link

brian428 commented Mar 11, 2020

Using plotly-latest, a ScatterGL plot will fail and throw WebGL errors if more than 16 symbols are used in the plot.

Repro case can be found at: http://jsfiddle.net/brian428/d7oh4j2m/

I tested and found that the magic number seems to be 16. With 16 symbols, the plot seems to work fine. With 17 symbols, large numbers of WebGL errors appear. For reference, the errors say:

WebGL: INVALID_ENUM: activeTexture: texture unit out of range
bind @ plotly-latest.js:69560
batch @ VM6468:3138
E.stats @ plotly-latest.js:69665
Scatter.drawItem @ plotly-latest.js:68498
Scatter.draw @ plotly-latest.js:68454
draw @ plotly-latest.js:190442
exports.redrawReglTraces @ plotly-latest.js:117493
exports.drawData @ plotly-latest.js:117430
lib.syncOrAsync @ plotly-latest.js:106537
plot @ plotly-latest.js:112017
exports.call @ plotly-latest.js:147449
exports.layoutReplot @ plotly-latest.js:117373
lib.syncOrAsync @ plotly-latest.js:106537
relayout @ plotly-latest.js:113531
wrappedEdit @ plotly-latest.js:114061
exports.call @ plotly-latest.js:147449
handleCartesian @ plotly-latest.js:95936
(anonymous) @ plotly-latest.js:96808

Not sure if it matters, but I'm using the latest Chrome (80.0.3987.132) on Win 10 x64. Also tested with Firefox 74.0 with the same results.

@archmoj
Copy link
Contributor

archmoj commented Mar 11, 2020

Do you think it is a regression?
I can't replicate it with Chrome and Firefox on ubuntu.
Would you please let us know which OS+browser you use?

@brian428
Copy link
Author

Yep, I tested with Chrome (80.0.3987.132) on Win 10 x64. Also tested with Firefox 74.0 with the same results.

@archmoj
Copy link
Contributor

archmoj commented Mar 11, 2020

Could you please investigate if this is a regression?

@brian428
Copy link
Author

I went back through previous versions and it looks like it started around 1.33.0 or 1.34.0. I didn't get the errors with 1.32.0.

@archmoj
Copy link
Contributor

archmoj commented Mar 11, 2020

Thanks @brian428
Here are changelogs for further investigation:
v1.33.0
v1.33.1
v1.34.0

@archmoj archmoj added bug something broken regression this used to work labels Mar 11, 2020
@etpinard
Copy link
Contributor

Sounds like this has probably been a bug since the gl2d rewrite in regl #2258 two years ago.

@brian428
Copy link
Author

From the changelogs, I would guess that's probably right. We didn't notice the problem in our app until it started to be used in production, since no one thought to test it with data that created that many symbols at once. :-/

@brian428
Copy link
Author

And, again, this only seems to trigger during selection, so it's even less obvious. Not sure if that narrows it down at all, and I'm not sure yet if any other actions trigger it beyond selecting. I'll see if I can find out.

@brian428
Copy link
Author

Unsurprisingly, enabling the lasso select also triggers the WebGL errors. I couldn't trigger it with other modebar actions though. So it seems limited to selection as far as I can tell.

@nicolaskruchten nicolaskruchten added this to the v1.55.0 milestone Mar 23, 2020
@nicolaskruchten nicolaskruchten modified the milestones: v1.55.0, v1.55.1 Jun 10, 2020
@archmoj
Copy link
Contributor

archmoj commented Jun 24, 2020

It appears to be fixed in latest since v1.54.2 via #4881.
@brian428 please confirm.

@archmoj archmoj closed this as completed Jun 25, 2020
@brian428
Copy link
Author

brian428 commented Jul 2, 2020

@archmoj sorry it took a bit to return to this, but trying out latest (1.54.5), still seeing the issue. In addition, as number of symbols goes up, more and more points are not displayed. Hover data points to them, but the points themselves are not shown.

Updated repro: http://jsfiddle.net/brian428/d7oh4j2m/

@archmoj archmoj reopened this Jul 2, 2020
@nicolaskruchten nicolaskruchten removed this from the v1.55.1 milestone Jul 7, 2020
@jackparmer
Copy link
Contributor

This issue has been tagged with NEEDS SPON$OR

A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.

Sponsorship range: $10k-$15k

What Sponsorship includes:

  • Completion of this feature to the Sponsor's satisfaction, in a manner coherent with the rest of the Plotly.js library and API
  • Tests for this feature
  • Long-term support (continued support of this feature in the latest version of Plotly.js)
  • Documentation at plotly.com/javascript
  • Possibility of integrating this feature with Plotly Graphing Libraries (Python, R, F#, Julia, MATLAB, etc)
  • Possibility of integrating this feature with Dash
  • Feature announcement on community.plotly.com with shout out to Sponsor (or can remain anonymous)
  • Gratification of advancing the world's most downloaded, interactive scientific graphing libraries (>50M downloads across supported languages)

Please include the link to this issue when contacting us to discuss.

@brian428
Copy link
Author

@jackparmer I totally understand the idea of sponsorship for requests for new features and so on, but in case you didn't realize it, this is a bug (and a regression), not a feature request. Was adding the "needs sponsor" tag a mistake in this case? Thanks.

@nicolaskruchten
Copy link
Contributor

This is intentional in this case: we're unlikely to be able to fix this one without external sponsorship unfortunately.

@gvwilson
Copy link
Contributor

Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

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

No branches or pull requests

6 participants