android-ColorPickerPreference
android-ColorPickerPreference copied to clipboard
Fatal Exception: java.lang.NullPointerException
In some devices(OS: 6.0.1, Galaxy A7), error occurs.
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.isRecycled()' on a null object reference
at android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1310)
at android.graphics.Canvas.drawBitmap(Canvas.java:1445)
at net.margaritov.preference.colorpicker.AlphaPatternDrawable.draw(AlphaPatternDrawable.java:57)
at net.margaritov.preference.colorpicker.ColorPickerPanelView.onDraw(ColorPickerPanelView.java:86)
at android.view.View.draw(View.java:17526)
at android.view.View.updateDisplayListIfDirty(View.java:16519)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3910)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3890)
at android.view.View.updateDisplayListIfDirty(View.java:16479)
at android.view.View.draw(View.java:17295)
at android.view.ViewGroup.drawChild(ViewGroup.java:3926)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716)
at android.view.View.updateDisplayListIfDirty(View.java:16514)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3910)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3890)
at android.view.View.updateDisplayListIfDirty(View.java:16479)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3910)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3890)
at android.view.View.updateDisplayListIfDirty(View.java:16479)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3910)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3890)
at android.view.View.updateDisplayListIfDirty(View.java:16479)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:325)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:331)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:366)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:3234)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3033)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2615)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1528)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7530)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:686)
at android.view.Choreographer.doFrame(Choreographer.java:622)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:7329)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
@tree1891 are you still facing this issue?
yes
perform a git clone of the latest commit, open with android studio and run sample to test first, the issue might be because of an omission