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

Crash on Battery Saver Mode #12

Open
hiteshdua1 opened this issue Sep 1, 2015 · 12 comments
Open

Crash on Battery Saver Mode #12

hiteshdua1 opened this issue Sep 1, 2015 · 12 comments
Assignees

Comments

@hiteshdua1
Copy link

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.

@geftimov geftimov added the bug label Sep 2, 2015
@geftimov geftimov self-assigned this Sep 2, 2015
@geftimov
Copy link
Owner

geftimov commented Sep 2, 2015

Strange. I will test it and keep you posted.

@hiteshdua1
Copy link
Author

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)

@geftimov
Copy link
Owner

geftimov commented Sep 8, 2015

I found the problem.
It is destroying the SVG object when trying to fill after.
I will fix it today and increase the version.

@hiteshdua1
Copy link
Author

Sure that would be great ! (y)

@b3stia
Copy link

b3stia commented Sep 17, 2015

Hi, what about update? It will be great if u can make this :)

@waynesford
Copy link

Would love to see an update too!

@geftimov
Copy link
Owner

@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?

@waynesford
Copy link

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!

geftimov added a commit that referenced this issue Nov 6, 2015
@Swati4star
Copy link

Getting same error on device with android version 4.4.4

@annshsingh
Copy link

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 
    }

@ccone1995
Copy link

ccone1995 commented Jan 25, 2024 via email

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

No branches or pull requests

8 participants
@hiteshdua1 @geftimov @b3stia @waynesford @Swati4star @ccone1995 @annshsingh and others