Plotly.js: ScatterGL plot fails with WebGL errors if more than 16 symbols are used.

Created on 11 Mar 2020  Â·  14Comments  Â·  Source: plotly/plotly.js

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.

bug regression ♥ NEEDS SPON$OR

All 14 comments

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?

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

Could you please investigate if this is a regression?

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.

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

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

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

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.

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.

It appears to be fixed in latest since v1.54.2 via https://github.com/plotly/plotly.js/pull/4881.
@brian428 please confirm.

@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/

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.

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deecay picture deecay  Â·  3Comments

n-riesco picture n-riesco  Â·  3Comments

WG- picture WG-  Â·  3Comments

tim-sauchuk picture tim-sauchuk  Â·  3Comments

mithi picture mithi  Â·  3Comments