team-supercharge / ShimmerLayout

DEPRECATED - Memory efficient shimmering effect for Android applications by Supercharge.
Apache License 2.0
2.52k stars 284 forks source link

Crash on Meizu 16th device #70

Open kuFEAR opened 5 years ago

kuFEAR commented 5 years ago

Hi. I faced with Crash on Meizu 16th device

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.Matrix.set(android.graphics.Matrix)' on a null object reference
       at android.graphics.Shader.copyLocalMatrix(Shader.java:159)
       at android.graphics.LinearGradient.copy(LinearGradient.java:129)
       at android.graphics.ComposeShader.copy(ComposeShader.java:96)
       at android.graphics.Shader.mzReversalCopy(Shader.java:134)
       at com.meizu.nightmode.MzNightModeManager.beforeDrawColor(MzNightModeManager.java:651)
       at com.meizu.nightmode.MzNightModeManager.beforeDrawColor(MzNightModeManager.java:631)
       at android.view.RecordingCanvas.drawRect(RecordingCanvas.java:622)
       at io.supercharge.shimmerlayout.ShimmerLayout.drawShimmer(ShimmerLayout.java:261)
       at io.supercharge.shimmerlayout.ShimmerLayout.dispatchDrawShimmer(ShimmerLayout.java:250)
       at io.supercharge.shimmerlayout.ShimmerLayout.dispatchDraw(ShimmerLayout.java:106)
       at android.view.View.draw(View.java:19239)
       at android.view.View.updateDisplayListIfDirty(View.java:18180)
       at android.view.View.draw(View.java:18958)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
       at android.view.View.draw(View.java:19239)
       at android.view.View.updateDisplayListIfDirty(View.java:18180)
       at android.view.View.draw(View.java:18958)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
       at android.view.View.updateDisplayListIfDirty(View.java:18171)
       at android.view.View.draw(View.java:18958)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
       at android.view.View.draw(View.java:19239)
       at android.view.View.updateDisplayListIfDirty(View.java:18180)
       at android.view.View.draw(View.java:18958)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
       at android.support.design.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1254)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
       at android.view.View.updateDisplayListIfDirty(View.java:18171)
       at android.view.View.draw(View.java:18958)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
       at android.view.View.updateDisplayListIfDirty(View.java:18171)
       at android.view.View.draw(View.java:18958)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
       at android.view.View.updateDisplayListIfDirty(View.java:18171)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
       at android.view.View.updateDisplayListIfDirty(View.java:18139)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
       at android.view.View.updateDisplayListIfDirty(View.java:18139)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
       at android.view.View.updateDisplayListIfDirty(View.java:18139)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
       at android.view.View.updateDisplayListIfDirty(View.java:18139)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
       at android.view.View.updateDisplayListIfDirty(View.java:18139)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
       at android.view.View.updateDisplayListIfDirty(View.java:18139)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
       at android.view.View.updateDisplayListIfDirty(View.java:18139)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
       at android.view.View.updateDisplayListIfDirty(View.java:18139)
       at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:705)
       at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:803)
       at android.view.ViewRootImpl.draw(ViewRootImpl.java:3025)
       at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2828)
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2375)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1408)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6853)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:979)
       at android.view.Choreographer.doCallbacks(Choreographer.java:791)
       at android.view.Choreographer.doFrame(Choreographer.java:726)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:965)
       at android.os.Handler.handleCallback(Handler.java:790)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6707)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
winstonvk commented 5 years ago

Bump issue We have the same behavior

veghtomi commented 5 years ago

@kuFEAR thanks for reporting the issue. I would like to ask that can you reproduce it and provide me code where this happens?

MaximPestryakov commented 5 years ago

@veghtomi Just enable "Night Mode" (I suppose it comes out of the box on chinese version) and start demo app in this repo

kataCai commented 5 years ago

@kuFEAR I faced with Crash on Meizu 16th device too. Has you solved this problem?

kuFEAR commented 5 years ago

@caihanyuan No I don't, and I decide to refuse using the library

JasonLian2020 commented 5 years ago

@veghtomi Hi. Same device. Meizu 16TH, Android 8.1.0. We have the same behavior.

JasonLian2020 commented 5 years ago

Crash log

    java.lang.NullPointerException
    Attempt to invoke virtual method 'void android.graphics.Matrix.set(android.graphics.Matrix)' on a null object reference
    com.meizu.nightmode.MzNightModeManager.beforeDrawColor(MzNightModeManager.java:706)

    android.graphics.Shader.copyLocalMatrix(Shader.java:159)
    android.graphics.LinearGradient.copy(LinearGradient.java:129)
    android.graphics.ComposeShader.copy(ComposeShader.java:96)
    android.graphics.Shader.mzReversalCopy(Shader.java:134)
    com.meizu.nightmode.MzNightModeManager.beforeDrawColor(MzNightModeManager.java:706)
    com.meizu.nightmode.MzNightModeManager.beforeDrawColor(MzNightModeManager.java:686)
    android.view.RecordingCanvas.drawRect(RecordingCanvas.java:622)
    io.supercharge.shimmerlayout.ShimmerLayout.void drawShimmer(android.graphics.Canvas)(TbsSdkJava:261)
    io.supercharge.shimmerlayout.ShimmerLayout.void dispatchDrawShimmer(android.graphics.Canvas)(TbsSdkJava:250)
    io.supercharge.shimmerlayout.ShimmerLayout.void dispatchDraw(android.graphics.Canvas)(TbsSdkJava:106)
    android.view.View.draw(View.java:19240)
    android.view.View.updateDisplayListIfDirty(View.java:18180)
    android.view.View.draw(View.java:18958)
    android.view.ViewGroup.drawChild(ViewGroup.java:4236)
    android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
    android.view.View.draw(View.java:19240)
    android.support.v4.widget.NestedScrollView.draw(TbsSdkJava:1819)
    android.view.View.updateDisplayListIfDirty(View.java:18180)
    android.view.View.draw(View.java:18958)
    android.view.ViewGroup.drawChild(ViewGroup.java:4236)
    android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
    android.view.View.updateDisplayListIfDirty(View.java:18171)
    android.view.View.draw(View.java:18958)
    android.view.ViewGroup.drawChild(ViewGroup.java:4236)
    android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
    android.view.View.updateDisplayListIfDirty(View.java:18171)
    android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
    android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
    android.view.View.updateDisplayListIfDirty(View.java:18139)
    android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
    android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
    android.view.View.updateDisplayListIfDirty(View.java:18139)
    android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
    android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
    android.view.View.updateDisplayListIfDirty(View.java:18139)
    android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
    android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
    android.view.View.updateDisplayListIfDirty(View.java:18139)
    android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
    android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
    android.view.View.updateDisplayListIfDirty(View.java:18139)
    android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
    android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
    android.view.View.updateDisplayListIfDirty(View.java:18139)
    android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
    android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
    android.view.View.updateDisplayListIfDirty(View.java:18139)
    android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
    android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
    android.view.View.updateDisplayListIfDirty(View.java:18139)
    android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
    android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
    android.view.View.updateDisplayListIfDirty(View.java:18139)
    android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
    android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
    android.view.View.updateDisplayListIfDirty(View.java:18139)
    android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
    android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
    android.view.View.updateDisplayListIfDirty(View.java:18139)
    android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4220)
    android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4200)
    android.view.View.updateDisplayListIfDirty(View.java:18139)
    android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:689)
    android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:695)
    android.view.ThreadedRenderer.draw(ThreadedRenderer.java:803)
    android.view.ViewRootImpl.draw(ViewRootImpl.java:3025)
    android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2828)
    android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2375)
    android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1408)
    android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6852)
    android.view.Choreographer$CallbackRecord.run(Choreographer.java:979)
    android.view.Choreographer.doCallbacks(Choreographer.java:791)
    android.view.Choreographer.doFrame(Choreographer.java:726)
    android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:965)
    android.os.Handler.handleCallback(Handler.java:790)
    android.os.Handler.dispatchMessage(Handler.java:99)
    android.os.Looper.loop(Looper.java:164)
    android.app.ActivityThread.main(ActivityThread.java:6707)
    java.lang.reflect.Method.invoke(Native Method)
    com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
veghtomi commented 5 years ago

Sorry guys, do not have time so far. I will check it after the holidays!

DymanZy commented 5 years ago

same behavior, is related to "night mode" of Meizu?

xiaoxing1992 commented 5 years ago

same behavior, is related to "night mode" of Meizu?

ArmedYang commented 5 years ago

same behavior, did there has any solution so far?

zsaCHG commented 5 years ago

meet same behavior too. all the phone brand is Meizu. stack trace : java.lang.NullPointerException: Attempt to read from field 'int android.view.View.mViewFlags' on a null object reference at android.view.ViewGroup.null dispatchGetDisplayList(null)(ViewGroup.java:4359) at android.view.View.null updateDisplayListIfDirty(null)(View.java:18211) at android.view.ViewGroup.null recreateChildDisplayList(null)(ViewGroup.java:4380) at android.view.ViewGroup.null dispatchGetDisplayList(null)(ViewGroup.java:4360) at android.view.View.null updateDisplayListIfDirty(null)(View.java:18211) at android.view.ViewGroup.null recreateChildDisplayList(null)(ViewGroup.java:4380) at android.view.ViewGroup.null dispatchGetDisplayList(null)(ViewGroup.java:4360) at android.view.View.null updateDisplayListIfDirty(null)(View.java:18211) at android.view.ViewGroup.null recreateChildDisplayList(null)(ViewGroup.java:4380) at android.view.ViewGroup.null dispatchGetDisplayList(null)(ViewGroup.java:4360) at android.view.View.null updateDisplayListIfDirty(null)(View.java:18211) at android.view.ThreadedRenderer.null updateViewTreeDisplayList(null)(ThreadedRenderer.java:676) at android.view.ThreadedRenderer.null updateRootDisplayList(null)(ThreadedRenderer.java:682) at android.view.ThreadedRenderer.null draw(null)(ThreadedRenderer.java:790) at android.view.ViewRootImpl.null draw(null)(ViewRootImpl.java:3101) at android.view.ViewRootImpl.null performDraw(null)(ViewRootImpl.java:2894) at android.view.ViewRootImpl.null performTraversals(null)(ViewRootImpl.java:2447) at android.view.ViewRootImpl.null doTraversal(null)(ViewRootImpl.java:1456) at android.view.ViewRootImpl$TraversalRunnable.null run(null)(ViewRootImpl.java:6964) at android.view.Choreographer$CallbackRecord.null run(null)(Choreographer.java:932) at android.view.Choreographer.null doCallbacks(null)(Choreographer.java:744) at android.view.Choreographer.null doFrame(null)(Choreographer.java:676) at android.view.Choreographer$FrameDisplayEventReceiver.null run(null)(Choreographer.java:918) at android.os.Handler.null handleCallback(null)(Handler.java:790) at android.os.Handler.null dispatchMessage(null)(Handler.java:99) at android.os.Looper.null loop(null)(Looper.java:192) at android.app.ActivityThread.null main(null)(ActivityThread.java:6809) at java.lang.reflect.Method.null invoke(null)(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.null run(null)(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.null main(null)(ZygoteInit.java:825)

JasonLian2020 commented 5 years ago

@veghtomi

XcJKing commented 5 years ago

@veghtomi i have the same !

hljwang3874149 commented 4 years ago

same behavior

Tukesboy commented 2 years ago

Is there a solution?