Comments (4)
@zhangfeng86911 方便提供一下版本号,以及调用方式吗?
from advancedluban.
E/AndroidRuntime: FATAL EXCEPTION: RxComputationScheduler-3
Process: com.ikongjian.worker, PID: 12642
java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:59)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:154)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.OutOfMemoryError: Failed to allocate a 3244812 byte allocation with 2117648 free bytes and 2MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
at android.graphics.BitmapFactory.decodeStreamInternal(BitmapFactory.java:639)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:615)
at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:391)
at me.shaohui.advancedluban.Luban.compress(Luban.java:585)
at me.shaohui.advancedluban.Luban.compress(Luban.java:629)
at me.shaohui.advancedluban.Luban.customCompress(Luban.java:502)
at me.shaohui.advancedluban.Luban.compressImage(Luban.java:357)
at me.shaohui.advancedluban.Luban.access$200(Luban.java:42)
at me.shaohui.advancedluban.Luban$9.call(Luban.java:218)
at me.shaohui.advancedluban.Luban$9.call(Luban.java:215)
at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:69)
at rx.internal.util.ScalarSynchronousObservable$WeakSingleProducer.request(ScalarSynchronousObservable.java:276)
at rx.internal.operators.OperatorSubscribeOn$1$1$1.request(OperatorSubscribeOn.java:80)
at rx.Subscriber.setProducer(Subscriber.java:211)
at rx.internal.operators.OperatorSubscribeOn$1$1.setProducer(OperatorSubscribeOn.java:76)
at rx.internal.operators.OnSubscribeMap$MapSubscriber.setProducer(OnSubscribeMap.java:102)
at rx.internal.util.ScalarSynchronousObservable$JustOnSubscribe.call(ScalarSynchronousObservable.java:138)
at rx.internal.util.ScalarSynchronousObservable$JustOnSubscribe.call(ScalarSynchronousObservable.java:129)
at rx.Observable.unsafeSubscribe(Observable.java:10200)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
at rx.Observable.unsafeSubscribe(Observable.java:10200)
at rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)
at rx.internal.schedulers.EventLoopsScheduler$EventLoopWorker$1.call(EventLoopsScheduler.java:172)
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:154)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
多图压缩,遇到内存溢出,求解决!
from advancedluban.
换用最新版1.3.1,压缩模式选用CUSTOM_GEAR可以有效避免OOM的问题,还会再解决
from advancedluban.
好的我试试
from advancedluban.
Related Issues (20)
- 有些图片一直报这个错java.io.IOException: Invalid marker: 52什么情况 HOT 1
- Luban.CUSTOM_GEAR HOT 3
- THIRD_GEAR方式压缩特别慢
- 多图压缩,失败后跳过,或者返回失败的图片路径 HOT 3
- 增加缓存文件名API HOT 1
- 你好,有对含有旋转角度的图片做回正处理吗?
- File doesn't being compressed if the size is too small
- 请问支持Bitmap的压缩吗?
- 请问能停止或者取消压缩么?
- 图片压缩 上传损坏 HOT 1
- 怎么修改文件路径或者复制文件,都没用啊
- java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference HOT 3
- Invalid marker: 89 HOT 1
- Compressed image path HOT 1
- 会内存溢出
- OOM了
- Android 9.0 不能压缩成功了怎么回事呢?
- 适配android10吗 HOT 1
- 依赖无法下载了!
- Jcenter is deprecated , Do we have a plan on supporting other means 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 advancedluban.