Crashing during hot reload when --track-widget-creation is enabled
See original GitHub issuevscode extension Dart was upgraded to 2.17.0. Running with “Start Debugging F5”. Using iOS simulator, iPhone X, iOS 11.1. Any minor change, even adding in whitespace, and Saving (cmd-s), causing a hot reload, results in the following
../../third_party/dart/runtime/vm/object.h: 8847: error: Handle check failed: saw Instance of 'HomePage' expected Closure
Dumping native stack trace for thread 5c03
[0x00000001008ac0d4] dart::Profiler::DumpStackTrace(void*)
[0x00000001008ac0d4] dart::Profiler::DumpStackTrace(void*)
[0x0000000100b20142] dart::Assert::Fail(char const*, ...)
[0x0000000100903f3b] dart::DRT_InvokeClosureNoSuchMethod(dart::NativeArguments)
[0x000000011678085b] [Stub] CallToRuntime
[0x0000000116782dc4] [Stub] CallClosureNoSuchMethod
[0x000000011f3be9cb] new HomePage
[0x000000011f3be69a] MyApp.build
[0x000000011c179714] StatelessElement.build
[0x000000011c178a5e] ComponentElement.performRebuild
[0x000000011c177bc1] Element.rebuild
[0x000000011c16b1d0] BuildOwner.buildScope
[0x00000001169c1370] _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame
[0x00000001169c0f68] _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback
[0x00000001169c0d7f] _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback
[0x00000001188e68b5] _Closure.call
[0x00000001169c0796] _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback
[0x000000011c480b28] _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame
[0x000000011ca2680b] _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleWarmUpFrame.<anonymous closure>
[0x00000001188c0512] _Closure.call
[0x000000011cf7f96d] Timer._createTimer.<anonymous closure>
[0x00000001188e68b5] _Closure.call
[0x000000011cf7ea75] _Timer._runTimers
[0x00000001169bdc32] _Timer._handleMessage
[0x00000001169bd73b] _Timer._handleMessage
[0x00000001188e68b5] _Closure.call
[0x00000001188e67bc] _RawReceivePortImpl._handleMessage
[0x0000000116780ce3] [Stub] InvokeDartCode
[0x00000001007637c9] dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)
[0x0000000100766f0e] dart::DartLibraryCalls::HandleMessage(dart::Object const&, dart::Instance const&)
[0x0000000100792ed6] dart::IsolateMessageHandler::HandleMessage(dart::Message*)
[0x00000001007bdfee] dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)
[0x00000001007be0f0] dart::MessageHandler::HandleNextMessage()
[0x0000000100aa0175] Dart_HandleMessage
[0x00000001005ef285] tonic::DartMessageHandler::OnHandleMessage(tonic::DartState*)
[0x000000010027c222] fml::MessageLoopImpl::RunExpiredTasks()
[0x000000010027ef1a] fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*)
[0x00000001028832a4] __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
[0x0000000102882f62] __CFRunLoopDoTimer
[0x0000000102882b1a] __CFRunLoopDoTimers
[0x000000010287a534] __CFRunLoopRun
[0x00000001028799b9] CFRunLoopRunSpecific
[0x000000010027f06b] fml::MessageLoopDarwin::Run()
[0x000000010027c359] fml::MessageLoopImpl::DoRun()
[0x000000010027ea70] 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*, void*)
[0x0000000107ec8661] _pthread_body
[0x0000000107ec850d] _pthread_body
[0x0000000107ec7bf9] thread_start
Lost connection to device.
-- End of DumpStackTrace
Exited (sigterm)
Also logged here https://github.com/flutter/flutter/issues/20191. Could this be related to the “Inspect Flutter Widget” feature added?
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Hot Reload crashes Editor - Getting Started & Setup
Since 4.25 HotReload doesn't work properly. Everytime when I compile a project in Visual Studio or inside UE4 Editor I've got a crash...
Read more >MAUI Android App crashes with Hot Reload enabled on ...
When running on Android Emulator (Pixel 2 R.11.0 - API 30 - x86), if Hot Reload is enabled, the app starts, show the...
Read more >Troubleshoot crash or freeze in Photoshop
Fix common crash issues in 6 simple steps. Check for a Known issue in Photoshop. Force quit and restart Photoshop or restart your...
Read more >Game crashes or closes unexpectedly
Symptoms of the problem · Method 1: Check for the latest update for the game · Method 2: Restart the computer by using...
Read more >Hot Reload
With hot reload enabled, when you edit a *.vue file, all instances of that component will be swapped in without reloading the page....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s the only thing I could think could have caused this to appear in this version, since there’s not really anything else that’d affect how
flutter run
behaves.Can you try setting
"dart.flutterTrackWidgetCreation": false
in your VS Code settings and see if that fixes things?@LJame the crash that this is case referred to was actually fixed prior to Flutter 1.0 (so we re-enabled it by default in #1277) though I forgot to resolve this. If you’re on Flutter >= 1.0 and seeing crashes only when track-widget-creation is enabled, would you mind opening at https://github.com/flutter/flutter?
If you do need to disable it, the instructions Devon gave above apply to both IntelliJ and Android Studio:
Hope this helps!