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

Scientific notation in vector XML Path throws IndexOutOfBoundsException #4

Closed
primax79 opened this issue Mar 14, 2016 · 2 comments
Closed

Comments

@primax79
Copy link

error.zip

In some Android version (es 5.0.2) scientific notation inside the xml crashes the app (maybe the locale of the app can be involved, the app were tested in italian)

My testers signaled a lot of crashes, I've found a lot of this exceptions inside Crashlytics

Fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=17; index=17 at android.util.PathParser$PathDataNode.addCommand(PathParser.java:370) at android.util.PathParser$PathDataNode.nodesToPath(PathParser.java:260) at android.graphics.drawable.VectorDrawable$VPath.toPath(VectorDrawable.java:1265) at android.graphics.drawable.VectorDrawable$VPathRenderer.drawPath(VectorDrawable.java:950) at android.graphics.drawable.VectorDrawable$VPathRenderer.drawGroupTree(VectorDrawable.java:931) at android.graphics.drawable.VectorDrawable$VPathRenderer.draw(VectorDrawable.java:938) at android.graphics.drawable.VectorDrawable$VectorDrawableState.updateCachedBitmap(VectorDrawable.java:705) at android.graphics.drawable.VectorDrawable.draw(VectorDrawable.java:280) at android.widget.ImageView.onDraw(ImageView.java:1166)

the generated XML contains some values expressed in scientific notation (eg. -5e-4 ). replacing them with stanard notation the app works perfectly

reference:
https://code.google.com/p/android/issues/detail?id=78162
http://stackoverflow.com/questions/33737192/android-vector-drawable-crash

@kuffs
Copy link

kuffs commented Mar 15, 2016

I also see this error.

@a-student
Copy link
Owner

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants