Issue 1:
Internal: b/140829173

Steps to Reproduce

Crashes are recorded by Firebase Crashlytics.

iOS 11 and 12.

Logs

crashed thread: io.flutter.1.io

Crashed: io.flutter.1.io
0 libGPUSupportMercury.dylib 0x21445cf28 gpus_ReturnNotPermittedKillClient + 12
1 AGXGLDriver 0x218c0b8c0 gldUpdateDispatch + 7216
2 libGPUSupportMercury.dylib 0x21445df04 gpusSubmitDataBuffers + 176
3 AGXGLDriver 0x218c0ce08 gldUpdateDispatch + 12664
4 Flutter 0x10112dd04 GrGLGpu::prepareTextureForCrossContextUsage(GrTexture*) + 120
5 Flutter 0x1011576a8 SkImage::MakeCrossContextFromEncoded(GrContext*, sk_sp<SkData>, bool, SkColorSpace*, bool) + 676
6 Flutter 0x100f61b08 std::__1::__function::__func<fml::internal::CopyableLambda<blink::(anonymous namespace)::InstantiateImageCodec(_Dart_NativeArguments*)::$_1>, std::__1::allocator<fml::internal::CopyableLambda<blink::(anonymous namespace)::InstantiateImageCodec(_Dart_NativeArguments*)::$_1> >, void ()>::operator()() + 1532
7 Flutter 0x100f5701c fml::MessageLoopImpl::RunExpiredTasks() + 1872
8 Flutter 0x100f58328 fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 32
9 CoreFoundation 0x1f759abf0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
10 CoreFoundation 0x1f759a920 __CFRunLoopDoTimer + 864
11 CoreFoundation 0x1f759a154 __CFRunLoopDoTimers + 248
12 CoreFoundation 0x1f7595030 __CFRunLoopRun + 1880
13 CoreFoundation 0x1f75945b8 CFRunLoopRunSpecific + 436
14 Flutter 0x100f581b4 fml::MessageLoopDarwin::Run() + 88
15 Flutter 0x100f57b00 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0> >(void*) + 272
16 libsystem_pthread.dylib 0x1f72252fc _pthread_body + 128
17 libsystem_pthread.dylib 0x1f722525c _pthread_start + 48
18 libsystem_pthread.dylib 0x1f7228d08 thread_start + 4

other threads:

io.flutter.1.ui
0 Flutter 0x1012f2858 bssl::ssl_crypto_x509_ssl_auto_chain_if_needed(bssl::SSL_HANDSHAKE*) + 426
1 Flutter 0x10128050c dart::bin::Builtin_SecurityContext_Allocate(_Dart_NativeArguments*) + 116
2 Flutter 0x1013acacc dart::NativeEntry::AutoScopeNativeCallWrapperNoStackCheck(_Dart_NativeArguments*, void (*)(_Dart_NativeArguments*)) + 444
3 Flutter 0x1013ad9fc dart::NativeEntry::LinkNativeCall(_Dart_NativeArguments*) + 3320
4 App 0x10232f5f8 Precompiled_Stub_CallBootstrapNative + 88
5 App 0x102403034 Precompiled__RawReceivePortImpl_1026248__closeInternal_1026248_1396 + 116
6 App 0x10299a378 Precompiled__SecurityContext_26069316_init_defaultContext_10866 + 88
7 App 0x10232f1e8 Precompiled_Stub_InvokeDartCode + 232
8 Flutter 0x101396000 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long) + 508
9 Flutter 0x101449b08 dart::DRT_InitStaticField(dart::NativeArguments) + 1020
10 App 0x10232f768 Precompiled_Stub_CallToRuntime + 104
11 App 0x102331704 Precompiled_Zone_get__current_7048458_9 + 100
12 App 0x10233163c Precompiled_Zone_get_current_8 + 60
13 App 0x1023ec54c Precompiled__RawSecureSocket_26069316__RawSecureSocket_26069316__1217 + 620
14 App 0x1023ec214 Precompiled__RawSecureSocket_26069316_connect_1216 + 1172
15 App 0x10250c9b0 Precompiled_RawSecureSocket_secure_3228 + 720
16 App 0x102515cac Precompiled_RawSecureSocket_startConnect__anonymous_closure___anonymous_closure__3300 + 204
17 App 0x102a07820 Precompiled__Closure_0150898_call_11532 + 128
18 App 0x102331b08 Precompiled__RootZone_7048458_runUnary_14 + 200
19 App 0x1023c8538 Precompiled__FutureListener_7048458_handleValue_978 + 376
20 App 0x1023c8f50 Precompiled__Future_7048458__propagateToListeners_7048458_handleValueCallback_987 + 144
21 App 0x102a078f8 Precompiled__Closure_0150898_call_11533 + 120
22 App 0x1023c4e10 Precompiled__Future_7048458__propagateToListeners_7048458_945 + 1648
23 App 0x1023ce510 Precompiled__Future_7048458__completeWithValue_7048458_1036 + 240
24 App 0x1023ce398 Precompiled__Future_7048458__asyncComplete_7048458__anonymous_closure__1035 + 184
25 App 0x102a078f8 Precompiled__Closure_0150898_call_11533 + 120
26 App 0x1023348a8 Precompiled_____microtaskLoop_7048458_49 + 200
27 App 0x1023346ac Precompiled_____startMicrotaskLoop_7048458_48 + 76
28 App 0x1023345d0 Precompiled_____startMicrotaskLoop_7048458__startMicrotaskLoop_7048458_47 + 112
29 App 0x10232f1e8 Precompiled_Stub_InvokeDartCode + 232
30 Flutter 0x101396000 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long) + 508
31 Flutter 0x10148d120 Dart_InvokeClosure + 2264
32 Flutter 0x101258340 tonic::DartMicrotaskQueue::RunMicrotasks() + 132
33 Flutter 0x100f57038 fml::MessageLoopImpl::RunExpiredTasks() + 1900
34 Flutter 0x100f58328 fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 32
35 CoreFoundation 0x1f759abf0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
36 CoreFoundation 0x1f759a920 __CFRunLoopDoTimer + 864
37 CoreFoundation 0x1f759a154 __CFRunLoopDoTimers + 248
38 CoreFoundation 0x1f7595030 __CFRunLoopRun + 1880
39 CoreFoundation 0x1f75945b8 CFRunLoopRunSpecific + 436
40 Flutter 0x100f581b4 fml::MessageLoopDarwin::Run() + 88
41 Flutter 0x100f57b00 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0> >(void*) + 272
42 libsystem_pthread.dylib 0x1f72252fc _pthread_body + 128
43 libsystem_pthread.dylib 0x1f722525c _pthread_start + 48
44 libsystem_pthread.dylib 0x1f7228d08 thread_start + 4

