<p dir="auto">I'm not sure if this belongs in sdk, but while working on flutter/devtools I've noticed some intermittently, the VM on the device will crash when I hit Reload on the browser (which has a ws connection open to the VM on the device).</p>
<p dir="auto">It's possible to repro without flutter/devtools by just opening Observatory in your browser and hitting reload a few times.</p>
<ol dir="auto">
<li><code class="notranslate">flutter run -v</code> in a console</li>
<li>Wait for <code class="notranslate">An Observatory debugger and profiler on iPhone X is available at: http://127.0.0.1:59279/</code></li>
<li>Copy and paste this url into your browser to load Observatory</li>
<li>Hit reload on your browser repeatedly (it doesn't need to be particularly fast)</li>
<li>Observe Flutter app vanish from the device and <code class="notranslate">flutter run</code> terminates:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[        ] An Observatory debugger and profiler on iPhone X is available at: http://127.0.0.1:60056/
[        ] For a more detailed help message, press &quot;h&quot;. To detach, press &quot;d&quot;; to quit, press &quot;q&quot;.
[+14348 ms] Service protocol connection closed.
[   +1 ms] Lost connection to device."><pre class="notranslate"><code class="notranslate">[        ] An Observatory debugger and profiler on iPhone X is available at: http://127.0.0.1:60056/
[        ] For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".
[+14348 ms] Service protocol connection closed.
[   +1 ms] Lost connection to device.
</code></pre></div>
<p dir="auto">I'm hitting this using macOS on the iOS Simulator running the <code class="notranslate">flutter_gallery</code> example app (using <code class="notranslate">master</code> code from today).</p>
<p dir="auto">I see a consistent crash when a debugger disconnects from a running Flutter app. To repro:</p>
<ul dir="auto">
<li>run a flutter app (<code class="notranslate">flutter run</code>)</li>
<li>connect to the indicated url via the observatory (<code class="notranslate">An Observatory debugger and profiler on iPhone X is available at...</code>)</li>
<li>refresh the page</li>
</ul>
<p dir="auto">The Flutter runtime will generally crash on the first page refresh (when the debugger client connection goes away). It will occasionally survive the first page refresh, but generally not more than that.</p>
<p dir="auto">I've tested this against the iOS simulator. I don't see the same crash when run against the android emulator - I can refresh the observatory page ~12 times.</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/a-siva/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/a-siva">@a-siva</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/cbracken/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cbracken">@cbracken</a></p>