fresco icon indicating copy to clipboard operation
fresco copied to clipboard

Load local image cause some problem on version 0.6.0

Open taolulu opened this issue 11 years ago • 8 comments

Usually appear at the second(or more) time, when I try to load images at same place. Activity crashed, no error log printed. It’s ok when I use the version 0.4.0.

taolulu avatar Aug 07 '15 13:08 taolulu

Are you sure that there is no stacktrace output in the logcat?

plamenko avatar Aug 07 '15 15:08 plamenko

No logcat with Android studio. I was track this problem by device monitor, then I realized it's a strict mode problem:

E/StrictMode(19309): A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks. E/StrictMode(19309): java.lang.Throwable: Explicit termination method 'close' not called E/StrictMode(19309): at dalvik.system.CloseGuard.open(CloseGuard.java:184) E/StrictMode(19309): at java.io.FileInputStream.(FileInputStream.java:80) E/StrictMode(19309): at com.facebook.imagepipeline.producers.LocalFetchProducer$3.get(LocalFetchProducer.java:128) E/StrictMode(19309): at com.facebook.imagepipeline.producers.LocalFetchProducer$3.get(LocalFetchProducer.java:124) E/StrictMode(19309): at com.facebook.imagepipeline.image.EncodedImage.getInputStream(EncodedImage.java:145) E/StrictMode(19309): at com.facebook.imagepipeline.image.EncodedImage.parseMetaData(EncodedImage.java:280) E/StrictMode(19309): at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:61) E/StrictMode(19309): at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:56) E/StrictMode(19309): at com.facebook.common.executors.StatefulRunnable.run(StatefulRunnable.java:45) E/StrictMode(19309): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) E/StrictMode(19309): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) E/StrictMode(19309): at java.lang.Thread.run(Thread.java:841)

It not trigger any problem in the release mode.

taolulu avatar Aug 08 '15 03:08 taolulu

same issue with my testing. if load the local image and slide quickly, we can reproduce it every time.

08-08 22:31:01.941 4778-4944/com.facebook.samples.comparison E/JHEAD﹕ can't open '/storage/emulated/0/DCIM/Camera/杉原杏璃_059 - 副本.jpg' 08-08 22:31:01.951 4778-4778/com.facebook.samples.comparison E/Surface﹕ dequeueBuffer failed (Invalid argument) 08-08 22:31:01.951 4778-4778/com.facebook.samples.comparison E/ViewRootImpl﹕ Could not lock surface java.lang.IllegalArgumentException at android.view.Surface.nativeLockCanvas(Native Method) at android.view.Surface.lockCanvas(Surface.java:253) at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2721) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2695) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2533) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2107) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1200) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6401) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:803) at android.view.Choreographer.doCallbacks(Choreographer.java:603) at android.view.Choreographer.doFrame(Choreographer.java:573) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:789) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:157) at android.app.ActivityThread.main(ActivityThread.java:5335) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081) at dalvik.system.NativeStart.main(Native Method)

Toolwiz avatar Aug 08 '15 14:08 Toolwiz

I have a same issue.#490.I think i describe detailed,but they still say "need detail"!!!!!!

somatezyc avatar Aug 10 '15 09:08 somatezyc

@somatezyc , this issue has nothing to do with the issue #490. Furthermore, @michalgr did ask you some additional questions there, which you have not answered so far.

The cause of this issue is related to a bug we are aware of, where a stream was not properly closed. This has been fixed and we will make a push some time today.

plamenko avatar Aug 10 '15 11:08 plamenko

Fixed in 0.6.1.

tyronen avatar Aug 10 '15 14:08 tyronen

@plamenko #490 fixed in 0.6.1,thanks! I think because this "Fixed file-descriptors issue".I'm sorry to forget anwer the questions.

somatezyc avatar Aug 11 '15 02:08 somatezyc

@plamenko The problem was solved, Thanks!

taolulu avatar Aug 11 '15 03:08 taolulu