askerov / DynamicGrid

Drag and drop GridView for Android
Apache License 2.0
925 stars 287 forks source link

Fatal Exception: java.lang.ArrayIndexOutOfBoundsException length=4; index=4 #79

Open paatz04 opened 8 years ago

paatz04 commented 8 years ago

Hi,

a lot of our users are experiencing a crash and unfortunately we'r not able to reproduce it on our devices.

Here is the crashlog:

Fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=4; index=4 at android.util.PathParser$PathDataNode.addCommand(PathParser.java:380) 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:1187) at android.view.View.draw(View.java:16219) at android.view.View.updateDisplayListIfDirty(View.java:15139) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.draw(View.java:16222) at android.view.View.updateDisplayListIfDirty(View.java:15139) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.draw(View.java:16222) at android.view.View.updateDisplayListIfDirty(View.java:15139) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.widget.AbsListView.dispatchDraw(AbsListView.java:3082) at com.company.owner.job.dynamicgrid.DynamicGridView.dispatchDraw(DynamicGridView.java:1162) at android.view.View.draw(View.java:16222) at android.widget.AbsListView.draw(AbsListView.java:5986) at android.view.View.updateDisplayListIfDirty(View.java:15139) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.updateDisplayListIfDirty(View.java:15134) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.updateDisplayListIfDirty(View.java:15134) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.updateDisplayListIfDirty(View.java:15134) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.updateDisplayListIfDirty(View.java:15134) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.updateDisplayListIfDirty(View.java:15134) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.draw(View.java:16222) at android.widget.FrameLayout.draw(FrameLayout.java:592) at android.widget.ScrollView.draw(ScrollView.java:2488) at android.view.View.updateDisplayListIfDirty(View.java:15139) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.draw(View.java:16222) at android.view.View.updateDisplayListIfDirty(View.java:15139) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.updateDisplayListIfDirty(View.java:15134) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.support.design.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1077) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.draw(View.java:16222) at android.view.View.updateDisplayListIfDirty(View.java:15139) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.updateDisplayListIfDirty(View.java:15134) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.updateDisplayListIfDirty(View.java:15134) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.updateDisplayListIfDirty(View.java:15134) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.updateDisplayListIfDirty(View.java:15134) at android.view.View.getDisplayList(View.java:15162) at android.view.View.draw(View.java:15940) at android.view.ViewGroup.drawChild(ViewGroup.java:3703) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3497) at android.view.View.draw(View.java:16222) at android.widget.FrameLayout.draw(FrameLayout.java:592) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2932) at android.view.View.updateDisplayListIfDirty(View.java:15139) at android.view.View.getDisplayList(View.java:15162) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:275) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:281) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:320) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2751) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2584) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2176) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1191) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6642) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:777) at android.view.Choreographer.doCallbacks(Choreographer.java:590) at android.view.Choreographer.doFrame(Choreographer.java:560) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5951) at java.lang.reflect.Method.invoke(Method.java) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

Thanks for any help or advice !

ninetyone commented 8 years ago

This errors occurs when SVG's are converted to XML's using http://inloop.github.io/svg2android/. The actual cause of the error is, e- pathData values in the generated xml's. You can try changing those values. Similar issue:

paatz04 commented 8 years ago

Thanks for helping out! I never actually used the tool tho. I used the vector import from android studio. Is there a way I can find out which XML is causing the issue?

ninetyone commented 8 years ago

Try to find 'e-' in the entire project. In my case it was because of 'e-'. You error might be caused by some other mathematical notation, but worth giving it a shot.

Similar issue: (https://github.com/inloop/svg2android/issues/25)