Luban
Luban copied to clipboard
SM-N9008V 5.0 异常类型: java.lang.OutOfMemoryError
java.lang.OutOfMemoryError: Failed to allocate a 9585228 byte allocation with 6982829 free bytes and 6MB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) at android.graphics.BitmapFactory.decodeStreamInternal(BitmapFactory.java:773) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:749) at top.zibin.luban.d.a(Engine.java:73) at top.zibin.luban.f.a(Luban.java:186) at top.zibin.luban.f.a(Luban.java:21) at top.zibin.luban.f$1.run(Luban.java:135) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)
AsyncTask #3(37502)
java.lang.OutOfMemoryError
Failed to allocate a 268435472 byte allocation with 25165824 free bytes and 115MB until OOM, target footprint 172214480, growth limit 268435456
解析原始 1 java.util.Arrays.copyOf(Arrays.java:3161) 2 java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118) 3 java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93) 4 java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153) 5 top.zibin.luban.Checker.byte[] toByteArray(java.io.InputStream)(Checker.java:204) 6 top.zibin.luban.Checker.boolean isJPG(java.io.InputStream)(Checker.java:44) 7 top.zibin.luban.Engine.java.io.File compress()(Engine.java:76) 8 top.zibin.luban.Luban.java.io.File compress(android.content.Context,top.zibin.luban.InputStreamProvider)(Luban.java:180) 9 top.zibin.luban.Luban.java.io.File access$700(top.zibin.luban.Luban,android.content.Context,top.zibin.luban.InputStreamProvider)(Luban.java:21) 10 top.zibin.luban.Luban$1.void run()(Luban.java:135) 11 android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:308) 12 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 13 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 14 java.lang.Thread.run(Thread.java:933)