Repository: flutter
Issue: Failed assert in Widget Inspector
Labels: c: crash,framework,f: inspector,P2,team-framework,triaged-framework

@jacob314 I'm not sure what I did here, but I was running the Gallery from the console, had devtools (built JS version) open and was clicking toggle buttons when I got the red screen in the simulator and this dumped to the console (where I'd run `flutter run`).

```
🔥  To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
An Observatory debugger and profiler on iPhone XS Max is available at: http://127.0.0.1:8182/
For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following assertion was thrown building Title(title: "Flutter Gallery", color:
flutter: MaterialColor(primary value: Color(0xff9e9e9e))):
flutter: 'package:flutter/src/widgets/widget_inspector.dart': Failed assertion: line 2181 pos 12:
flutter: 'WidgetInspectorService.instance.selectionChangedCallback == null': is not true.
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter:   https://github.com/flutter/flutter/issues/new?template=BUG.md
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2      _WidgetInspectorState.initState (package:flutter/src/widgets/widget_inspector.dart:2181:12)
flutter: #3      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3830:58)
flutter: #4      ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #5      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #6      Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #7      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #8      Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #9      StatelessElement.update (package:flutter/src/widgets/framework.dart:3781:5)
flutter: #10     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #11     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #12     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #13     ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)
flutter: #14     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #15     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #16     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #17     ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)
flutter: #18     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #19     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)
flutter: #20     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #21     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #22     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #23     StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)
flutter: #24     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #25     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #26     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #27     ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)
flutter: #28     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #29     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #30     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #31     StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)
flutter: #32     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #33     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #34     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #35     ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)
flutter: #36     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #37     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #38     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #39     ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)
flutter: #40     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #41     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #42     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #43     ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)
flutter: #44     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #45     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #46     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #47     StatelessElement.update (package:flutter/src/widgets/framework.dart:3781:5)
flutter: #48     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #49     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #50     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #51     StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)
flutter: #52     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #53     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #54     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #55     ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)
flutter: #56     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #57     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #58     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #59     StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)
flutter: #60     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #61     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #62     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #63     ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)
flutter: #64     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #65     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #66     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #67     StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)
flutter: #68     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #69     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #70     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #71     StatelessElement.update (package:flutter/src/widgets/framework.dart:3781:5)
flutter: #72     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
flutter: #73     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #74     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #75     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2286:33)
flutter: #76     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:685:20)
flutter: #77     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5)
flutter: #78     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
flutter: #79     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
flutter: #80     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
flutter: #81     _invoke (dart:ui/hooks.dart:173:13)
flutter: #82     _drawFrame (dart:ui/hooks.dart:162:3)
flutter: (elided 2 frames from class _AssertionError)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
```

![screenshot 2019-01-24 at 11 31 36 am](https://user-images.githubusercontent.com/1078012/51675457-a0e9a680-1fcb-11e9-8b40-a143ffc41deb.png)