io.flutter.1.gpu
0 libGPUSupportMercury.dylib 0x21445cf28 gpus_ReturnNotPermittedKillClient + 12
1 AGXGLDriver 0x218c0b8c0 gldUpdateDispatch + 7216
2 libGPUSupportMercury.dylib 0x21445df04 gpusSubmitDataBuffers + 176
3 AGXGLDriver 0x218c0ce08 gldUpdateDispatch + 12664
4 GLEngine 0x219e664e4 gliPresentViewES_Exec + 188
5 OpenGLES 0x1fa90fa8c -[EAGLContext presentRenderbuffer:] + 80
6 Flutter 0x100f4a6ec shell::IOSSurfaceGL::GLContextPresent() + 172
7 Flutter 0x100f4cfac std::__1::__function::__func<shell::GPUSurfaceGL::AcquireFrame(SkISize const&)::$_0, std::__1::allocator<shell::GPUSurfaceGL::AcquireFrame(SkISize const&)::$_0>, bool (shell::SurfaceFrame const&, SkCanvas*)>::operator()(shell::SurfaceFrame const&, SkCanvas*&&) + 388
8 Flutter 0x100f82ea4 shell::Rasterizer::DrawToSurface(flow::LayerTree&) + 408
9 Flutter 0x100f83440 shell::Rasterizer::DoDraw(std::__1::unique_ptr<flow::LayerTree, std::__1::default_delete<flow::LayerTree> >) + 44
10 Flutter 0x100f837a0 std::__1::__function::__func<std::__1::__bind<void (shell::Rasterizer::*)(std::__1::unique_ptr<flow::LayerTree, std::__1::default_delete<flow::LayerTree> >), shell::Rasterizer*, std::__1::placeholders::__ph<1> const&>, std::__1::allocator<std::__1::__bind<void (shell::Rasterizer::*)(std::__1::unique_ptr<flow::LayerTree, std::__1::default_delete<flow::LayerTree> >), shell::Rasterizer*, std::__1::placeholders::__ph<1> const&> >, void (std::__1::unique_ptr<flow::LayerTree, std::__1::default_delete<flow::LayerTree> >)>::operator()(std::__1::unique_ptr<flow::LayerTree, std::__1::default_delete<flow::LayerTree> >&&) + 60
11 Flutter 0x100f83238 shell::Rasterizer::Draw(fml::RefPtr<flutter::Pipeline<flow::LayerTree> >) + 504
12 Flutter 0x100f87088 std::__1::__function::__func<shell::Shell::OnAnimatorDraw(fml::RefPtr<flutter::Pipeline<flow::LayerTree> >)::$_23, std::__1::allocator<shell::Shell::OnAnimatorDraw(fml::RefPtr<flutter::Pipeline<flow::LayerTree> >)::$_23>, void ()>::operator()() + 76
13 Flutter 0x100f5701c fml::MessageLoopImpl::RunExpiredTasks() + 1872
14 Flutter 0x100f58328 fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 32
15 CoreFoundation 0x1f759abf0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
16 CoreFoundation 0x1f759a920 __CFRunLoopDoTimer + 864
17 CoreFoundation 0x1f759a154 __CFRunLoopDoTimers + 248
18 CoreFoundation 0x1f7595030 __CFRunLoopRun + 1880
19 CoreFoundation 0x1f75945b8 CFRunLoopRunSpecific + 436
20 Flutter 0x100f581b4 fml::MessageLoopDarwin::Run() + 88
21 Flutter 0x100f57b00 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0> >(void*) + 272
22 libsystem_pthread.dylib 0x1f72252fc _pthread_body + 128
23 libsystem_pthread.dylib 0x1f722525c _pthread_start + 48
24 libsystem_pthread.dylib 0x1f7228d08 thread_start + 4

flutter doctor -v

[✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.13.6 17G65, locale ja-JP)
• Flutter version 0.8.2 at /Applications/flutter
• Framework revision 5ab9e70727 (5 weeks ago), 2018-09-07 12:33:05 -0700
• Engine revision 58a1894a1c
• Dart version 2.1.0-dev.3.1.flutter-760a9690c2

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /Users/najeira/Library/Android/sdk
• Android NDK at /Users/najeira/Library/Android/sdk/ndk-bundle
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = /Users/najeira/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
• Xcode at /Applications/Xcode9.app/Contents/Developer
• Xcode 9.4.1, Build version 9F2000
• ios-deploy 2.0.0
• CocoaPods version 1.5.3

[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
• Dart plugin version 171.4424
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2018.1)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 23.1.3
• Dart plugin version 181.4203.498

[✓] VS Code (version 1.27.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.18.0

Issue 2:
Internal: b/140829173

Steps to Reproduce

1. click to jump to flutter page, at the same time back to background
2. iphone6, 6plus, 5s device

[✓] Flutter (Channel faceu_dev_1.0.0, v1.0.1-pre.5, on Mac OS X 10.13.6 17G65,
locale zh-Hans-CN)
• Flutter version 1.0.1-pre.5 at
/Users/xiongzhuang/Documents/study/flutter/flutter
• Framework revision 0fd43583b8 (5 weeks ago), 2018-12-09 19:12:32 +0800
• Engine revision 7375a0f414
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK
components.
(or visit https://flutter.io/setup/#android-setup for detailed
instructions).
If Android SDK has been installed to a custom location, set $ANDROID_HOME
to that location.
You may also want to add it to your PATH environment variable.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.0, Build version 10A255
• ios-deploy 2.0.0
• CocoaPods version 1.5.3

[!] Android Studio (not installed)
• Android Studio not found; download from
https://developer.android.com/studio/index.html
(or visit https://flutter.io/setup/#android-setup for detailed
instructions).

[!] VS Code (version 1.29.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter