{"action":"created","issue":{"url":"https://api.github.com/repos/Sunzxyong/Tiny/issues/9","repository_url":"https://api.github.com/repos/Sunzxyong/Tiny","labels_url":"https://api.github.com/repos/Sunzxyong/Tiny/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/Sunzxyong/Tiny/issues/9/comments","events_url":"https://api.github.com/repos/Sunzxyong/Tiny/issues/9/events","html_url":"https://github.com/Sunzxyong/Tiny/issues/9","id":225266715,"number":9,"title":"OOM 反馈","user":{"login":"cjcj125125","id":20206579,"avatar_url":"https://avatars0.githubusercontent.com/u/20206579?v=3","gravatar_id":"","url":"https://api.github.com/users/cjcj125125","html_url":"https://github.com/cjcj125125","followers_url":"https://api.github.com/users/cjcj125125/followers","following_url":"https://api.github.com/users/cjcj125125/following{/other_user}","gists_url":"https://api.github.com/users/cjcj125125/gists{/gist_id}","starred_url":"https://api.github.com/users/cjcj125125/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjcj125125/subscriptions","organizations_url":"https://api.github.com/users/cjcj125125/orgs","repos_url":"https://api.github.com/users/cjcj125125/repos","events_url":"https://api.github.com/users/cjcj125125/events{/privacy}","received_events_url":"https://api.github.com/users/cjcj125125/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-04-29T16:05:23Z","updated_at":"2017-04-30T09:03:16Z","closed_at":null,"body":"您好，非常感谢您上次回答我的疑问，看了你的demo后我实现了加载图片，速度也还可以，但是在我虚拟机上出现了oom，具体错误如下：\r\n Alloc concurrent mark sweep GC freed 0(0B) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/99MB, paused 265us total 10.030ms\r\nI/art: WaitForGcToComplete blocked for 255.761ms for cause Alloc\r\nI/art: Starting a blocking GC Alloc\r\nI/art: Waiting for a blocking GC Alloc\r\nI/art: Waiting for a blocking GC Alloc\r\nI/art: Waiting for a blocking GC Alloc\r\nI/art: Waiting for a blocking GC Alloc\r\nI/art: Waiting for a blocking GC Alloc\r\nW/art: Throwing OutOfMemoryError \"Failed to allocate a 28 byte allocation with 0 free bytes and 3GB until OOM\" (recursive case)\r\nI/art: Waiting for a blocking GC Alloc\r\nW/art: \"tiny-compress-thread-4\" prio=5 tid=27 Runnable\r\nW/art:   | group=\"main\" sCount=0 dsCount=0 obj=0x22c0f820 self=0xded82a00\r\nW/art:   | sysTid=8819 nice=0 cgrp=default sched=0/0 handle=0xdc1fa930\r\nW/art:   | state=R schedstat=( 2617287020 851805915 3970 ) utm=93 stm=168 core=1 HZ=100\r\nW/art:   | stack=0xdc0f8000-0xdc0fa000 stackSize=1038KB\r\nW/art:   | held mutexes= \"mutator lock\"(shared held)\r\nW/art:   native: #00 pc 0058b0e2  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::ArtMethod*, void*)+226)\r\nW/art:   native: #01 pc 00551c3e  /system/lib/libart.so (art::Thread::ThrowOutOfMemoryError(char const*)+542)\r\nW/art:   native: #02 pc 0029b73d  /system/lib/libart.so (art::gc::Heap::ThrowOutOfMemoryError(art::Thread*, unsigned int, art::gc::AllocatorType)+1559)\r\nW/art:   native: #03 pc 002a4ad2  /system/lib/libart.so (art::gc::Heap::AllocateInternalWithGc(art::Thread*, art::gc::AllocatorType, unsigned int, unsigned int*, unsigned int*, unsigned int*, art::mirror::Class**)+5218)\r\nW/art:   native: #04 pc 001a185d  /system/lib/libart.so (art::mirror::Class::AllocObject(art::Thread*)+1677)\r\nW/art:   native: #05 pc 0054db66  /system/lib/libart.so (art::Thread::ThrowNewWrappedException(char const*, char const*)+774)\r\nW/art:   native: #06 pc 00551cfa  /system/lib/libart.so (art::Thread::ThrowOutOfMemoryError(char const*)+730)\r\nW/art:   native: #07 pc 0029b73d  /system/lib/libart.so (art::gc::Heap::ThrowOutOfMemoryError(art::Thread*, unsigned int, art::gc::AllocatorType)+1559)\r\nW/art:   native: #08 pc 002a4ad2  /system/lib/libart.so (art::gc::Heap::AllocateInternalWithGc(art::Thread*, art::gc::AllocatorType, unsigned int, unsigned int*, unsigned int*, unsigned int*, art::mirror::Class**)+5218)\r\nW/art:   native: #09 pc 00445884  /system/lib/libart.so (art::mirror::String::AllocFromModifiedUtf8(art::Thread*, int, char const*)+2420)\r\nW/art:   native: #10 pc 0044635d  /system/lib/libart.so (art::mirror::String::AllocFromModifiedUtf8(art::Thread*, char const*)+47)\r\nW/art:   native: #11 pc 00408aec  /system/lib/libart.so (art::JNI::NewStringUTF(_JNIEnv*, char const*)+540)\r\nW/art:   native: #12 pc 0017c545  /system/lib/libart.so (art::CheckJNI::NewStringUTF(_JNIEnv*, char const*)+632)\r\nW/art:   native: #13 pc 000dd23e  /system/lib/libandroid_runtime.so (getMimeTypeString(_JNIEnv*, SkImageDecoder::Format)+94)\r\nW/art:   native: #14 pc 000ddedd  /system/lib/libandroid_runtime.so (???)\r\nW/art:   native: #15 pc 000de8b5  /system/lib/libandroid_runtime.so (???)\r\nW/art:   native: #16 pc 00d29a32  /data/dalvik-cache/x86/system@framework@boot.oat (Java_android_graphics_BitmapFactory_nativeDecodeByteArray___3BIILandroid_graphics_BitmapFactory_00024Options_2+182)\r\nW/art:   native: #17 pc 0184c747  /dev/ashmem/dalvik-main space 1 (deleted) (???)\r\nW/art:     at android.graphics.BitmapFactory.nativeDecodeByteArray(Native method)\r\nW/art:     at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:522)\r\nW/art:     at com.zxy.tiny.core.BitmapCompressor.sampleCompress(BitmapCompressor.java:201)\r\nW/art:     at com.zxy.tiny.core.BitmapCompressor.compress(BitmapCompressor.java:84)\r\nW/art:     at com.zxy.tiny.callable.BitmapCompressCallableTasks$UriAsBitmapCallable$1.callback(BitmapCompressCallableTasks.java:102)\r\nW/art:     at com.zxy.tiny.core.HttpUrlConnectionFetcher.fetch(HttpUrlConnectionFetcher.java:82)\r\nW/art:     at com.zxy.tiny.callable.BitmapCompressCallableTasks$UriAsBitmapCallable.call(BitmapCompressCallableTasks.java:99)\r\nW/art:     at com.zxy.tiny.callable.BitmapCompressCallableTasks$UriAsBitmapCallable.call(BitmapCompressCallableTasks.java:87)\r\nW/art:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)\r\nW/art:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)\r\nW/art:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)\r\nW/art:     at com.zxy.tiny.core.CompressThreadFactory$1.run(CompressThreadFactory.java:28)\r\nW/art:     at java.lang.Thread.run(Thread.java:818)\r\nD/skia: --- OOM in getMimeTypeString()\r\nI/art: Waiting for a blocking GC Alloc\r\nI/art: Clamp target GC heap from 115MB to 99MB\r\nI/art: Alloc partial concurrent mark sweep GC freed 0(0B) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/99MB, paused 618us total 16.222ms\r\nI/art: WaitForGcToComplete blocked for 48.670ms for cause Alloc\r\nI/art: Starting a blocking GC Alloc\r\nI/art: Waiting for a blocking GC Alloc"},"comment":{"url":"https://api.github.com/repos/Sunzxyong/Tiny/issues/comments/298220494","html_url":"https://github.com/Sunzxyong/Tiny/issues/9#issuecomment-298220494","issue_url":"https://api.github.com/repos/Sunzxyong/Tiny/issues/9","id":298220494,"user":{"login":"Sunzxyong","id":8722849,"avatar_url":"https://avatars3.githubusercontent.com/u/8722849?v=3","gravatar_id":"","url":"https://api.github.com/users/Sunzxyong","html_url":"https://github.com/Sunzxyong","followers_url":"https://api.github.com/users/Sunzxyong/followers","following_url":"https://api.github.com/users/Sunzxyong/following{/other_user}","gists_url":"https://api.github.com/users/Sunzxyong/gists{/gist_id}","starred_url":"https://api.github.com/users/Sunzxyong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sunzxyong/subscriptions","organizations_url":"https://api.github.com/users/Sunzxyong/orgs","repos_url":"https://api.github.com/users/Sunzxyong/repos","events_url":"https://api.github.com/users/Sunzxyong/events{/privacy}","received_events_url":"https://api.github.com/users/Sunzxyong/received_events","type":"User","site_admin":false},"created_at":"2017-04-30T09:03:16Z","updated_at":"2017-04-30T09:03:16Z","body":"Demo中为了比较原图与压缩后的效果，所以直接加载了原图，你是否直接加载了原图，如果是那将可能会oom"}}
{"actor":{"display_login":"Sunzxyong"}}