Repository: flutter
Issue:  “Lost connection to device.” Frequently occurs in Desktop Embedding
Labels: tool,platform-windows,a: desktop,P2,team-windows,triaged-windows

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill our the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->

1. Start flutter with the `flutter run` command.
2. Modify the source and reload many times with the r key.
3. "Lost connection to device." Occurs after about 3 minutes.

**Expected results:** <!-- what did you want to see? -->
Stay connected to the app.

**Actual results:** <!-- what did you see? -->
Terminal is disconnected from the app.
The app remains running.

<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue.
-->

```
D:\flutter-desktop-embedding\example>flutter run --verbose
[  +13 ms] executing: [D:\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +51 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] f3b426a5fc099c705263182bfdc951e3eae89c04
[        ] executing: [D:\flutter/] git describe --match v*.*.* --first-parent --long --tags
[  +47 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v1.15.21-31-gf3b426a5f
[   +5 ms] executing: [D:\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +33 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/master
[        ] executing: [D:\flutter/] git ls-remote --get-url origin
[  +29 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +58 ms] executing: [D:\flutter/] git rev-parse --abbrev-ref HEAD
[  +30 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] master
[  +34 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +17 ms] executing: C:\Users\t_okamoto\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[  +32 ms] Exit code 0 from: C:\Users\t_okamoto\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[        ] List of devices attached
[   +7 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +3 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +3 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +196 ms] Launching lib\main.dart on Windows in debug mode...
[   +7 ms] D:\flutter\bin\cache\dart-sdk\bin\dart.exe
D:\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
D:\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter
-Ddart.developer.causal_async_stacks=true --output-dill
C:\Users\T_OKAM~1\AppData\Local\Temp\flutter_tool.70b2ce57-67df-11ea-ae30-d0c0bf8e0a6f\app.dill --packages
D:\flutter-desktop-embedding\example\.packages -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root
[  +36 ms] executing: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -utf8 -latest -version 16
-requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Component.VC.Tools.x86.x64
Microsoft.VisualStudio.Component.Windows10SDK.17763
[  +26 ms] Exit code 0 from: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -utf8 -latest
-version 16 -requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Component.VC.Tools.x86.x64
Microsoft.VisualStudio.Component.Windows10SDK.17763
[   +1 ms] [
             {
               "instanceId": "ab83d72e",
               "installDate": "2020-03-02T23:56:53Z",
               "installationName": "VisualStudio/16.4.5+29806.167",
               "installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community",
               "installationVersion": "16.4.29806.167",
               "productId": "Microsoft.VisualStudio.Product.Community",
               "productPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\Common7\\IDE\\devenv.exe",        
               "state": 4294967295,
               "isComplete": true,
               "isLaunchable": true,
               "isPrerelease": false,
               "isRebootRequired": false,
               "displayName": "Visual Studio Community 2019",
               "description": "蟄ｦ逕溘√が繝ｼ繝励Φ繧ｽ繝ｼ繧ｹ縺ｮ蜈ｱ蜷御ｽ懈・閠・∝倶ｺｺ逕ｨ縺ｮ辟｡譁吶〒蠑ｷ蜉帙↑ IDE",
               "channelId": "VisualStudio.16.Release",
               "channelUri": "https://aka.ms/vs/16/release/channel",
               "enginePath": "C:\\Program Files (x86)\\Microsoft Visual
               Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
               "releaseNotes": "https://go.microsoft.com/fwlink/?LinkId=660893#16.4.5",
               "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660909",
               "updateDate": "2020-03-02T23:56:53.1296462Z",
               "catalog": {
                 "buildBranch": "d16.4",
                 "buildVersion": "16.4.29806.167",
                 "id": "VisualStudio/16.4.5+29806.167",
                 "localBuild": "build-lab",
                 "manifestName": "VisualStudio",
                 "manifestType": "installer",
                 "productDisplayVersion": "16.4.5",
                 "productLine": "Dev16",
                 "productLineVersion": "2019",
                 "productMilestone": "RTW",
                 "productMilestoneIsPreRelease": "False",
                 "productName": "Visual Studio",
                 "productPatchVersion": "5",
                 "productPreReleaseMilestoneSuffix": "1.0",
                 "productSemanticVersion": "16.4.5+29806.167",
                 "requiredEngineVersion": "2.4.1111.43337"
               },
               "properties": {
                 "campaignId": "2111577170.1582588530",
                 "canceled": "0",
                 "channelManifestId": "VisualStudio.16.Release/16.4.5+29806.167",
                 "nickname": "2",
                 "setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vs_installershell.exe"        
               }
             }
           ]
[  +80 ms] Building Windows application...
[   +1 ms] executing: [D:\flutter-desktop-embedding\example\windows/] D:\flutter\packages\flutter_tools\bin\vs_build.bat C:\Program 
Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat Runner.sln Debug
[  +12 ms] <- compile package:example_flutter/main.dart
[ +217 ms] **********************************************************************
[        ] ** Visual Studio 2019 Developer Command Prompt v16.4.5
[        ] ** Copyright (c) 2019 Microsoft Corporation
[        ] **********************************************************************
[+1077 ms] [vcvarsall.bat] Environment initialized for: 'x64'
[  +71 ms] .NET Framework 向け Microsoft (R) Build Engine バージョン 16.4.0+e901037fe
[        ] Copyright (C) Microsoft Corporation.All rights reserved.
[        ] このソリューション内のプロジェクトを一度に 1 つずつビルドします。並行ビルドを有効にするには、"-m" スイッチを追加してくだ 
さい。
[  +43 ms] 2020/03/17 8:39:58 にビルドを開始しました。
[ +131 ms] ノード 1 上のプロジェクト "D:\flutter-desktop-embedding\example\windows\Runner.sln" (既定のターゲット)。
[   +1 ms] ValidateSolutionConfiguration:
[        ]   ソリューション構成 "Debug|x64" をビルドしています。
[ +201 ms] プロジェクト "D:\flutter-desktop-embedding\example\windows\Runner.sln" (1) は、ノード 1 上に
"D:\flutter-desktop-embedding\example\windows\Runner.vcxproj.metaproj" (2) をビルドしています (既定のターゲット)。
[   +2 ms] プロジェクト "D:\flutter-desktop-embedding\example\windows\Runner.vcxproj.metaproj" (2) は、ノード 1 上に
"D:\flutter-desktop-embedding\example\windows\FlutterBuild.vcxproj" (3) をビルドしています (既定のターゲット)。
[  +14 ms] InitializeBuildStatus:
[   +1 ms]   "AlwaysCreate" が指定されたため "x64\Debug\Flutter Build.tlog\unsuccessfulbuild" を作成しています。
[   +3 ms] CustomBuildStep:
[        ]   Running Flutter backend build
[   +6 ms]   "D:\flutter-desktop-embedding\example\windows\scripts\prepare_dependencies" Debug
[   +9 ms]   :VCEnd
[+3715 ms] FinalizeBuildStatus:
[        ]   ファイル "x64\Debug\Flutter Build.tlog\unsuccessfulbuild" を削除しています。
[        ]   "x64\Debug\Flutter Build.tlog\Flutter Build.lastbuildstate" のタッチ タスクを実行しています。
[        ] プロジェクト "D:\flutter-desktop-embedding\example\windows\FlutterBuild.vcxproj" (既定のターゲット) のビルドが完了しまし 
た。
[  +44 ms] プロジェクト "D:\flutter-desktop-embedding\example\windows\Runner.vcxproj.metaproj" (2) は、ノード 1 上に
"D:\flutter-desktop-embedding\example\windows\Runner.vcxproj" (4) をビルドしています (既定のターゲット)。
[   +1 ms] InitializeBuildStatus:
[        ]   "AlwaysCreate" が指定されたため
"D:\flutter-desktop-embedding\example\windows\..\build\windows\intermediates\x64\Debug\Runner\Runner.tlog\unsuccessfulbuild"        
を作成しています。
[  +54 ms] ClCompile:
[        ]   C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\CL.exe /c
/I"D:\flutter-desktop-embedding\example\windows\\" /I"D:\flutter-desktop-embedding\example\windows\flutter\ephemeral"
/I"D:\flutter-desktop-embedding\example\windows\flutter\ephemeral\cpp_client_wrapper\include" /ZI /JMC /nologo /W4 /WX
/diagnostics:column /sdl /Od /D _MBCS /D _HAS_EXCEPTIONS=0 /D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /permissive-/Zc:wchar_t /Zc:forScope /Zc:inline
/Fo"D:\flutter-desktop-embedding\example\windows\..\build\windows\intermediates\x64\Debug\Runner\\"
/Fd"D:\flutter-desktop-embedding\example\windows\..\build\windows\intermediates\x64\Debug\Runner\vc142.pdb" /Gd /TP /wd4100 /FC     
/errorReport:queue flutter\generated_plugin_registrant.cc
[  +56 ms]   generated_plugin_registrant.cc
[ +352 ms] ResourceCompile:
[        ]   すべての出力が最新のものです。
[   +3 ms] ManifestResourceCompile:
[   +5 ms]   すべての出力が最新のものです。
[  +17 ms] Link:
[   +7 ms]   C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\link.exe
/ERRORREPORT:QUEUE /OUT:"D:\flutter-desktop-embedding\example\windows\..\build\windows\x64\Debug\Runner\Flutter Desktop Example.exe"/INCREMENTAL /NOLOGO /LIBPATH:"D:\flutter-desktop-embedding\example\windows\flutter\ephemeral"
/LIBPATH:"D:\flutter-desktop-embedding\example\windows\..\build\windows\x64\Debug\Runner\..\Plugins" flutter_windows.dll.lib        
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib     
odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /manifestinput:runner.exe.manifest
/DEBUG:FASTLINK /PDB:"D:\flutter-desktop-embedding\example\windows\..\build\windows\x64\Debug\Runner\Flutter Desktop Example.pdb"   
/TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:\flutter-desktop-embedding\example\windows\..\build\windows\x64\Debug\Runner\Flutter     
Desktop Example.lib" /MACHINE:X64
"D:\flutter-desktop-embedding\example\windows\..\build\windows\intermediates\x64\Debug\Runner\Runner.res"
[   +3 ms]   "D:\flutter-desktop-embedding\example\windows\..\build\windows\intermediates\x64\Debug\Runner\main.obj"
[        ]
"D:\flutter-desktop-embedding\example\windows\..\build\windows\intermediates\x64\Debug\Runner\generated_plugin_registrant.obj"      
[        ]   "D:\flutter-desktop-embedding\example\windows\..\build\windows\intermediates\x64\Debug\Runner\window_configuration.obj"[        ]   "D:\flutter-desktop-embedding\example\windows\..\build\windows\intermediates\x64\Debug\Runner\win32_window.obj"        
[        ]   "D:\flutter-desktop-embedding\example\windows\..\build\windows\intermediates\x64\Debug\Runner\engine_method_result.obj"[        ]
"D:\flutter-desktop-embedding\example\windows\..\build\windows\intermediates\x64\Debug\Runner\flutter_view_controller.obj"
[        ]   "D:\flutter-desktop-embedding\example\windows\..\build\windows\intermediates\x64\Debug\Runner\plugin_registrar.obj"    
[ +254 ms]   Runner.vcxproj -> D:\flutter-desktop-embedding\example\windows\..\build\windows\x64\Debug\Runner\Flutter Desktop
Example.exe
[   +2 ms] CustomBuildStep:
[   +8 ms]   Bundling dependencies
[   +1 ms]   "D:\flutter-desktop-embedding\example\windows\scripts\bundle_assets_and_deps"
"D:\flutter-desktop-embedding\example\windows\flutter\ephemeral\"
"D:\flutter-desktop-embedding\example\windows\..\build\windows\x64\Debug\Runner\"
"D:\flutter-desktop-embedding\example\windows\..\build\windows\x64\Debug\Runner\..\Plugins\" "Flutter Desktop Example.exe"
[   +8 ms]   :VCEnd
[  +77 ms]   14 個のファイルをコピーしました
[  +14 ms]   0 個のファイルをコピーしました
[  +15 ms]   0 個のファイルをコピーしました
[   +7 ms] FinalizeBuildStatus:
[   +3 ms]   ファイル
"D:\flutter-desktop-embedding\example\windows\..\build\windows\intermediates\x64\Debug\Runner\Runner.tlog\unsuccessfulbuild"        
を削除しています。
[   +1 ms]
"D:\flutter-desktop-embedding\example\windows\..\build\windows\intermediates\x64\Debug\Runner\Runner.tlog\Runner.lastbuildstate"    
のタッチ タスクを実行しています。
[   +1 ms] プロジェクト "D:\flutter-desktop-embedding\example\windows\Runner.vcxproj" (既定のターゲット) のビルドが完了しました。   
[        ] プロジェクト "D:\flutter-desktop-embedding\example\windows\Runner.vcxproj.metaproj" (既定のターゲット) のビルドが完了しま
した。
[        ] プロジェクト "D:\flutter-desktop-embedding\example\windows\Runner.sln" (既定のターゲット) のビルドが完了しました。       
[        ] ビルドに成功しました。
[        ]     0 個の警告
[        ]     0 エラー
[        ] 経過時間 00:00:05.03
[  +12 ms] Building Windows application... (completed in 6.5s)
[ +445 ms] Observatory URL on device: http://127.0.0.1:6387/cCp6eHM2hPU=/
[   +6 ms] Connecting to service protocol: http://127.0.0.1:6387/cCp6eHM2hPU=/
[  +80 ms] Successfully connected to service protocol: http://127.0.0.1:6387/cCp6eHM2hPU=/
[   +2 ms] Sending to VM service: getVM({})
[   +2 ms] Result: {type: VM, name: vm, architectureBits: 64, hostCPU: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz, operatingSystem:    
windows, targetCPU: x64, version: 2.8.0-dev.14.0.flutter-eff5548a68 (Sun Mar 15 04:33:56 2020 +0000) on "windows_x64",
_profilerMode: Dar...
[   +4 ms] Sending to VM service: getIsolate({isolateId: isolates/2936779566527571})
[   +6 ms] Sending to VM service: _flutter.listViews({})
[   +2 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x2036c6686c0, isolate: {type: @Isolate,    
fixedId: true, id: isolates/2936779566527571, name: main.dart$main-2936779566527571, number: 2936779566527571}}]}
[   +4 ms] DevFS: Creating new filesystem on the device (null)
[   +1 ms] Sending to VM service: _createDevFS({fsName: example})
[  +11 ms] Result: {type: Isolate, id: isolates/2936779566527571, name: main, number: 2936779566527571, _originNumber:
2936779566527571, startTime: 1584402003796, _heaps: {new: {type: HeapSpace, name: new, vmName: Scavenger, collections: 1,
avgCollectionPeriodMillis...
[   +9 ms] Result: {type: FileSystem, name: example, uri:
file:///C:/Users/T_OKAM~1/AppData/Local/Temp/example754f53f9-67df-11ea-ae30-d0c0bf8e0a6f/example/}
[   +3 ms] DevFS: Created new filesystem on the device
(file:///C:/Users/T_OKAM~1/AppData/Local/Temp/example754f53f9-67df-11ea-ae30-d0c0bf8e0a6f/example/)
[   +2 ms] Updating assets
[  +67 ms] Syncing files to device Windows...
[   +1 ms] Scanning asset files
[   +3 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[  +10 ms] <- recompile package:example_flutter/main.dart 65b90c01-c7e1-4c75-bd3e-62893e925e06
[        ] <- 65b90c01-c7e1-4c75-bd3e-62893e925e06
[  +64 ms] Updating files
[  +93 ms] DevFS: Sync finished
[   +1 ms] Syncing files to device Windows... (completed in 174ms)
[        ] Synced 1.9MB.
[   +6 ms] Sending to VM service: _flutter.listViews({})
[   +1 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x2036c6686c0, isolate: {type: @Isolate,
fixedId: true, id: isolates/2936779566527571, name: main.dart$main-2936779566527571, number: 2936779566527571}}]}
[        ] <- accept
[        ] Connected to _flutterView/0x2036c6686c0.
[   +1 ms] Flutter run key commands.
[   +1 ms] r Hot reload. 
[   +6 ms] R Hot restart.
[        ] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on Windows is available at: http://127.0.0.1:6387/cCp6eHM2hPU=/
[+195279 ms] Performing hot reload...
[   +2 ms] Refreshing active FlutterViews before reloading.
[   +4 ms] Sending to VM service: _flutter.listViews({})
[   +1 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x2036c6686c0, isolate: {type: @Isolate,
fixedId: true, id: isolates/2936779566527571, name: main.dart$main-2936779566527571, number: 2936779566527571}}]}
[  +45 ms] Scanned through 462 files in 44ms
[        ] Syncing files to device Windows...
[        ] Scanning asset files
[   +1 ms] Compiling dart to kernel with 1 updated files
[   +1 ms] <- recompile package:example_flutter/main.dart 2af5ad80-e4f2-4a51-9c55-88614536b729
[        ] package:example_flutter/PageMain.dart
[        ] <- 2af5ad80-e4f2-4a51-9c55-88614536b729
[  +17 ms] Updating files
[   +5 ms] DevFS: Sync finished
[        ] Syncing files to device Windows... (completed in 27ms)
[        ] Synced 0.0MB.
[   +1 ms] Sending to VM service: _flutter.setAssetBundlePath({isolateId: isolates/2936779566527571, viewId:
_flutterView/0x2036c6686c0, assetDirectory:
/C:/Users/T_OKAM~1/AppData/Local/Temp/example754f53f9-67df-11ea-ae30-d0c0bf8e0a6f/example/build/flutter_assets})
[   +2 ms] Result: {type: Success, view: {type: FlutterView, id: _flutterView/0x2036c6686c0, isolate: {type: @Isolate, fixedId:
true, id: isolates/2936779566527571, name: main.dart$main-2936779566527571, number: 2936779566527571}}}
[   +7 ms] Sending to VM service: _reloadSources({pause: false, rootLibUri:
file:///C:/Users/T_OKAM~1/AppData/Local/Temp/example754f53f9-67df-11ea-ae30-d0c0bf8e0a6f/example/lib/main.dart.incremental.dill,    
packagesUri: file:///C:/Users/T_OKAM~1/AppData/Local/Temp/example754f53f9-67df-11ea-ae30-d0c0bf8e0a6f/example/.packages, isolateId: 
isolates/2936779566527571})
[  +42 ms] Result: {type: ReloadReport, success: true, details: {finalLibraryCount: 487, receivedLibraryCount: 2,
receivedLibrariesBytes: 6216, receivedClassesCount: 6, receivedProceduresCount: 2, savedLibraryCount: 485, loadedLibraryCount: 2,   
shapeChangeMappings: []}}
[   +2 ms] <- accept
[        ] reloaded 2 of 487 libraries
[        ] Sending reload events to Windows
[        ] Sending reload event to "main.dart$main-2936779566527571"
[        ] Sending to VM service: getIsolate({isolateId: isolates/2936779566527571})
[   +7 ms] Result: {type: Isolate, id: isolates/2936779566527571, name: main, number: 2936779566527571, _originNumber:
2936779566527571, startTime: 1584402003796, _heaps: {new: {type: HeapSpace, name: new, vmName: Scavenger, collections: 7,
avgCollectionPeriodMillis...
[   +6 ms] Sending to VM service: _flutter.listViews({})
[   +7 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x2036c6686c0, isolate: {type: @Isolate,
fixedId: true, id: isolates/2936779566527571, name: main.dart$main-2936779566527571, number: 2936779566527571}}]}
[   +1 ms] Evicting dirty assets
[        ] Reassembling application
[   +1 ms] Sending to VM service: ext.flutter.reassemble({isolateId: isolates/2936779566527571})
[  +39 ms] Result: {type: _extensionType, method: ext.flutter.reassemble}
[   +2 ms] Hot reload performed in 204ms.
[        ] Performing hot reload... (completed in 208ms)
[        ] Reloaded 2 of 487 libraries in 210ms.
[+4907 ms] Performing hot reload...
[   +1 ms] Refreshing active FlutterViews before reloading.
[        ] Sending to VM service: _flutter.listViews({})
[   +1 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x2036c6686c0, isolate: {type: @Isolate,    
fixedId: true, id: isolates/2936779566527571, name: main.dart$main-2936779566527571, number: 2936779566527571}}]}
[  +38 ms] Scanned through 462 files in 32ms
[   +1 ms] Syncing files to device Windows...
[        ] Scanning asset files
[   +1 ms] Compiling dart to kernel with 1 updated files
[        ] <- recompile package:example_flutter/main.dart 1f8c73d7-0248-423c-9f86-d9535b6572a5
[        ] package:example_flutter/PageMain.dart
[        ] <- 1f8c73d7-0248-423c-9f86-d9535b6572a5
[  +10 ms] Updating files
[   +5 ms] DevFS: Sync finished
[        ] Syncing files to device Windows... (completed in 20ms)
[        ] Synced 0.0MB.
[        ] Sending to VM service: _reloadSources({pause: false, rootLibUri:
file:///C:/Users/T_OKAM~1/AppData/Local/Temp/example754f53f9-67df-11ea-ae30-d0c0bf8e0a6f/example/lib/main.dart.incremental.dill,    
packagesUri: file:///C:/Users/T_OKAM~1/AppData/Local/Temp/example754f53f9-67df-11ea-ae30-d0c0bf8e0a6f/example/.packages, isolateId: 
isolates/2936779566527571})
[  +36 ms] Result: {type: ReloadReport, success: true, details: {finalLibraryCount: 487, receivedLibraryCount: 2,
receivedLibrariesBytes: 6200, receivedClassesCount: 6, receivedProceduresCount: 2, savedLibraryCount: 485, loadedLibraryCount: 2,   
shapeChangeMappings: []}}
[   +1 ms] <- accept
[        ] reloaded 2 of 487 libraries
[        ] Sending reload events to Windows
[        ] Sending reload event to "main.dart$main-2936779566527571"
[        ] Sending to VM service: getIsolate({isolateId: isolates/2936779566527571})
[   +5 ms] Result: {type: Isolate, id: isolates/2936779566527571, name: main, number: 2936779566527571, _originNumber:
2936779566527571, startTime: 1584402003796, _heaps: {new: {type: HeapSpace, name: new, vmName: Scavenger, collections: 8,
avgCollectionPeriodMillis...
[   +5 ms] Sending to VM service: _flutter.listViews({})
[   +1 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x2036c6686c0, isolate: {type: @Isolate,    
fixedId: true, id: isolates/2936779566527571, name: main.dart$main-2936779566527571, number: 2936779566527571}}]}
[   +5 ms] Evicting dirty assets
[        ] Reassembling application
[        ] Sending to VM service: ext.flutter.reassemble({isolateId: isolates/2936779566527571})
[  +24 ms] Result: {type: _extensionType, method: ext.flutter.reassemble}
[   +6 ms] Hot reload performed in 156ms.
[        ] Performing hot reload... (completed in 157ms)
[        ] Reloaded 2 of 487 libraries in 159ms.
[+2901 ms] Performing hot reload...
[        ] Refreshing active FlutterViews before reloading.
[        ] Sending to VM service: _flutter.listViews({})
[   +1 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x2036c6686c0, isolate: {type: @Isolate,    
fixedId: true, id: isolates/2936779566527571, name: main.dart$main-2936779566527571, number: 2936779566527571}}]}
[  +34 ms] Scanned through 462 files in 33ms
[   +1 ms] Syncing files to device Windows...
[        ] Scanning asset files
[   +1 ms] Compiling dart to kernel with 1 updated files
[   +1 ms] <- recompile package:example_flutter/main.dart 19dc3788-eae6-4a67-bd0c-5e273af53f9c
[        ] package:example_flutter/PageMain.dart
[   +7 ms] <- 19dc3788-eae6-4a67-bd0c-5e273af53f9c
[  +11 ms] Updating files
[   +7 ms] DevFS: Sync finished
[        ] Syncing files to device Windows... (completed in 31ms)
[        ] Synced 0.0MB.
[        ] Sending to VM service: _reloadSources({pause: false, rootLibUri:
file:///C:/Users/T_OKAM~1/AppData/Local/Temp/example754f53f9-67df-11ea-ae30-d0c0bf8e0a6f/example/lib/main.dart.incremental.dill,    
packagesUri: file:///C:/Users/T_OKAM~1/AppData/Local/Temp/example754f53f9-67df-11ea-ae30-d0c0bf8e0a6f/example/.packages, isolateId: 
isolates/2936779566527571})
[  +42 ms] Result: {type: ReloadReport, success: true, details: {finalLibraryCount: 487, receivedLibraryCount: 2,
receivedLibrariesBytes: 6216, receivedClassesCount: 6, receivedProceduresCount: 2, savedLibraryCount: 485, loadedLibraryCount: 2,   
shapeChangeMappings: []}}
[   +1 ms] <- accept
[        ] reloaded 2 of 487 libraries
[        ] Sending reload events to Windows
[        ] Sending reload event to "main.dart$main-2936779566527571"
[        ] Sending to VM service: getIsolate({isolateId: isolates/2936779566527571})
[   +4 ms] Result: {type: Isolate, id: isolates/2936779566527571, name: main, number: 2936779566527571, _originNumber:
2936779566527571, startTime: 1584402003797, _heaps: {new: {type: HeapSpace, name: new, vmName: Scavenger, collections: 8,
avgCollectionPeriodMillis...
[   +5 ms] Sending to VM service: _flutter.listViews({})
[   +5 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x2036c6686c0, isolate: {type: @Isolate,
fixedId: true, id: isolates/2936779566527571, name: main.dart$main-2936779566527571, number: 2936779566527571}}]}
[        ] Evicting dirty assets
[        ] Reassembling application
[        ] Sending to VM service: ext.flutter.reassemble({isolateId: isolates/2936779566527571})
[  +27 ms] Result: {type: _extensionType, method: ext.flutter.reassemble}
[   +3 ms] Hot reload performed in 164ms.
[        ] Performing hot reload... (completed in 165ms)
[        ] Reloaded 2 of 487 libraries in 166ms.
[+2979 ms] Performing hot reload...
[        ] Refreshing active FlutterViews before reloading.
[        ] Sending to VM service: _flutter.listViews({})
[   +1 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x2036c6686c0, isolate: {type: @Isolate,    
fixedId: true, id: isolates/2936779566527571, name: main.dart$main-2936779566527571, number: 2936779566527571}}]}
[  +33 ms] Scanned through 462 files in 32ms
[        ] Syncing files to device Windows...
[        ] Scanning asset files
[   +1 ms] Compiling dart to kernel with 1 updated files
[   +1 ms] <- recompile package:example_flutter/main.dart c5640134-66d6-4baf-b05a-ad9b87554a95
[        ] package:example_flutter/PageMain.dart
[        ] <- c5640134-66d6-4baf-b05a-ad9b87554a95
[   +9 ms] Updating files
[   +6 ms] DevFS: Sync finished
[        ] Syncing files to device Windows... (completed in 20ms)
[        ] Synced 0.0MB.
[        ] Sending to VM service: _reloadSources({pause: false, rootLibUri:
file:///C:/Users/T_OKAM~1/AppData/Local/Temp/example754f53f9-67df-11ea-ae30-d0c0bf8e0a6f/example/lib/main.dart.incremental.dill,    
packagesUri: file:///C:/Users/T_OKAM~1/AppData/Local/Temp/example754f53f9-67df-11ea-ae30-d0c0bf8e0a6f/example/.packages, isolateId: 
isolates/2936779566527571})
[  +43 ms] Result: {type: ReloadReport, success: true, details: {finalLibraryCount: 487, receivedLibraryCount: 2,
receivedLibrariesBytes: 6216, receivedClassesCount: 6, receivedProceduresCount: 2, savedLibraryCount: 485, loadedLibraryCount: 2,   
shapeChangeMappings: []}}
[   +1 ms] <- accept
[        ] reloaded 2 of 487 libraries
[        ] Sending reload events to Windows
[        ] Sending reload event to "main.dart$main-2936779566527571"
[        ] Sending to VM service: getIsolate({isolateId: isolates/2936779566527571})
[   +4 ms] Result: {type: Isolate, id: isolates/2936779566527571, name: main, number: 2936779566527571, _originNumber:
2936779566527571, startTime: 1584402003797, _heaps: {new: {type: HeapSpace, name: new, vmName: Scavenger, collections: 8,
avgCollectionPeriodMillis...
[   +5 ms] Sending to VM service: _flutter.listViews({})
[   +5 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x2036c6686c0, isolate: {type: @Isolate,
fixedId: true, id: isolates/2936779566527571, name: main.dart$main-2936779566527571, number: 2936779566527571}}]}
[        ] Evicting dirty assets
[        ] Reassembling application
[        ] Sending to VM service: ext.flutter.reassemble({isolateId: isolates/2936779566527571})
[  +30 ms] Result: {type: _extensionType, method: ext.flutter.reassemble}
[   +1 ms] Hot reload performed in 152ms.
[        ] Performing hot reload... (completed in 153ms)
[        ] Reloaded 2 of 487 libraries in 154ms.
[+6005 ms] Service protocol connection closed.
[   +1 ms] Lost connection to device.
[   +2 ms] DevFS: Deleting filesystem on the device
(file:///C:/Users/T_OKAM~1/AppData/Local/Temp/example754f53f9-67df-11ea-ae30-d0c0bf8e0a6f/example/)
[   +4 ms] Sending to VM service: _deleteDevFS({fsName: example})
[  +16 ms] Performing hot reload...
[        ] Refreshing active FlutterViews before reloading.
[        ] Sending to VM service: _flutter.listViews({})
[ +236 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed
[   +3 ms] "flutter run" took 220,854ms.
```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
D:\flutter-desktop-embedding\example>flutter analyze
Analyzing example...

   info - Prefer declaring const constructors on `@immutable` classes - bug\lib\main.dart:31:3 -
          prefer_const_constructors_in_immutables
   info - Avoid annotating types for function expression parameters - bug\test\widget_test.dart:14:49 -
          avoid_types_on_closure_parameters
   info - The value of the field '_counter' isn't used - lib\PageMain.dart:27:7 - unused_field
   info - The declaration '_incrementCounter' isn't referenced - lib\PageMain.dart:29:8 - unused_element

4 issues found. (ran in 2.3s; 8 public members lack documentation)
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
D:\flutter-desktop-embedding\example>flutter doctor -v
[√] Flutter (Channel master, v1.15.22-pre.31, on Microsoft Windows [Version 10.0.18362.720], locale ja-JP)
    • Flutter version 1.15.22-pre.31 at D:\flutter
    • Framework revision f3b426a5fc (24 hours ago), 2020-03-15 19:16:01 -0400
    • Engine revision b23138c359
    • Dart version 2.8.0 (build 2.8.0-dev.14.0 eff5548a68)

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\t_okamoto\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: D:\software\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.4.5)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.4.29806.167

[√] Android Studio (version 3.6)
    • Android Studio at D:\software\Android\Android Studio
    • Flutter plugin version 43.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] Connected device (1 available)
    • Windows • Windows • windows-x64 • Microsoft Windows [Version 10.0.18362.720]

• No issues found!
```

</details>