Skip to content
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

scattergl crashes with one marker #1164

Closed
cpsievert opened this issue Nov 17, 2016 · 12 comments · Fixed by #1168
Closed

scattergl crashes with one marker #1164

cpsievert opened this issue Nov 17, 2016 · 12 comments · Fixed by #1168
Labels
bug something broken
Milestone

Comments

@cpsievert
Copy link

http://codepen.io/cpsievert/pen/QGGMej

I originally discovered problems re-creating updating this page to use v1.20.0 -- http://cpsievert.github.io/pedestrians/stl-tour/

I get different errors depending on whether viewing in Chrome or Firefox...

@etpinard
Copy link
Contributor

part of #130

@cpsievert
Copy link
Author

I assume you're saying this example falls under this category:

cartesian + gl2d subplot on the same graph are not supported

But this is not a subplot...they are 2 different graphs on the same page

@cpsievert cpsievert reopened this Nov 17, 2016
@etpinard
Copy link
Contributor

What's the problem? I don't see any console errors?

@cpsievert
Copy link
Author

cpsievert commented Nov 17, 2016

Do you see errors for the second link? For the codepen, you have to uncomment this line:

//"mode": "markers",

When I do that, it freezes my browser tab in Chrome

@rreusser
Copy link
Contributor

@cpsievert I'm able to get it to crash with this simplified case involving just one plot: http://codepen.io/rsreusser/pen/woorOo?editors=0010

Plotly.plot('graph1', [{
  "x": [1],
  "y": [1],
  "mode": "markers",
  //"type": "scattergl"
}]);

Perhaps it's a problem with length-one traces?

@etpinard
Copy link
Contributor

Interesting. Maybe @dfcreative would be interested in looking into this.

@etpinard etpinard added the bug something broken label Nov 17, 2016
@etpinard etpinard added this to the On-par gl2d milestone Nov 17, 2016
@cpsievert
Copy link
Author

Yea, @rreusser, that is probably the real issue here...and now that second link is now rendering ok for me...I must be seeing things!!

@etpinard
Copy link
Contributor

@cpsievert thanks for the report!

Sorry about that hasty close. I must be going blind.

@cpsievert cpsievert changed the title Problems mixing scatter and scattergl on the same page scattergl crashes with one marker Nov 17, 2016
@LukeFarrawell
Copy link

This bug was introduced in 1.19.0.

I noticed the bug a fair few days ago, but I did not have the time to dig into why the scatterplot kept crashing when I started to receive data.

After finally getting free times after finishing my exams for the semester, I finally found out it was due to adding 1 data point. Opened up the issue tab to post a codepen with the issue to find out someone beat me to it.

@etpinard
Copy link
Contributor

@monfera looks like one of your patches caused this regression. Would you mind sharing some insights on why this could be happening?

@monfera
Copy link
Contributor

monfera commented Nov 18, 2016

It seems that the simultaneous presence of these conditions cause the browser tab to hang:

  1. We have a regular (SVG based) scatter plot
  2. Its mode is markers (problem doesn't come up if it's markers+lines
  3. There's only one data point
  4. We then switch to scattergl

Initial thoughts: apparently, it requires a switch into the non-fancy scattergl version. Perhaps a domain projection gets into a degenerate case with one data point (domain high and low values are the same) - though this condition wouldn't be new. The most recent change only impacted the return value - pick index offset - of the render function, so maybe it's related to some downstream effect of that.

@monfera
Copy link
Contributor

monfera commented Nov 18, 2016

Update: it seems to be an earlier regression, working on it now.

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

Successfully merging a pull request may close this issue.

5 participants