Closed Ferdari closed 2 years ago
Would you please provide a demo project or sample code show how you use it?
I rechecked my code it happens when i click a button that opens an Ad and set a wait for ActivityResume, when the app resumes it crashes with the error privded, i deleted the Wait for and it are solved, no error.
Sorry but im using Basic4Android and a wrapper( that i wrapped) of your lib,
Again me, i checked again and the problem still there, i debuged line by line, on Activity create the Webps are loaded to imageviews and displays perfect, then i click button, it access other modules for checking data before displaying another activity, when accessing the modules it throws error every time other modules are working, SAME ERROR, then CRASH Activity. can you check it,
it appears to be when the imageviews are playing and shown but goes to background or the activity pauses. i don't know how to call it.
You can try version 2.17.0,I added some protection
You can try version 2.17.0,I added some protection
Thank you, i will try and reply back...
oh sorry for bothering again, can you publish the AAR to maven repository, my wrapper uses AAR file to work with, i downloaded you lib from here as AAR: https://mvnrepository.com/artifact/com.github.penfeizhou.android.animation/awebp
I dont know if hard to do, or can you tell me how. THANKS
I did publish to maven center. The synchronization need some time. You can download here. https://s01.oss.sonatype.org/content/repositories/releases/com/github/penfeizhou/android/animation/
Its perfect! no errors thrown now, only one thing weird happened, its like the the imageviews lost frames when resumed, like white white white frame white white frame. but not a problem right now, i can redraw/reload the views on resume.
Thanks a lot @penfeizhou, keep up the great work!
New Issue Checklist
Issue Info
Issue Description and Steps
Hi, i have loaded 10-20 animated webps, it displays perfect, but when click a button that opens another Activity or AD it crashes with error:
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.isRecycled()' on a null object reference at android.graphics.BaseCanvas.throwIfCannotDraw(BaseCanvas.java:65) at android.graphics.BaseCanvas.drawBitmap(BaseCanvas.java:113) at android.graphics.Canvas.drawBitmap(Canvas.java:1555) at com.github.penfeizhou.animation.webp.decode.AnimationFrame.draw(AnimationFrame.java:100) at com.github.penfeizhou.animation.webp.decode.AnimationFrame.draw(AnimationFrame.java:21) at com.github.penfeizhou.animation.webp.decode.WebPDecoder.renderFrame(WebPDecoder.java:147) at com.github.penfeizhou.animation.decode.FrameSeqDecoder.step(FrameSeqDecoder.java:505) at com.github.penfeizhou.animation.decode.FrameSeqDecoder.access$200(FrameSeqDecoder.java:36) at com.github.penfeizhou.animation.decode.FrameSeqDecoder$1.run(FrameSeqDecoder.java:60) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.os.HandlerThread.run(HandlerThread.java:67)
It happen with all kind of animated webp, i think when activity got paused. i tried LG V50 and ZTE V9