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

stochastic bezier error during animation #375

Closed
jameshadfield opened this issue Jul 7, 2017 · 6 comments
Closed

stochastic bezier error during animation #375

jameshadfield opened this issue Jul 7, 2017 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@jameshadfield
Copy link
Member

This error still occurs, and the stack traces may be slightly different.

It occurs stochastically during animation of certain datasets. Currently present in ee77075 via live data at http://localhost:4000/flu/h3n2/ha/6y?c=region&r=region

@jameshadfield jameshadfield added the bug Something isn't working label Jul 7, 2017
@trvrb trvrb changed the title stochastic bezier animation during animation stochastic bezier error during animation Jul 8, 2017
@trvrb
Copy link
Member

trvrb commented Jul 8, 2017

Also occurring on Zika at 2016/01/31.

VM35162:66 Uncaught TypeError: Cannot read property '0' of undefined
    at Bezier (eval at <anonymous> (bundle.js:5172), <anonymous>:66:49)
    at extractLineSegmentForAnimationEffect (eval at <anonymous> (bundle.js:5172), <anonymous>:216:16)
    at SVGPathElement.eval (eval at <anonymous> (bundle.js:5172), <anonymous>:232:32)
    at SVGPathElement.attrFunction (eval at <anonymous> (bundle.js:3066), <anonymous>:669:21)
    at eval (eval at <anonymous> (bundle.js:3066), <anonymous>:962:16)
    at d3_selection_each (eval at <anonymous> (bundle.js:3066), <anonymous>:968:30)
    at Array.d3_selectionPrototype.each (eval at <anonymous> (bundle.js:3066), <anonymous>:961:12)
    at Array.d3_selectionPrototype.attr (eval at <anonymous> (bundle.js:3066), <anonymous>:652:17)
    at updateVisibility (eval at <anonymous> (bundle.js:5172), <anonymous>:231:4)
    at Map.maybeUpdateDemesAndTransmissions (eval at <anonymous> (bundle.js:5148), <anonymous>:345:46)

@jameshadfield
Copy link
Member Author

I'll fix this (or variants of it) as soon as I can reproduce it consistently. If anyone else gets this error please fix, as it requires a page refresh to get working again, and i'll be away for a bit.

@trvrb
Copy link
Member

trvrb commented Jul 10, 2017

This was consistently showing up on the last Zika build, but I updated the build on Sat with new USVI genomes. In doing so the error has disappeared. Not seeing it on other live builds. If someone finds a way to reproduce reliably, please ping the thread.

@jameshadfield
Copy link
Member Author

Thanks - I seem to have it consistently happening on current zika by playing through from start on medium speed

@jameshadfield
Copy link
Member Author

Fixed via try-catch. While this is not ideal, it works and will work for all cases. The root causes should be revisited by whoever re-writes the map / bezier code to address #381

@jameshadfield
Copy link
Member Author

P.S. the console logs each occurance of a bezier error so that we are aware of when it occurs.

jameshadfield added a commit that referenced this issue Jul 10, 2017
* animation-refactor:
  try / catch to fix bezier errors. Closes #375
  only import lodash functions which are actually used
  fix import statements
  remove unused transmissionPathLengths calcs. Should improve speed.
  dispatch play/pause button before map animation starts
  Cleanup code to shelve out a maybeGetTransmissionPair function
  Cleanup names and shelve off interchange into a function
  Duplicate map rather than triplicate
  Avoid unnecessary triplication in getLatLongs
  Remove unused colorBy
  Don't pass around controls, instead directly pass numDates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants