{"action":"created","issue":{"url":"https://api.github.com/repos/flutter/flutter/issues/16412","repository_url":"https://api.github.com/repos/flutter/flutter","labels_url":"https://api.github.com/repos/flutter/flutter/issues/16412/labels{/name}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/16412/comments","events_url":"https://api.github.com/repos/flutter/flutter/issues/16412/events","html_url":"https://github.com/flutter/flutter/issues/16412","id":312837196,"number":16412,"title":"Android:FlutterView.getBitmap can't capture Image&Videos.","user":{"login":"kangwang1988","id":817851,"avatar_url":"https://avatars1.githubusercontent.com/u/817851?v=4","gravatar_id":"","url":"https://api.github.com/users/kangwang1988","html_url":"https://github.com/kangwang1988","followers_url":"https://api.github.com/users/kangwang1988/followers","following_url":"https://api.github.com/users/kangwang1988/following{/other_user}","gists_url":"https://api.github.com/users/kangwang1988/gists{/gist_id}","starred_url":"https://api.github.com/users/kangwang1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kangwang1988/subscriptions","organizations_url":"https://api.github.com/users/kangwang1988/orgs","repos_url":"https://api.github.com/users/kangwang1988/repos","events_url":"https://api.github.com/users/kangwang1988/events{/privacy}","received_events_url":"https://api.github.com/users/kangwang1988/received_events","type":"User","site_admin":false},"labels":[{"id":616970319,"url":"https://api.github.com/repos/flutter/flutter/labels/customer%20blocker","name":"customer blocker","color":"900000","default":false},{"id":745671419,"url":"https://api.github.com/repos/flutter/flutter/labels/customer:%20gold","name":"customer: gold","color":"D4AF37","default":false}],"state":"open","locked":false,"assignee":{"login":"chinmaygarde","id":44085,"avatar_url":"https://avatars1.githubusercontent.com/u/44085?v=4","gravatar_id":"","url":"https://api.github.com/users/chinmaygarde","html_url":"https://github.com/chinmaygarde","followers_url":"https://api.github.com/users/chinmaygarde/followers","following_url":"https://api.github.com/users/chinmaygarde/following{/other_user}","gists_url":"https://api.github.com/users/chinmaygarde/gists{/gist_id}","starred_url":"https://api.github.com/users/chinmaygarde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chinmaygarde/subscriptions","organizations_url":"https://api.github.com/users/chinmaygarde/orgs","repos_url":"https://api.github.com/users/chinmaygarde/repos","events_url":"https://api.github.com/users/chinmaygarde/events{/privacy}","received_events_url":"https://api.github.com/users/chinmaygarde/received_events","type":"User","site_admin":false},"assignees":[{"login":"chinmaygarde","id":44085,"avatar_url":"https://avatars1.githubusercontent.com/u/44085?v=4","gravatar_id":"","url":"https://api.github.com/users/chinmaygarde","html_url":"https://github.com/chinmaygarde","followers_url":"https://api.github.com/users/chinmaygarde/followers","following_url":"https://api.github.com/users/chinmaygarde/following{/other_user}","gists_url":"https://api.github.com/users/chinmaygarde/gists{/gist_id}","starred_url":"https://api.github.com/users/chinmaygarde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chinmaygarde/subscriptions","organizations_url":"https://api.github.com/users/chinmaygarde/orgs","repos_url":"https://api.github.com/users/chinmaygarde/repos","events_url":"https://api.github.com/users/chinmaygarde/events{/privacy}","received_events_url":"https://api.github.com/users/chinmaygarde/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2018-04-10T09:14:16Z","updated_at":"2018-04-21T11:58:49Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## Steps to Reproduce\r\n\r\nClone code at: git@github.com:FlutterRepo/flutter_app.git\r\n\r\nClick \"Snapshot\" Button in the AppBar\r\n\r\nFlutterView.getBitmap will be called and an Image will be saved.However, the image seems to be missing images and videos.\r\n\r\nApp:\r\n![screenshot_20180410-170551](https://user-images.githubusercontent.com/817851/38547690-52a6bf3e-3ce2-11e8-9a2f-7b9f3a593bd4.jpg)\r\nSnapshot:\r\n![snapshot](https://user-images.githubusercontent.com/817851/38547699-58c964f2-3ce2-11e8-80be-45eb22c78f49.jpg)\r\n\r\n\r\nPlease tell us what you were doing and what went wrong. If you are running flutter tools from the command line, please try adding the `-v` or `--verbose` option to gather more information.\r\n\r\nIf the problem is with your application's rendering, please attach a screenshot and any relevant source code.\r\nIf you are getting an exception in the logs, and your code is implicated in the first few frames, then please include the source code for the functions involved.\r\n\r\n## Logs\r\n\r\nRun your application with `flutter run` and attach all the log output.\r\n\r\nRun `flutter analyze` and attach any output of that command also.\r\n\r\n## Flutter Doctor\r\n\r\nPaste the output of running `flutter doctor -v` here.\r\n\r\nKyleWongdeMacBook-Pro:flutter_app kylewong$  flutter doctor -v\r\n[✓] Flutter (Channel beta, v0.2.8, on Mac OS X 10.13.4 17E199, locale en-CN)\r\n    • Flutter version 0.2.8 at /Users/kylewong/Downloads/flutter\r\n    • Framework revision b397406561 (8 days ago), 2018-04-02 13:53:20 -0700\r\n    • Engine revision c903c217a1\r\n    • Dart version 2.0.0-dev.43.0.flutter-52afcba357\r\n\r\n[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)\r\n    • Android SDK at /Users/kylewong/Library/Android/sdk\r\n    • Android NDK at /Users/kylewong/Library/Android/sdk/ndk-bundle\r\n    • Platform android-27, build-tools 27.0.3\r\n    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java\r\n    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)\r\n    • All Android licenses accepted.\r\n\r\n[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)\r\n    • Xcode at /Applications/Xcode.app/Contents/Developer\r\n    • Xcode 9.3, Build version 9E145\r\n    • ios-deploy 1.9.2\r\n    • CocoaPods version 1.2.0\r\n\r\n[✓] Android Studio (version 3.1)\r\n    • Android Studio at /Applications/Android Studio.app/Contents\r\n    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)\r\n\r\n[✓] Connected devices (1 available)\r\n    • MHA AL00 • GWY7N16B02004245 • android-arm64 • Android 8.0.0 (API 26)\r\n\r\n• No issues found!\r\n\r\n> For more information about diagnosing and reporting Flutter bugs, please see [https://flutter.io/bug-reports/](https://flutter.io/bug-reports/)."},"comment":{"url":"https://api.github.com/repos/flutter/flutter/issues/comments/383289635","html_url":"https://github.com/flutter/flutter/issues/16412#issuecomment-383289635","issue_url":"https://api.github.com/repos/flutter/flutter/issues/16412","id":383289635,"user":{"login":"kangwang1988","id":817851,"avatar_url":"https://avatars1.githubusercontent.com/u/817851?v=4","gravatar_id":"","url":"https://api.github.com/users/kangwang1988","html_url":"https://github.com/kangwang1988","followers_url":"https://api.github.com/users/kangwang1988/followers","following_url":"https://api.github.com/users/kangwang1988/following{/other_user}","gists_url":"https://api.github.com/users/kangwang1988/gists{/gist_id}","starred_url":"https://api.github.com/users/kangwang1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kangwang1988/subscriptions","organizations_url":"https://api.github.com/users/kangwang1988/orgs","repos_url":"https://api.github.com/users/kangwang1988/repos","events_url":"https://api.github.com/users/kangwang1988/events{/privacy}","received_events_url":"https://api.github.com/users/kangwang1988/received_events","type":"User","site_admin":false},"created_at":"2018-04-21T11:58:49Z","updated_at":"2018-04-21T11:58:49Z","author_association":"CONTRIBUTOR","body":"Update:\r\nFlutterView.getBitmap may cause memory leak, and result in OOM.\r\nWe found dozens of crash with stacktrace saying:\r\ncrash堆栈：\r\n    00 pc 0004a720  /system/lib/libc.so (tgkill+12)\r\n    01 pc 00047eb3  /system/lib/libc.so (pthread_kill+34)\r\n    02 pc 0001d955  /system/lib/libc.so (raise+10)\r\n    03 pc 000194a1  /system/lib/libc.so (__libc_android_abort+34)\r\n    04 pc 000170e4  /system/lib/libc.so (abort+4)\r\n    05 pc 0031059d  /system/lib/libart.so (art::Runtime::Abort()+252)\r\n    06 pc 000a9f77  /system/lib/libart.so (art::LogMessage::~LogMessage()+866)\r\n    07 pc 00329f7f  /system/lib/libart.so (art::Thread::AssertNoPendingException() const+602)\r\n    08 pc 00181219  /system/lib/libart.so (art::gc::Heap::AllocateInternalWithGc(art::Thread*, art::gc::AllocatorType, bool, unsigned int, unsigned int*, unsigned int*, unsigned int*, art::mirror::Class**)+32)\r\n    09 pc 000f5b6f  /system/lib/libart.so (art::mirror::Object* art::gc::Heap::AllocLargeObject(art::Thread*, art::mirror::Class**, unsigned int, art::mirror::SetLengthVisitor const&)+706)\r\n    10 pc 000f4c61  /system/lib/libart.so (art::mirror::Object* art::gc::Heap::AllocObjectWithAllocator(art::Thread*, art::mirror::Class*, unsigned int, art::gc::AllocatorType, art::mirror::SetLengthVisitor const&)+72)\r\n    11 pc 000d6cd9  /system/lib/libart.so (art::mirror::PrimitiveArray::Alloc(art::Thread*, unsigned int)+72)\r\n    12 pc 00276015  /system/lib/libart.so (_jintArray* art::JNI::NewPrimitiveArray<_jintArray*, art::mirror::PrimitiveArray >(_JNIEnv*, int)+412)\r\n    13 pc 00050fe3  /data/app/com.fish.fish-1/lib/arm/libflutter.so\r\n    14 pc 00052aff  /data/app/com.fish.fish-1/lib/arm/libflutter.so\r\n    15 pc 000599e1  /data/app/com.fish.fish-1/lib/arm/libflutter.so\r\n    16 pc 0005c223  /data/app/com.fish.fish-1/lib/arm/libflutter.so\r\n    17 pc 00011ee3  /vendor/lib/libutils.so (android::Looper::pollInner(int)+614)\r\n    18 pc 00011bef  /vendor/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+26)\r\n    19 pc 0000a683  /system/lib/libandroid.so (ALooper_pollOnce+50)\r\n    20 pc 0005c1df  /data/app/com.fish.fish-1/lib/arm/libflutter.so\r\n    21 pc 00059a6d  /data/app/com.fish.fish-1/lib/arm/libflutter.so\r\n    22 pc 0005ae15  /data/app/com.fish.fish-1/lib/arm/libflutter.so\r\n    23 pc 00047983  /system/lib/libc.so (__pthread_start(void*)+22)\r\n    24 pc 00019efd  /system/lib/libc.so (__start_thread+6)\r\n--------------------------------------------------------------------------------------------------------------------------------------------------\r\n可疑日志：\r\n    W  art   Throwing OutOfMemoryError \"Failed to allocate a 13916172 byte allocation with 6929272 free bytes and 6MB until OOM\"\r\n    F  art   art/runtime/thread.cc:1663] No pending exception expected: java.lang.OutOfMemoryError: Failed to allocate a 13916172 byte allocation with 6929272 free bytes and 6MB until OOM\r\n    F  art   art/runtime/thread.cc:1663] (Throwable with empty stack trace)\r\n    F  art   art/runtime/runtime.cc:408] Runtime aborting...\r\n\r\nWhen I comment out all call for FlutterView.getBitmap, it works fine. But when I use it,even when I just call it and don't use the result Bitmap in android to render, this OOM error will appear. So I doubt that call for this method could course memory leak. \r\n@chinmaygarde \r\n@eseidelGoogle "}}
{"actor":{"display_login":"kangwang1988"}}