Comments (2)
OOM原因应该是Bitmap所占的内存太大了。
这是严重的bug,我会尽快修正这个bug并发布下一个版本。
from rximagepicker.
已修正。
问题发生的原因在于,0.3.0版本之前的@AsBitmap处理逻辑,将Uri转换为Bitmap时,并未进行压缩处理。这样会导致在多选图片时,过多的图片短时间同时转换为Bitmap对象,导致OOM的发生。
@AsBitmap和@AsFile有着导致程序 不可控行为 发生的可能性,这个情况在 基础库 中并未表现,随着拓展库的增加,该类型注解愈发暴露出问题。
以@AsBitmap 为例,这个注解会标记返回值为Bitmap类型,但是当用户在 知乎主题UI界面 点击选择 某个 视频文件 时,这可能会导致程序的 崩溃 。
这是有临时的解决方案的,比如可以建议开发者 在这种情况下仅配置 @AsUri注解,但是这毫无意义,一个有 限制性 的API意味着 架构设计的不足。
因此我考虑再三决定移除 该注解,修正后的版本(After 0.3.0),RxImagePicker都将默认返回Uri类型的数据,这样避免OOM的同时,方便开发者轻松处理不同类型的文件(image/video等等)。
遇到该问题的同学请尽快升级v0.3.0,更详细的调整请参考 更新日志
from rximagepicker.
Related Issues (20)
- 请问怎么控制打开选择activity的动画,比如从下往上弹起选择页面
- com.github.qingmei2:rximagepicker_support_wechat:2.5.6. Using this dependency gives error HOT 4
- 某些机型排序与系统相册排序不一致,从别的应用保存的图片不显示在最前方
- 图片加载引擎
- 使用系统相册多选怎么配置? HOT 1
- 屏幕旋转会崩溃 HOT 3
- 知乎主题图片选择器崩溃 HOT 4
- Unable to start activity 后台收集到崩溃日志,内容如下:有没有谁也遇到过该问题? HOT 10
- 如果带鲁班压缩就更好了
- bugly上崩溃日志java.lang.IllegalStateException cursor.getString(cursor.…UMN_BUCKET_DISPLAY_NAME)) must not be null HOT 2
- sync没问题,运行后报错 HOT 2
- bugly报错 HOT 1
- 已经选择的图片 如何再次回显到相册里
- 相机拍摄不会出现在Gallery里面
- 2.2.0版本自定义UI会闪退
- 请问有计划不使用rxjava 得版本嘛? 好像现在用kotlin不需要用到rxjava了 HOT 1
- fragment transaction error(?) issue(?) using androidx.fragment.app:1.3.0-alpha08
- 希望能有个 androidX 版本 HOT 1
- 希望出RxJava3的正式版
- 相机权限问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rximagepicker.