Skip to content

Crashing during hot reload when --track-widget-creation is enabled #1133

@c4talyst

Description

@c4talyst

vscode 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 flutter/flutter#20191. Could this be related to the "Inspect Flutter Widget" feature added?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions