Repository: flutter
Issue: Rendering high resolution images with the Image widget results in an app crash on iOS
Labels: platform-ios,framework,a: images,has reproducible steps,P2,c: fatal crash,found in release: 3.0,found in release: 3.1,team-ios,triaged-ios

## Steps to Reproduce

1. Execute `flutter run` on the code sample on an iOS device
2. Click "Show Large Image" > {wait} > "Hide Large Image" > "Show Large Image" > {wait}
3. Crash

**Expected results:**
App should not crash

**Actual results:**
App crashed with the following error:
```
[ServicesDaemonManager] interruptionHandler is called. -[FontServicesDaemonManager connection]_block_invoke
* thread #11, name = 'io.flutter.1.io', stop reason = EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=2098 MB, unused=0x0)
    frame #0: 0x0000000258557aa8 libsystem_platform.dylib`_platform_memmove + 88
libsystem_platform.dylib`_platform_memmove:
->  0x258557aa8 <+88>:  stnp   q0, q1, [x3]
    0x258557aac <+92>:  add    x3, x3, #0x20
    0x258557ab0 <+96>:  ldnp   q0, q1, [x1]
    0x258557ab4 <+100>: add    x1, x1, #0x20
Target 0: (Runner) stopped.
Lost connection to device.
```

<details>
<summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);
  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  bool _shouldShowLargeImage = false;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            _shouldShowLargeImage
                ? Image.network(
                    "https://i.redd.it/zm4nfgq29yi91.jpg",
                  )
                : const Text("Press button to load Large Image"),
            const SizedBox(
              height: 20,
            ),
            ElevatedButton(
              onPressed: () {
                setState(() {
                  _shouldShowLargeImage = !_shouldShowLargeImage;
                });
              },
              child: Text(_shouldShowLargeImage
                  ? "Hide Large Image"
                  : "Show Large Image"),
            ),
            const SizedBox(height: 20),
            _shouldShowLargeImage
                ? const Text("Please wait for the image to load")
                : Container(),
          ],
        ),
      ),
    );
  }
}

```

</details>

<details>
  <summary>Logs</summary>

```
[+9458 ms] Process 69700 stopped
[   +1 ms] * thread #11, name = 'io.flutter.1.io', stop reason = EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=2098 MB, unused=0x0)
[        ]     frame #0: 0x0000000258557aa8 libsystem_platform.dylib`_platform_memmove + 88
[        ] libsystem_platform.dylib`_platform_memmove:
[        ] ->  0x258557aa8 <+88>:  stnp   q0, q1, [x3]
[        ]     0x258557aac <+92>:  add    x3, x3, #0x20
[        ]     0x258557ab0 <+96>:  ldnp   q0, q1, [x1]
[        ]     0x258557ab4 <+100>: add    x1, x1, #0x20
[        ] Target 0: (Runner) stopped.
[        ] thread backtrace all
[        ] process detach
[  +63 ms]   thread #1, queue = 'com.apple.main-thread'
[        ]     frame #0: 0x000000021ee334a0 libsystem_kernel.dylib`mach_msg_trap + 8
[        ]     frame #1: 0x000000021ee33ae4 libsystem_kernel.dylib`mach_msg + 76
[        ]     frame #2: 0x00000001e736ad30 CoreFoundation`__CFRunLoopServiceMachPort + 372
[        ]     frame #3: 0x00000001e736f1bc CoreFoundation`__CFRunLoopRun + 1180
[        ]     frame #4: 0x00000001e7382bc8 CoreFoundation`CFRunLoopRunSpecific + 600
[        ]     frame #5: 0x00000002034b6374 GraphicsServices`GSEventRunModal + 164
[        ]     frame #6: 0x00000001e9cf2648 UIKitCore`-[UIApplication _run] + 1100
[        ]     frame #7: 0x00000001e9a73d90 UIKitCore`UIApplicationMain + 364
[        ]     frame #8: 0x0000000102251cf4 Runner`main at AppDelegate.swift:5:13
[        ]     frame #9: 0x00000001023f9ce4 dyld`start + 520
[        ]   thread #7, name = 'com.apple.uikit.eventfetch-thread'
[        ]     frame #0: 0x000000021ee334a0 libsystem_kernel.dylib`mach_msg_trap + 8
[        ]     frame #1: 0x000000021ee33ae4 libsystem_kernel.dylib`mach_msg + 76
[        ]     frame #2: 0x00000001e736ad30 CoreFoundation`__CFRunLoopServiceMachPort + 372
[        ]     frame #3: 0x00000001e736f1bc CoreFoundation`__CFRunLoopRun + 1180
[        ]     frame #4: 0x00000001e7382bc8 CoreFoundation`CFRunLoopRunSpecific + 600
[        ]     frame #5: 0x00000001e8b71464 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236
[        ]     frame #6: 0x00000001e8bb2e2c Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 92
[        ]     frame #7: 0x00000001e9c6c770 UIKitCore`-[UIEventFetcher threadMain] + 524
[        ]     frame #8: 0x00000001e8bc143c Foundation`__NSThread__start__ + 808
[        ]     frame #9: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #9, name = 'io.flutter.1.ui'
[        ]     frame #0: 0x000000021ee334a0 libsystem_kernel.dylib`mach_msg_trap + 8
[        ]     frame #1: 0x000000021ee33ae4 libsystem_kernel.dylib`mach_msg + 76
[        ]     frame #2: 0x00000001e736ad30 CoreFoundation`__CFRunLoopServiceMachPort + 372
[        ]     frame #3: 0x00000001e736f1bc CoreFoundation`__CFRunLoopRun + 1180
[        ]     frame #4: 0x00000001e7382bc8 CoreFoundation`CFRunLoopRunSpecific + 600
[        ]     frame #5: 0x0000000104d55b5c Flutter`fml::MessageLoopDarwin::Run() + 88
[        ]     frame #6: 0x0000000104d54c18 Flutter`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::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0> >(void*) + 208
[        ]     frame #7: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #10, name = 'io.flutter.1.raster'
[        ]     frame #0: 0x000000021ee334a0 libsystem_kernel.dylib`mach_msg_trap + 8
[        ]     frame #1: 0x000000021ee33ae4 libsystem_kernel.dylib`mach_msg + 76
[        ]     frame #2: 0x00000001e736ad30 CoreFoundation`__CFRunLoopServiceMachPort + 372
[        ]     frame #3: 0x00000001e736f1bc CoreFoundation`__CFRunLoopRun + 1180
[        ]     frame #4: 0x00000001e7382bc8 CoreFoundation`CFRunLoopRunSpecific + 600
[        ]     frame #5: 0x0000000104d55b5c Flutter`fml::MessageLoopDarwin::Run() + 88
[        ]     frame #6: 0x0000000104d54c18 Flutter`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::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0> >(void*) + 208
[        ]     frame #7: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ] * thread #11, name = 'io.flutter.1.io', stop reason = EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=2098 MB, unused=0x0)
[        ]   * frame #0: 0x0000000258557aa8 libsystem_platform.dylib`_platform_memmove + 88
[        ]     frame #1: 0x0000000104cdb534 Flutter`GrMtlGpu::onWritePixels(GrSurface*, SkIRect, GrColorType, GrColorType, GrMipLevel const*, int, bool) + 848
[        ]     frame #2: 0x0000000104bf5030 Flutter`GrGpu::writePixels(GrSurface*, SkIRect, GrColorType, GrColorType, GrMipLevel const*, int, bool) + 420
[        ]     frame #3: 0x0000000104c0332c Flutter`GrResourceProvider::createTexture(SkISize, GrBackendFormat const&, GrTextureType, GrColorType, GrRenderable, int, SkBudgeted, GrMipmapped, GrProtected, GrMipLevel const*) + 1236
[        ]     frame #4: 0x0000000104bfb35c Flutter`std::__1::__function::__func<GrProxyProvider::createMippedProxyFromBitmap(SkBitmap const&, SkBudgeted)::$_1,
std::__1::allocator<GrProxyProvider::createMippedProxyFromBitmap(SkBitmap const&, SkBudgeted)::$_1>, GrSurfaceProxy::LazyCallbackResult (GrResourceProvider*, GrSurfaceProxy::LazySurfaceDesc const&)>::operator()(GrResourceProvider*&&,
GrSurfaceProxy::LazySurfaceDesc const&) + 380
[        ]     frame #5: 0x0000000104c071ec Flutter`GrSurfaceProxyPriv::doLazyInstantiation(GrResourceProvider*) + 156
[        ]     frame #6: 0x0000000104c4c7c0 Flutter`make_bmp_proxy(GrProxyProvider*, SkBitmap const&, GrColorType, GrMipmapped, SkBackingFit, SkBudgeted) + 1340
[        ]     frame #7: 0x0000000104c4c90c Flutter`GrMakeUncachedBitmapProxyView(GrRecordingContext*, SkBitmap const&, GrMipmapped, SkBackingFit, SkBudgeted) + 184
[        ]     frame #8: 0x0000000104c4fecc Flutter`SkImage::MakeCrossContextFromPixmap(GrDirectContext*, SkPixmap const&, bool, bool) + 404
[        ]     frame #9: 0x0000000104f18654 Flutter`std::__1::__function::__func<flutter::UploadRasterImage(sk_sp<SkImage>, fml::WeakPtr<flutter::IOManager>, fml::tracing::TraceFlow const&)::$_3,
std::__1::allocator<flutter::UploadRasterImage(sk_sp<SkImage>, fml::WeakPtr<flutter::IOManager>, fml::tracing::TraceFlow const&)::$_3>, void ()>::operator()() + 120
[        ]     frame #10: 0x0000000104d53904 Flutter`fml::SyncSwitch::Execute(fml::SyncSwitch::Handlers const&) const + 52
[        ]     frame #11: 0x0000000104f17f7c Flutter`std::__1::__function::__func<fml::internal::CopyableLambda<flutter::ImageDecoderSkia::Decode(fml::RefPtr<flutter::ImageDescriptor>, unsigned int, unsigned int,
std::__1::function<void (sk_sp<flutter::DlImage>)> const&)::$_1::operator()()::'lambda'()>, std::__1::allocator<fml::internal::CopyableLambda<flutter::ImageDecoderSkia::Decode(fml::RefPtr<flutter::ImageDescriptor>, unsigned int,
unsigned int, std::__1::function<void (sk_sp<flutter::DlImage>)> const&)::$_1::operator()()::'lambda'()> >, void ()>::operator()() + 720
[        ]     frame #12: 0x0000000104d52174 Flutter`fml::MessageLoopImpl::FlushTasks(fml::FlushType) + 1592
[        ]     frame #13: 0x0000000104d55c8c Flutter`fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 32
[        ]     frame #14: 0x00000001e7412678 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
[        ]     frame #15: 0x00000001e7396654 CoreFoundation`__CFRunLoopDoTimer + 1064
[        ]     frame #16: 0x00000001e7390e00 CoreFoundation`__CFRunLoopDoTimers + 320
[        ]     frame #17: 0x00000001e736f4b0 CoreFoundation`__CFRunLoopRun + 1936
[        ]     frame #18: 0x00000001e7382bc8 CoreFoundation`CFRunLoopRunSpecific + 600
[        ]     frame #19: 0x0000000104d55b5c Flutter`fml::MessageLoopDarwin::Run() + 88
[        ]     frame #20: 0x0000000104d54c18 Flutter`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::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0> >(void*) + 208
[        ]     frame #21: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #12, name = 'io.flutter.1.profiler'
[        ]     frame #0: 0x000000021ee334a0 libsystem_kernel.dylib`mach_msg_trap + 8
[        ]     frame #1: 0x000000021ee33ae4 libsystem_kernel.dylib`mach_msg + 76
[        ]     frame #2: 0x00000001e736ad30 CoreFoundation`__CFRunLoopServiceMachPort + 372
[        ]     frame #3: 0x00000001e736f1bc CoreFoundation`__CFRunLoopRun + 1180
[        ]     frame #4: 0x00000001e7382bc8 CoreFoundation`CFRunLoopRunSpecific + 600
[        ]     frame #5: 0x0000000104d55b5c Flutter`fml::MessageLoopDarwin::Run() + 88
[        ]     frame #6: 0x0000000104d54c18 Flutter`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::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0> >(void*) + 208
[        ]     frame #7: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #13, name = 'io.worker.1'
[        ]     frame #0: 0x000000021ee33f24 libsystem_kernel.dylib`__psynch_cvwait + 8
[        ]     frame #1: 0x0000000258567298 libsystem_pthread.dylib`_pthread_cond_wait + 1236
[        ]     frame #2: 0x000000020019728c libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
[        ]     frame #3: 0x0000000104d4f810 Flutter`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::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 316
[        ]     frame #4: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #14, name = 'io.worker.2'
[        ]     frame #0: 0x000000021ee33f24 libsystem_kernel.dylib`__psynch_cvwait + 8
[        ]     frame #1: 0x0000000258567298 libsystem_pthread.dylib`_pthread_cond_wait + 1236
[        ]     frame #2: 0x000000020019728c libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
[        ]     frame #3: 0x0000000104d4f810 Flutter`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::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 316
[        ]     frame #4: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #15, name = 'io.worker.3'
[        ]     frame #0: 0x000000021ee33f24 libsystem_kernel.dylib`__psynch_cvwait + 8
[        ]     frame #1: 0x0000000258567298 libsystem_pthread.dylib`_pthread_cond_wait + 1236
[        ]     frame #2: 0x000000020019728c libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
[        ]     frame #3: 0x0000000104d4f810 Flutter`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::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 316
[        ]     frame #4: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #16, name = 'io.worker.4'
[        ]     frame #0: 0x000000021ee33f24 libsystem_kernel.dylib`__psynch_cvwait + 8
[        ]     frame #1: 0x0000000258567298 libsystem_pthread.dylib`_pthread_cond_wait + 1236
[        ]     frame #2: 0x000000020019728c libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
[        ]     frame #3: 0x0000000104d4f810 Flutter`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::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 316
[   +2 ms]     frame #4: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #17, name = 'io.worker.5'
[        ]     frame #0: 0x000000021ee33f24 libsystem_kernel.dylib`__psynch_cvwait + 8
[        ]     frame #1: 0x0000000258567298 libsystem_pthread.dylib`_pthread_cond_wait + 1236
[        ]     frame #2: 0x000000020019728c libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
[        ]     frame #3: 0x0000000104d4f810 Flutter`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::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 316
[        ]     frame #4: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #18, name = 'io.worker.6'
[        ]     frame #0: 0x000000021ee33f24 libsystem_kernel.dylib`__psynch_cvwait + 8
[        ]     frame #1: 0x0000000258567298 libsystem_pthread.dylib`_pthread_cond_wait + 1236
[        ]     frame #2: 0x000000020019728c libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
[        ]     frame #3: 0x0000000104d4f810 Flutter`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::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 316
[        ]     frame #4: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #19, name = 'dart:io EventHandler'
[        ]     frame #0: 0x000000021ee34e18 libsystem_kernel.dylib`kevent + 8
[        ]     frame #1: 0x0000000104f37238 Flutter`dart::bin::EventHandlerImplementation::EventHandlerEntry(unsigned long) + 436
[        ]     frame #2: 0x0000000104f68c0c Flutter`dart::bin::ThreadStart(void*) + 44
[        ]     frame #3: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #20, name = 'Dart Profiler ThreadInterrupter'
[        ]     frame #0: 0x000000021ee33f24 libsystem_kernel.dylib`__psynch_cvwait + 8
[        ]     frame #1: 0x0000000258567298 libsystem_pthread.dylib`_pthread_cond_wait + 1236
[        ]     frame #2: 0x000000010510d2bc Flutter`dart::Monitor::WaitMicros(long long) + 152
[        ]     frame #3: 0x00000001051b4f88 Flutter`dart::ThreadInterrupter::ThreadMain(unsigned long) + 424
[        ]     frame #4: 0x000000010510cc2c Flutter`dart::ThreadStart(void*) + 288
[        ]     frame #5: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #21, name = 'Dart Profiler SampleBlockProcessor'
[        ]     frame #0: 0x000000021ee33f24 libsystem_kernel.dylib`__psynch_cvwait + 8
[        ]     frame #1: 0x00000002585672c4 libsystem_pthread.dylib`_pthread_cond_wait + 1280
[        ]     frame #2: 0x0000000105112154 Flutter`dart::SampleBlockProcessor::ThreadMain(unsigned long) + 260
[        ]     frame #3: 0x000000010510cc2c Flutter`dart::ThreadStart(void*) + 288
[        ]     frame #4: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #27, name = 'DartWorker'
[        ]     frame #0: 0x000000021ee33f24 libsystem_kernel.dylib`__psynch_cvwait + 8
[        ]     frame #1: 0x00000002585672c4 libsystem_pthread.dylib`_pthread_cond_wait + 1280
[        ]     frame #2: 0x000000010510d2a4 Flutter`dart::Monitor::WaitMicros(long long) + 128
[        ]     frame #3: 0x00000001051b6098 Flutter`dart::ThreadPool::Worker::Main(unsigned long) + 680
[        ]     frame #4: 0x000000010510cc2c Flutter`dart::ThreadStart(void*) + 288
[        ]     frame #5: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #28
[        ]     frame #0: 0x000000021ee33a74 libsystem_kernel.dylib`__workq_kernreturn + 8
[        ]   thread #29
[        ]     frame #0: 0x000000021ee33a74 libsystem_kernel.dylib`__workq_kernreturn + 8
[        ]   thread #30
[        ]     frame #0: 0x000000021ee33a74 libsystem_kernel.dylib`__workq_kernreturn + 8
[        ]   thread #31, name = 'DartWorker'
[        ]     frame #0: 0x000000021ee33f24 libsystem_kernel.dylib`__psynch_cvwait + 8
[        ]     frame #1: 0x00000002585672c4 libsystem_pthread.dylib`_pthread_cond_wait + 1280
[        ]     frame #2: 0x000000010510d2a4 Flutter`dart::Monitor::WaitMicros(long long) + 128
[        ]     frame #3: 0x00000001051b6098 Flutter`dart::ThreadPool::Worker::Main(unsigned long) + 680
[        ]     frame #4: 0x000000010510cc2c Flutter`dart::ThreadStart(void*) + 288
[        ]     frame #5: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #32, name = 'DartWorker'
[        ]     frame #0: 0x000000021ee33f24 libsystem_kernel.dylib`__psynch_cvwait + 8
[        ]     frame #1: 0x00000002585672c4 libsystem_pthread.dylib`_pthread_cond_wait + 1280
[        ]     frame #2: 0x000000010510d2a4 Flutter`dart::Monitor::WaitMicros(long long) + 128
[        ]     frame #3: 0x00000001051b6098 Flutter`dart::ThreadPool::Worker::Main(unsigned long) + 680
[        ]     frame #4: 0x000000010510cc2c Flutter`dart::ThreadStart(void*) + 288
[        ]     frame #5: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #33, name = 'DartWorker'
[        ]     frame #0: 0x000000021ee33f24 libsystem_kernel.dylib`__psynch_cvwait + 8
[        ]     frame #1: 0x00000002585672c4 libsystem_pthread.dylib`_pthread_cond_wait + 1280
[        ]     frame #2: 0x000000010510d2a4 Flutter`dart::Monitor::WaitMicros(long long) + 128
[        ]     frame #3: 0x00000001051b6098 Flutter`dart::ThreadPool::Worker::Main(unsigned long) + 680
[        ]     frame #4: 0x000000010510cc2c Flutter`dart::ThreadStart(void*) + 288
[   +1 ms]     frame #5: 0x00000002585609ac libsystem_pthread.dylib`_pthread_start + 148
[        ]   thread #34
[        ]     frame #0: 0x000000021ee33a74 libsystem_kernel.dylib`__workq_kernreturn + 8
[   +3 ms] (lldb) 
[   +1 ms] ios-deploy exited with code 0
[  +64 ms] Service protocol connection closed.
[        ] Lost connection to device.
```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
$flutter analyze
Analyzing my_app...
No issues found! (ran in 1.1s)
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
$ flutter doctor -v
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.4 21F79 darwin-arm (Rosetta),
    locale en-IN)
    • Flutter version 3.0.5 at /Users/vishnu/tools/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (6 weeks ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/vishnu/Library/Android/sdk
    • Platform android-32, build-tools 30.0.3
    • Java binary at: /opt/homebrew/opt/openjdk@11/bin/java
    • Java version OpenJDK Runtime Environment Homebrew (build 11.0.15+0)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from
      https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup
      for detailed instructions).

[✓] IntelliJ IDEA Ultimate Edition (version 2021.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 59.0.4
    • Dart plugin version 212.4746.57

[✓] VS Code (version 1.70.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.46.0

[✓] Connected device (3 available)
    • Vishnu’s iPhone (mobile) • 00008030-000934AE2282802E • ios            •
      iOS 15.5 19F77
    • macOS (desktop)          • macos                     • darwin-arm64   •
      macOS 12.4 21F79 darwin-arm (Rosetta)
    • Chrome (web)             • chrome                    • web-javascript •
      Google Chrome 104.0.5112.101
    ! Error: Vishnu’s iPhone is busy: Fetching debug symbols for Vishnu’s
      iPhone. Xcode will continue when Vishnu’s iPhone is finished. (code -10)

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
```
</details>

**Video of the issue:**

https://user-images.githubusercontent.com/1161789/186877494-5e326e5c-eefb-40d3-b7bd-cd46db46d217.MP4