Skip to content

[Inspector 2.0] Stack overflow error when building the new widget tree with implementation widgets  #8553

Closed
flutter/flutter
#159454

Description

@elliette

A Flutter web customer with a large widget tree reported that the new inspector is crashing for them when "show implementation widgets" is toggled on.

When it crashes, they see a "stack overflow" error in the Chrome DevTools console. I've confirmed that this is due to us building the widget tree's JSON object recursively, and it seems like we are hitting Chrome's stack limit.

They've confirmed that they don't see the stack overflow error when the widget tree JSON is built iteratively instead.

Activity

  1. elliette commented on Nov 25, 2024

    @elliette
    MemberAuthor

    Note: The iterative approach should only be used to build the widget tree itself, not to fetch any of the properties or details of a widget. This is because those require the recursive implementation to call toJsonMap for each node to get the details provided by the subclass implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1high priority issues at the top of the work list, actively being worked on.devtools-inspector-screen

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions