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

android.graphics.Bitmap.getWidth()' on a null object reference #128

Open
dondell opened this issue Jun 29, 2020 · 1 comment
Open

android.graphics.Bitmap.getWidth()' on a null object reference #128

dondell opened this issue Jun 29, 2020 · 1 comment

Comments

@dondell
Copy link

dondell commented Jun 29, 2020

There's no clue how the error happen.

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:748)
at com.mikhaellopez.circularimageview.CircularImageView.bitmapDrawableToBitmap(CircularImageView.kt:452)
at com.mikhaellopez.circularimageview.CircularImageView.drawableToBitmap(CircularImageView.kt:430)
at com.mikhaellopez.circularimageview.CircularImageView.loadBitmap(CircularImageView.kt:329)
at com.mikhaellopez.circularimageview.CircularImageView.onDraw(CircularImageView.kt:222)
at android.view.View.draw(View.java:17541)
at android.view.View.updateDisplayListIfDirty(View.java:16534)
at android.view.View.draw(View.java:17310)
at android.view.ViewGroup.drawChild(ViewGroup.java:3926)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716)
at android.view.View.updateDisplayListIfDirty(View.java:16529)
at android.view.View.draw(View.java:17310)
at android.view.ViewGroup.drawChild(ViewGroup.java:3926)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716)
at android.view.View.draw(View.java:17544)
at android.view.View.updateDisplayListIfDirty(View.java:16534)
at android.view.View.draw(View.java:17310)
at android.view.ViewGroup.drawChild(ViewGroup.java:3926)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716)
at android.view.View.draw(View.java:17544)
at android.view.View.updateDisplayListIfDirty(View.java:16534)
at android.view.View.draw(View.java:17310)
at android.view.ViewGroup.drawChild(ViewGroup.java:3926)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716)
at android.view.View.updateDisplayListIfDirty(View.java:16529)
at android.view.View.draw(View.java:17310)
at android.view.ViewGroup.drawChild(ViewGroup.java:3926)
at androidx.drawerlayout.widget.DrawerLayout.drawChild(DrawerLayout.java:1426)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716)
at android.view.View.updateDisplayListIfDirty(View.java:16529)
at android.view.View.draw(View.java:17310)
at android.view.ViewGroup.drawChild(ViewGroup.java:3926)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716)
at android.view.View.updateDisplayListIfDirty(View.java:16529)
at android.view.View.draw(View.java:17310)
at android.view.ViewGroup.drawChild(ViewGroup.java:3926)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716)
at android.view.View.updateDisplayListIfDirty(View.java:16529)
at android.view.View.draw(View.java:17310)
at android.view.ViewGroup.drawChild(ViewGroup.java:3926)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716)
at android.view.View.updateDisplayListIfDirty(View.java:16529)
at android.view.View.draw(View.java:17310)
at android.view.ViewGroup.drawChild(ViewGroup.java:3926)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716)
at android.view.View.updateDisplayListIfDirty(View.java:16529)
at android.view.View.draw(View.java:17310)
at android.view.ViewGroup.drawChild(ViewGroup.java:3926)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716)
at android.view.View.draw(View.java:17544)
at com.android.internal.policy.PhoneWindow$DecorView.draw(PhoneWindow.java:3187)
at android.view.View.updateDisplayListIfDirty(View.java:16534)
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:3251)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3050)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2632)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1544)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7613)
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:7409)
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)

@Waheed388
Copy link

Getting the same error. My app is in production.

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

No branches or pull requests

2 participants