<h2 dir="auto">Steps to Reproduce</h2>

<ol dir="auto">
<li>flutter create newapp</li>
<li>...</li>
<li>...</li>
</ol>
<h2 dir="auto">Logs</h2>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto">Noticed this while investigating <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="342853918" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/19571" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/19571/hovercard" href="https://github.com/flutter/flutter/issues/19571">#19571</a></p>
<ol dir="auto">
<li>Run this Flutter app:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class Foo { }
void main() { print(new Foo()); }"><pre class="notranslate"><code class="notranslate">class Foo { }
void main() { print(new Foo()); }
</code></pre></div>
<ol start="2" dir="auto">
<li>
<p dir="auto">Add a second <code class="notranslate">class Foo { }</code> declaration, and do a hot reload.</p>
</li>
<li>
<p dir="auto">Do another hot reload.  The engine will crash inside Dart's ReloadSources.</p>
</li>
</ol>
<p dir="auto"><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></p>
<p dir="auto">Stack trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#0  dart::Object::SetRaw (this=0x8b51c63c, value=0x50f05) at ../../third_party/dart/runtime/vm/object.h:9169
#1  dart::String::initializeHandle (obj=0x8b51c63c, raw_ptr=0x50f05) at ../../third_party/dart/runtime/vm/object.h:7374
#2  dart::String::Handle (zone=&lt;optimized out&gt;, raw_ptr=0x50f05) at ../../third_party/dart/runtime/vm/object.h:7374
#3  dart::String::Handle (raw_ptr=0x50f05) at ../../third_party/dart/runtime/vm/object.h:7374
#4  dart::IsolateReloadContext::Reload (this=0x89bb6940, force_reload=false, root_script_url=&lt;optimized out&gt;, 
    packages_url_=0x8b51c398 &quot;/data/user/0/com.example.bug19571/cache/bug_19571XQXBUU/bug_19571/.packages&quot;)
    at ../../third_party/dart/runtime/vm/isolate_reload.cc:550
#5  0x8c0b0ca6 in dart::Isolate::ReloadSources (this=0x89a4ea00, js=&lt;optimized out&gt;, force_reload=33, 
    root_script_url=0x1 &lt;error: Cannot access memory at address 0x1&gt;, 
    packages_url=0x8b51c398 &quot;/data/user/0/com.example.bug19571/cache/bug_19571XQXBUU/bug_19571/.packages&quot;, 
    dont_delete_reload_context=&lt;optimized out&gt;) at ../../third_party/dart/runtime/vm/isolate.cc:1230
#6  0x8c1e1bce in dart::ReloadSources (thread=&lt;optimized out&gt;, js=&lt;optimized out&gt;) at ../../third_party/dart/runtime/vm/service.cc:3053
#7  0x8c1da36a in dart::Service::InvokeMethod (I=0x89a4ea00, msg=..., parameters_are_dart_objects=false)
    at ../../third_party/dart/runtime/vm/service.cc:869
#8  0x8c1da92c in dart::Service::HandleIsolateMessage (isolate=0x89a4ea00, msg=...) at ../../third_party/dart/runtime/vm/service.cc:917
#9  0x8c0ae008 in dart::IsolateMessageHandler::HandleMessage (this=&lt;optimized out&gt;, message=&lt;optimized out&gt;)
    at ../../third_party/dart/runtime/vm/isolate.cc:565
#10 0x8c0ccd44 in dart::MessageHandler::HandleMessages (this=0x98cb1ca0, ml=&lt;optimized out&gt;, allow_normal_messages=true, 
    allow_multiple_normal_messages=&lt;optimized out&gt;) at ../../third_party/dart/runtime/vm/message_handler.cc:231
#11 0x8c0cce10 in dart::MessageHandler::HandleNextMessage (this=0x98cb1ca0) at ../../third_party/dart/runtime/vm/message_handler.cc:290
#12 0x8c3032a4 in Dart_HandleMessage () at ../../third_party/dart/runtime/vm/dart_api_impl.cc:1664
#13 0x8bf07b10 in tonic::DartMessageHandler::OnHandleMessage (this=0x89a701e0, dart_state=0x9af78890)
    at ../../third_party/tonic/dart_message_handler.cc:114"><pre class="notranslate"><code class="notranslate">#0  dart::Object::SetRaw (this=0x8b51c63c, value=0x50f05) at ../../third_party/dart/runtime/vm/object.h:9169
#1  dart::String::initializeHandle (obj=0x8b51c63c, raw_ptr=0x50f05) at ../../third_party/dart/runtime/vm/object.h:7374
#2  dart::String::Handle (zone=&lt;optimized out&gt;, raw_ptr=0x50f05) at ../../third_party/dart/runtime/vm/object.h:7374
#3  dart::String::Handle (raw_ptr=0x50f05) at ../../third_party/dart/runtime/vm/object.h:7374
#4  dart::IsolateReloadContext::Reload (this=0x89bb6940, force_reload=false, root_script_url=&lt;optimized out&gt;, 
    packages_url_=0x8b51c398 "/data/user/0/com.example.bug19571/cache/bug_19571XQXBUU/bug_19571/.packages")
    at ../../third_party/dart/runtime/vm/isolate_reload.cc:550
#5  0x8c0b0ca6 in dart::Isolate::ReloadSources (this=0x89a4ea00, js=&lt;optimized out&gt;, force_reload=33, 
    root_script_url=0x1 &lt;error: Cannot access memory at address 0x1&gt;, 
    packages_url=0x8b51c398 "/data/user/0/com.example.bug19571/cache/bug_19571XQXBUU/bug_19571/.packages", 
    dont_delete_reload_context=&lt;optimized out&gt;) at ../../third_party/dart/runtime/vm/isolate.cc:1230
#6  0x8c1e1bce in dart::ReloadSources (thread=&lt;optimized out&gt;, js=&lt;optimized out&gt;) at ../../third_party/dart/runtime/vm/service.cc:3053
#7  0x8c1da36a in dart::Service::InvokeMethod (I=0x89a4ea00, msg=..., parameters_are_dart_objects=false)
    at ../../third_party/dart/runtime/vm/service.cc:869
#8  0x8c1da92c in dart::Service::HandleIsolateMessage (isolate=0x89a4ea00, msg=...) at ../../third_party/dart/runtime/vm/service.cc:917
#9  0x8c0ae008 in dart::IsolateMessageHandler::HandleMessage (this=&lt;optimized out&gt;, message=&lt;optimized out&gt;)
    at ../../third_party/dart/runtime/vm/isolate.cc:565
#10 0x8c0ccd44 in dart::MessageHandler::HandleMessages (this=0x98cb1ca0, ml=&lt;optimized out&gt;, allow_normal_messages=true, 
    allow_multiple_normal_messages=&lt;optimized out&gt;) at ../../third_party/dart/runtime/vm/message_handler.cc:231
#11 0x8c0cce10 in dart::MessageHandler::HandleNextMessage (this=0x98cb1ca0) at ../../third_party/dart/runtime/vm/message_handler.cc:290
#12 0x8c3032a4 in Dart_HandleMessage () at ../../third_party/dart/runtime/vm/dart_api_impl.cc:1664
#13 0x8bf07b10 in tonic::DartMessageHandler::OnHandleMessage (this=0x89a701e0, dart_state=0x9af78890)
    at ../../third_party/tonic/dart_message_handler.cc:114
</code></pre></div>