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

Picasso call crushes the app with no stacktrace #33

Closed
lexer opened this issue May 21, 2013 · 12 comments
Closed

Picasso call crushes the app with no stacktrace #33

lexer opened this issue May 21, 2013 · 12 comments

Comments

@lexer
Copy link

lexer commented May 21, 2013

My app crushes every time when I call .into method. No stacktrace is available.

The only thing I see is:

05-21 14:06:40.728: ASSERT/libc(13236): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 13581 (pool-5-thread-7)

For some reasons it doesn't crush on Galaxy S2, but crushes on LG Nexus 4.

Image i try to load is: https://graph.facebook.com/100004056647322/picture?type=large

@dnkoutso
Copy link
Collaborator

Have you tried creating a sample empty app that downloads the same image? I recommend doing so first and see if you can reproduce it then.

I'll take a look tonight or tomorrow and see if I can reproduce it.

@lexer
Copy link
Author

lexer commented May 22, 2013

Sample app crushes too with this url:

// Trigger the download of the URL asynchronously into the image view.
Picasso.with(context) //
    .load("https://graph.facebook.com/100004056647322/picture?type=large") //
    .placeholder(R.drawable.placeholder) //
    .error(R.drawable.error) //
    .transform(cropSquare) //
    .into(view);

I tried another url and it works fine. So there is definitely some kind of problem with specific images like mine example.

05-22 13:42:29.094: ERROR/AndroidRuntime(22448): FATAL EXCEPTION: main
java.lang.IllegalArgumentException: Cannot draw recycled bitmaps
at android.view.GLES20Canvas.drawBitmap(GLES20Canvas.java:789)
at android.view.GLES20RecordingCanvas.drawBitmap(GLES20RecordingCanvas.java:118)
at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:393)
at com.squareup.picasso.PicassoDrawable.draw(PicassoDrawable.java:162)
at android.widget.ImageView.onDraw(ImageView.java:967)
at android.view.View.draw(View.java:13712)
at android.view.View.getDisplayList(View.java:12650)
at android.view.View.getDisplayList(View.java:12694)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
at android.view.View.getDisplayList(View.java:12588)
at android.view.View.getDisplayList(View.java:12694)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
at android.view.View.getDisplayList(View.java:12588)
at android.view.View.getDisplayList(View.java:12694)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
at android.view.View.getDisplayList(View.java:12588)
at android.view.View.getDisplayList(View.java:12694)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
at android.view.View.getDisplayList(View.java:12588)
at android.view.View.getDisplayList(View.java:12694)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
at android.view.View.getDisplayList(View.java:12588)
at android.view.View.getDisplayList(View.java:12694)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
at android.view.View.getDisplayList(View.java:12588)
at android.view.View.getDisplayList(View.java:12694)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1198)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2173)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2045)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1854)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
at android.view.Choreographer.doCallbacks(Choreographer.java:562)
at android.view.Choreographer.doFrame(Choreographer.java:532)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)

@dnkoutso
Copy link
Collaborator

Innnnteresting. I will take a look today and see if I can reproduce it! Thanks!

@cesards
Copy link

cesards commented May 22, 2013

@lexer same problem here.

I also use Nexus 4 Device and it crashes without stacktrace. Here my code, from broadcast receiver:

Picasso.with(ItemDetailsActivity.this).load(item.getImage()).centerCrop().into(imageView);

@dnkoutso
Copy link
Collaborator

Confirmed. I have found and fixed the problem.

#40

@lexer
Copy link
Author

lexer commented May 22, 2013

Sample now works but my app still crushes on same image. Seems that my original issues was caused by another reason.

I don't do any transformations. Just call load and into.

@cesards
Copy link

cesards commented May 26, 2013

@dnkoutso @lexer My application still doesn't work. I updated to lib 1.0.2 but I got nothing... only stack trace in my broadcast receiver:

java.lang.RuntimeException: Error receiving broadcast Intent { act=com.menor.android.ggassignment.intent.action.SUCCESS flg=0x10 (has extras) } in com.menor.android.ggassignment.ui.ItemDetailsActivity$ResponseDetailsReceiver@417eadb8
1at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:768)
2at android.os.Handler.handleCallback(Handler.java:725)
3at android.os.Handler.dispatchMessage(Handler.java:92)
4at android.os.Looper.loop(Looper.java:137)
5at android.app.ActivityThread.main(ActivityThread.java:5041)
6at java.lang.reflect.Method.invokeNative(Native Method)
7at java.lang.reflect.Method.invoke(Method.java:511)
8at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
9at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
10at dalvik.system.NativeStart.main(Native Method)
11Caused by: java.lang.IllegalStateException: Center crop can only be used after calling resize.
12at com.squareup.picasso.RequestBuilder.centerCrop(RequestBuilder.java:181)
13at com.menor.android.ggassignment.ui.ItemDetailsActivity$ResponseDetailsReceiver.onReceive(ItemDetailsActivity.java:125)
14at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:758)
15... 9 more

@dnkoutso
Copy link
Collaborator

Look at the stacktrace. It tells you you have to perform a resize transformation in order to use center crop.

@cesards
Copy link

cesards commented May 26, 2013

@dnkoutso I didn't realize of that... sorry.

@lexer
Copy link
Author

lexer commented May 30, 2013

Seems that my crush somehow connected with OkHttp. Recently when I moved my own image loader implementation to OkHttp I start facing the same problem.

@lexer
Copy link
Author

lexer commented May 30, 2013

Seems that this issue relates to square/okhttp#184

@aaroncray
Copy link

Turn off hardware acceleration for the activity and that should fix your issue. This seems to be an open issue with Android 4.0-4.1.2 (causing issues on my samsung galaxy s3 test phone for my own application)

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

5 participants