LuckSiege / PictureSelector

Picture Selector Library for Android or 图片选择器
Apache License 2.0
13.17k stars 2.99k forks source link

OOM异常 #2884

Open minorlai opened 3 months ago

minorlai commented 3 months ago

Current use version?

当前使用的版本是多少?

3.11.2

Will this problem occur in demo?

Demo能否复现这问题?

偶现。图片压缩库

Describe the problem or provide an error log?

描述问题或提供错误log?

Fatal Exception: java.lang.OutOfMemoryError
Failed to allocate a 134217744 byte allocation with 92842600 free bytes and 88MB until OOM, target footprint 268435456, growth limit 268435456
java.util.Arrays.copyOf (Arrays.java:3670)

java.io.ByteArrayOutputStream.write (ByteArrayOutputStream.java:156)
top.zibin.luban.Checker.toByteArray (Checker.java:201)
top.zibin.luban.Checker.isJPG (Checker.java:28)
top.zibin.luban.Engine.compress (Engine.java:76)
top.zibin.luban.Luban.compressReal (Luban.java:213)
top.zibin.luban.Luban.compress (Luban.java:194)
top.zibin.luban.Luban.access$1000 (Luban.java:23)
top.zibin.luban.Luban$1.run (Luban.java:146)
android.os.AsyncTask$SerialExecutor$1.run (AsyncTask.java:305)

java.lang.Thread.run (Thread.java:1012)
shihuai2018 commented 3 months ago

解了没,同样遇到

Mc-dashan commented 3 months ago

我昨天也遇到了,去手机相册里找那张图片没有找到,但是用框架就有那张图片。不知道怎么解决呢

shihuai2018 commented 3 months ago

这是来自QQ邮箱的自动回复邮件。 您好,我最近正在工作中,无法亲自回复您的邮件。我将在工作结束后,尽快给您回复。

Chase-Hao commented 1 month ago

开启压缩 并且设置忽略大小为1024 然后开启原图 只要图片大小比较大的就会出现这个报错 比如图片是79MB 或者80MB

shihuai2018 commented 1 month ago

这是来自QQ邮箱的自动回复邮件。 您好,我最近正在工作中,无法亲自回复您的邮件。我将在工作结束后,尽快给您回复。