Skip to content

Track widget builds is broken #101379

@kenzieschmoll

Description

@kenzieschmoll

I noticed this today when working off of Flutter 2.12.0-4.1.pre but this is reproducible on master (2.13.0-0.0.pre.386), too.

With track widget builds enabled, there appears to be an extra begin ("ph":"B") BUILD event (or sometimes more than one) that does not have a corresponding end timeline event ("ph":"E"). This results in an out of balance event tree that DevTools cannot render. I'm going to look to see if we can add some graceful handling for this in DevTools, but there is likely a spot in the framework where we are not ending a timeline event that we should fix.

In the attached json file (you'll have to remove the .txt extension to turn it back to json), the problem BUILD event is near the top of the file and is separated from the rest of the json by a few new lines. Without this event, the timeline events will render as expected in DevTools. Near the end of the json file, there is another small group events separated by new lines. We would have expected the end BUILD event to come in somewhere between "FINALIZE TREE" and "Engine::BeginFrame", but it is missing. If you add this stubbed event before "Engine::BeginFrame", the timeline events will render as expected in DevTools: {"name":"BUILD","cat":"Dart","tid":42243,"pid":48755,"ts":67688975310,"tts":3618953,"ph":"E","args":{}},

dart_devtools_2022_4_5-1649191866099915.json.txt

Metadata

Metadata

Assignees

Labels

P0Critical issues such as a build break or regressiona: devtoolsDevTools related - suite of performance and debugging toolsc: regressionIt was better in the past than it is nowframeworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions