Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

calcChord obbject missing properties crash #30

Closed
secretrobotron opened this issue Mar 3, 2014 · 7 comments
Closed

calcChord obbject missing properties crash #30

secretrobotron opened this issue Mar 3, 2014 · 7 comments

Comments

@secretrobotron
Copy link

https://github.com/Polymer/PointerGestures/blob/master/src/pinch.js#L141 causes a JS exception in Firefox Nightly. Somehow, https://github.com/Polymer/PointerGestures/blob/master/src/pinch.js#L135 always fails, because clientX and clientY are equivalent from a and b.

@secretrobotron
Copy link
Author

Changing https://github.com/Polymer/PointerGestures/blob/master/src/pinch.js#L135 to if (d >= dist) { fixes the crash, but I'm not sure it's a valid solve.

@dfreedm
Copy link
Contributor

dfreedm commented Mar 4, 2014

Were you using touch in Firefox Nightly? I haven't tested that scenario. There could be some missing properties from their Touch implementation.

@secretrobotron
Copy link
Author

AFAIK, no. I was just using a wireless trackpad for my macbook. Wouldn't be surprised if Firefox was missing some Touch properties, but I'm not sure it impacts the math here.

@bergie
Copy link

bergie commented Mar 7, 2014

This might be the reason for jquery-archive/PEP#131. PointerGestures seem to crash the app quite a bit also with PhoneGap/Mobile Chrome Apps on KitKat.

@bergie
Copy link

bergie commented Mar 7, 2014

@secretrobotron I just tried that patch on our mobile chrome app, and it definitely didn't help. We end up passing a lot of NaNs around

@secretrobotron
Copy link
Author

@bergie interesting. Maybe there's another problem. The problem I noticed was on desktop, but it might manifest differently on mobile. Can you confirm that the values that are returned from calcChord are NaN? Maybe another branch should return 0s if certain conditions are not met.

@bergie
Copy link

bergie commented Mar 7, 2014

@secretrobotron see some debugging data at jquery-archive/PEP#131 from @jonnor. We also provided an Android debug build of the app. But we'll be happy to debug further as needed.

dfreedm added a commit that referenced this issue Mar 7, 2014
@dfreedm dfreedm closed this as completed Aug 12, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants