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

NPE with Picasso #4

Open
rusmichal opened this issue Mar 2, 2017 · 1 comment
Open

NPE with Picasso #4

rusmichal opened this issue Mar 2, 2017 · 1 comment

Comments

@rusmichal
Copy link

Hello I use your CookieCutterImageView with Picasso to load image.

Usage in fragment:

Picasso.with(getContext()).load(uri).into(cutterImageView);

But I got error:

Process: com.mooduplabs.qrcontacts, PID: 26824
                  java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.Bitmap android.graphics.drawable.BitmapDrawable.getBitmap()' on a null object reference
                      at com.adamstyrc.cookiecutter.CookieCutterImageView.getBitmap(CookieCutterImageView.java:171)
                      at com.adamstyrc.cookiecutter.CookieCutterImageView.setImageCentered(CookieCutterImageView.java:75)
                      at com.adamstyrc.cookiecutter.CookieCutterImageView.onImageLoaded(CookieCutterImageView.java:69)
                      at com.adamstyrc.cookiecutter.CookieCutterImageView.access$000(CookieCutterImageView.java:21)
                      at com.adamstyrc.cookiecutter.CookieCutterImageView$1.onGlobalLayout(CookieCutterImageView.java:61)
                      at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:986)
                      at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2206)
                      at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1297)
                      at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7011)
                      at android.view.Choreographer$CallbackRecord.run(Choreographer.java:777)
                      at android.view.Choreographer.doCallbacks(Choreographer.java:590)
                      at android.view.Choreographer.doFrame(Choreographer.java:560)
                      at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763)
                      at android.os.Handler.handleCallback(Handler.java:739)
                      at android.os.Handler.dispatchMessage(Handler.java:95)
                      at android.os.Looper.loop(Looper.java:145)
                      at android.app.ActivityThread.main(ActivityThread.java:6938)
                      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:1404)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
@dave-kennedy
Copy link

This is still occurring with version 1.0.2.

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