Open hiteshdua1 opened 9 years ago
Strange. I will test it and keep you posted.
Here is the Log : java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.RectF com.caverock.androidsvg.SVG.getDocumentViewBox()' on a null object reference at com.eftimoff.androipathview.SvgUtils.rescaleCanvas(SvgUtils.java:129) at com.eftimoff.androipathview.SvgUtils.drawSvgAfter(SvgUtils.java:76) at com.eftimoff.androipathview.PathView.fillAfter(PathView.java:216) at com.eftimoff.androipathview.PathView.onDraw(PathView.java:204) at android.view.View.draw(View.java:15249) at android.view.View.updateDisplayListIfDirty(View.java:14185) at android.view.View.getDisplayList(View.java:14207) at android.view.View.draw(View.java:14977) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3200) at android.view.View.draw(View.java:15252) at android.view.View.updateDisplayListIfDirty(View.java:14185) at android.view.View.getDisplayList(View.java:14207) at android.view.View.draw(View.java:14977) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3200) at android.view.View.updateDisplayListIfDirty(View.java:14180) at android.view.View.getDisplayList(View.java:14207) at android.view.View.draw(View.java:14977) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3200) at android.view.View.updateDisplayListIfDirty(View.java:14180) at android.view.View.getDisplayList(View.java:14207) at android.view.View.draw(View.java:14977) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3200) at android.view.View.updateDisplayListIfDirty(View.java:14180) at android.view.View.getDisplayList(View.java:14207) at android.view.View.draw(View.java:14977) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3200) at android.view.View.updateDisplayListIfDirty(View.java:14180) at android.view.View.getDisplayList(View.java:14207) at android.view.View.draw(View.java:14977) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3200) at android.view.View.draw(View.java:15252) at android.widget.FrameLayout.draw(FrameLayout.java:598) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2650) at android.view.View.updateDisplayListIfDirty(View.java:14185) at android.view.View.getDisplayList(View.java:14207) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:273) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:279) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:318) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2560) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2382) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2012) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1084) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5990) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) at android.view.Choreographer.doCallbacks(Choreographer.java:580) at android.view.Choreographer.doFrame(Choreographer.java:550) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5343) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
I found the problem. It is destroying the SVG object when trying to fill after. I will fix it today and increase the version.
Sure that would be great ! (y)
Hi, what about update? It will be great if u can make this :)
Would love to see an update too!
@hdcoder @b3stia @waynesford Hey I will fix , sorry for the delay (2 months).
I have a question though : As VectorDrawable is up VectorDrawable
is it better to deprecate this library and create on for supporting PathVectorDrawable?
Unfortunately, VectorDrawable is only available for API 21+. I think it's probably better to just fix this bug. We've been using your library in production for quite some time now, and it's worked great, this has been the only bug that's come up for us!
Getting same error on device with android version 4.4.4
Using this logic to handle this bug -
PowerManager powerManager = (PowerManager)
getActivity().getSystemService(Context.POWER_SERVICE);
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
&& powerManager.isPowerSaveMode())
{
//Disable pathView here
}
[自动回复]已收到来信。
Hi, Once you have the project configured and running, It crashes when the phone is in Battery saving mode [android 5.1 ], Tested it on device Moto E 1st Gen android.