ivpusic / react-native-image-crop-picker

iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping
MIT License
6.08k stars 1.55k forks source link

[Android] Image not shown after taking a picture #1465

Open rukmanary opened 3 years ago

rukmanary commented 3 years ago

Version

Platform

Expected behaviour

Open Camera => Take A Picture => Picture Result Shown for Cropping

Actual behaviour

Open Camera => Take A Picture => Black Picture (The picture is not shown)

Steps to reproduce

  1. Choose Open Camera

  2. Take A Picture

  3. Image should shown here but I only get black blank picture

Device

-Oppo A5s -Android Version 8.1.0

I just updated this lib from v0.25.0 to v0.34.1. In the previous version, everything is fine except I can't render image on iOS. So, I thought a little upgrade can solved that and it did, but I got this new issue instead. Can anyone help me, please?

EDIT

I once again upgrade it to the latest version v0.35.1 and the issue is still there. Here's the thing: I run in another device (Android 9), it does shown the image. I also check on my friend's project, we use the same version of this library and React Native. His App shown the image... why my Apps didn't show anything?: photo_2020-11-16 20 26 44

MikeOsborn commented 3 years ago

This project uses uCrop for the cropping of images. The blank screen you are seeing is likely due to an out of memory error. Check your logs to be sure. I've filed an issue with uCrop here regarding that.

rukmanary commented 3 years ago

This project uses uCrop for the cropping of images. The blank screen you are seeing is likely due to an out of memory error. Check your logs to be sure. I've filed an issue with uCrop here regarding that.

But I install 2 apps with the same React Native version, the same library version, even the same gradle version. In my app, it shows like this, a blank screen. But in the second app, it shown the picture.

What do you mean "out of memory"? is it the phone memory?

LeonardodeLima commented 3 years ago

same issue on samsung j5 prime

react native: 0.61.2 react-native-image-crop-picker: 0.33.2

@rukmanary downgrade to version 0.29.0, works for me.

rukmanary commented 3 years ago

same issue on samsung j5 prime

react native: 0.61.2 react-native-image-crop-picker: 0.33.2

@rukmanary downgrade to version 0.29.0, works for me.

version 0.29.0 does not support Android X or later

sadeghte commented 3 years ago

same issue on samsung Note3

react native: 0.63.3 react-native-image-crop-picker: 0.35.1

================== system logs ================

01-17 01:07:30.514: E/ActivityThread(7994): Activity com.sec.android.gallery3d.app.Gallery has leaked IntentReceiver com.sec.android.gallery3d.app.GalleryCoverMode$2@165b6b80 that was originally registered here. Are you missing a call to unregisterReceiver()? 01-17 01:07:30.514: E/ActivityThread(7994): android.app.IntentReceiverLeaked: Activity com.sec.android.gallery3d.app.Gallery has leaked IntentReceiver com.sec.android.gallery3d.app.GalleryCoverMode$2@165b6b80 that was originally registered here. Are you missing a call to unregisterReceiver()? 01-17 01:07:30.514: E/ActivityThread(7994): at android.app.LoadedApk$ReceiverDispatcher.(LoadedApk.java:960) 01-17 01:07:30.514: E/ActivityThread(7994): at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:761) 01-17 01:07:30.514: E/ActivityThread(7994): at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:2002) 01-17 01:07:30.514: E/ActivityThread(7994): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1982) 01-17 01:07:30.514: E/ActivityThread(7994): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1976) 01-17 01:07:30.514: E/ActivityThread(7994): at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:503) 01-17 01:07:30.514: E/ActivityThread(7994): at com.sec.android.gallery3d.app.GalleryCoverMode.registerReceiverGlobal(GalleryCoverMode.java:265) 01-17 01:07:30.514: E/ActivityThread(7994): at com.sec.android.gallery3d.app.GalleryCoverMode.setCoverMode(GalleryCoverMode.java:72) 01-17 01:07:30.514: E/ActivityThread(7994): at com.sec.android.gallery3d.app.GalleryCoverMode.(GalleryCoverMode.java:68) 01-17 01:07:30.514: E/ActivityThread(7994): at com.sec.android.gallery3d.app.Gallery.initialize(Gallery.java:350) 01-17 01:07:30.514: E/ActivityThread(7994): at com.sec.android.gallery3d.app.Gallery$6.handleMessage(Gallery.java:1378) 01-17 01:07:30.514: E/ActivityThread(7994): at android.os.Handler.dispatchMessage(Handler.java:102) 01-17 01:07:30.514: E/ActivityThread(7994): at android.os.Looper.loop(Looper.java:145) 01-17 01:07:30.514: E/ActivityThread(7994): at android.app.ActivityThread.main(ActivityThread.java:5938) 01-17 01:07:30.514: E/ActivityThread(7994): at java.lang.reflect.Method.invoke(Native Method) 01-17 01:07:30.514: E/ActivityThread(7994): at java.lang.reflect.Method.invoke(Method.java:372) 01-17 01:07:30.514: E/ActivityThread(7994): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400) 01-17 01:07:30.514: E/ActivityThread(7994): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195) 01-17 01:07:30.714: E/WindowState(793): getStack: Window{f8cbc3e u0 com.whatsapp/com.whatsapp.Conversation} couldn't find taskId=32421 Callers=com.android.server.wm.WindowState.computeFrameLw:1050 com.android.internal.policy.impl.PhoneWindowManager.layoutWindowLw:4924 com.android.server.wm.WindowManagerService.performLayoutLockedInner:10880 com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLockedInner:11814 01-17 01:07:30.714: E/WindowState(793): getStack: Window{f8cbc3e u0 com.whatsapp/com.whatsapp.Conversation} couldn't find taskId=32421 Callers=com.android.server.wm.WindowState.computeFrameLw:1050 com.android.internal.policy.impl.PhoneWindowManager.layoutWindowLw:4924 com.android.server.wm.WindowManagerService.performLayoutLockedInner:10880 com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLockedInner:11814 01-17 01:07:30.774: E/SMD(300): DCD OFF 01-17 01:07:31.244: E/art(18019): Throwing OutOfMemoryError "Failed to allocate a 51121164 byte allocation with 16777216 free bytes and 42MB until OOM" 01-17 01:07:31.244: E/BitmapLoadUtils(18019): transformBitmap: 01-17 01:07:31.244: E/BitmapLoadUtils(18019): java.lang.OutOfMemoryError: Failed to allocate a 51121164 byte allocation with 16777216 free bytes and 42MB until OOM 01-17 01:07:31.244: E/BitmapLoadUtils(18019): at dalvik.system.VMRuntime.newNonMovableArray(Native Method) 01-17 01:07:31.244: E/BitmapLoadUtils(18019): at android.graphics.Bitmap.nativeCreate(Native Method) 01-17 01:07:31.244: E/BitmapLoadUtils(18019): at android.graphics.Bitmap.createBitmap(Bitmap.java:939) 01-17 01:07:31.244: E/BitmapLoadUtils(18019): at android.graphics.Bitmap.createBitmap(Bitmap.java:912) 01-17 01:07:31.244: E/BitmapLoadUtils(18019): at android.graphics.Bitmap.createBitmap(Bitmap.java:843) 01-17 01:07:31.244: E/BitmapLoadUtils(18019): at com.yalantis.ucrop.util.BitmapLoadUtils.transformBitmap(BitmapLoadUtils.java:46) 01-17 01:07:31.244: E/BitmapLoadUtils(18019): at com.yalantis.ucrop.task.BitmapLoadTask.doInBackground(BitmapLoadTask.java:140) 01-17 01:07:31.244: E/BitmapLoadUtils(18019): at com.yalantis.ucrop.task.BitmapLoadTask.doInBackground(BitmapLoadTask.java:36) 01-17 01:07:31.244: E/BitmapLoadUtils(18019): at android.os.AsyncTask$2.call(AsyncTask.java:288) 01-17 01:07:31.244: E/BitmapLoadUtils(18019): at java.util.concurrent.FutureTask.run(FutureTask.java:237) 01-17 01:07:31.244: E/BitmapLoadUtils(18019): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 01-17 01:07:31.244: E/BitmapLoadUtils(18019): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 01-17 01:07:31.244: E/BitmapLoadUtils(18019): at java.lang.Thread.run(Thread.java:818)

rukmanary commented 3 years ago

any updates?

shaikhsiddik commented 3 years ago

any updates?

tianzige666 commented 3 years ago

i have the save problem, do you fix???? help...

AsrarNoorani commented 2 years ago

Any update on this ?

mashad6 commented 1 year ago

any update on this, facing the same error still