Skip to content

The WidgetInspector crashes on properties with cyclic dependencies #31959

@jacob314

Description

@jacob314

The crash is caught by tests for Dart DevTools. https://travis-ci.org/flutter/devtools/jobs/527085405
The problem is 63aa5b3 started expanding properties with Diagnosticable values a bit more aggressively which exposed a bug now that some Diagnosticable objects have properties that reference other Diagnosticable objects in a cyclic way.

  Server error (-32000) from ext.flutter.inspector.getChildrenDetailsSubtree():
  {"exception":"Stack Overflow","stack":"#0      DiagnosticsProperty._maybeCacheValue (package:flutter/src/foundation/diagnostics.dart:2603:3)\n
#1      DiagnosticsProperty.toDescription (package:flutter/src/foundation/diagnostics.dart:2599:5)\n
#2      DiagnosticsNode.toJsonMap (package:flutter/src/foundation/diagnostics.dart:1530:22)\n
#3      DiagnosticsProperty.toJsonMap (package:flutter/src/foundation/diagnostics.dart:2475:44)\n
#4      _WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1454:43)\n
#5      _WidgetInspectorService._nodesToJson.<anonymous closure> 

Metadata

Metadata

Assignees

Labels

c: crashStack traces logged to the console

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions