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

OutOfMemoryError #190

Open
aleksandrmozgovoi opened this issue Oct 14, 2021 · 0 comments
Open

OutOfMemoryError #190

aleksandrmozgovoi opened this issue Oct 14, 2021 · 0 comments

Comments

@aleksandrmozgovoi
Copy link

Hi, on a Samsung device, you get large photos and crash when compressed. How to fix this problem?

java.lang.OutOfMemoryError: Failed to allocate a 47616780 byte allocation with 16777216 free bytes and 43MB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.Bitmap.nativeCreate(Native Method) at android.graphics.Bitmap.createBitmap(Bitmap.java:975) at android.graphics.Bitmap.createBitmap(Bitmap.java:946) at android.graphics.Bitmap.createBitmap(Bitmap.java:877) at id.zelory.compressor.UtilKt.determineImageRotation(Util.kt:78) at id.zelory.compressor.UtilKt.loadBitmap(Util.kt:34) at id.zelory.compressor.constraint.SizeConstraint.satisfy(SizeConstraint.kt:28) at id.zelory.compressor.Compressor$compress$3.invokeSuspend(Compressor.kt:28) at id.zelory.compressor.Compressor$compress$3.invoke(Compressor.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89) at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165) at kotlinx.coroutines.BuildersKt.withContext(Unknown Source) at id.zelory.compressor.Compressor.compress(Compressor.kt:23) at id.zelory.compressor.Compressor.compress$default(Compressor.kt:22) ...

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

1 participant