Skip to content

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

Closed

Description

@stuartmorgan-g

If I run a macOS Flutter application in VS Code with the new desktop flutter run functionality, hot reload crashes the target app; some searching based on the stack turned up Dart-Code/Dart-Code#1133 and related bugs, which it turned out is the culprit here as well (disabling widget creation tracking fixes the problem).

@DanTup @devoncarew can you provide some more context on what the underlying fix involved? Is there per-platform support that needs to be wired up for this feature in Flutter?

(Note: I haven't tried yet on Linux and Windows; it may happen there as well.)

Activity

  1. stuartmorgan-g commented on Apr 18, 2019

    @stuartmorgan-g
    ContributorAuthor

    @jonahwilliams You mentioned in email that we need a flag at creation time (is that 'build bundle', or the compilation?); is that something that should be done unconditionally in debug builds?

  2. jonahwilliams commented on Apr 18, 2019

    @jonahwilliams
    Contributor

    We should pass whether track-widget-creation is enabled through to the build script, and then that should be passed to the bundle build

  3. stuartmorgan-g commented on Apr 18, 2019

    @stuartmorgan-g
    ContributorAuthor

    I'll need to solve the problem of passing things into the build from each platform's script before I can do that, but I need to do that for FLUTTER_ROOT anyway.

  4. jonahwilliams commented on Apr 19, 2019

    @jonahwilliams
    Contributor

    Even if we build with the right flag (#31329), it still looks like the engine is using the wrong dill file.

  5. stuartmorgan-g commented on Apr 20, 2019

    @stuartmorgan-g
    ContributorAuthor

    Are you sure the flag is being set? I haven't reviewed in detail yet, but it didn't look like you'd wired up loading the generated xcconfig in the project, which would mean it wouldn't ever actually know to set the flag.

    I can add that logic next week.

  6. changed the title [-][macos] Crashing during hot reload when --track-widget-creation is enabled[/-] [+]Crashing during hot reload when --track-widget-creation is enabled[/+] on Apr 21, 2019
  7. github-actions commented on Aug 29, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

a: desktopRunning on desktopc: crashStack traces logged to the consoleengineflutter/engine related. See also e: labels.platform-macosBuilding on or for macOS specifically

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions