You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mac_ios microbenchmarks_ios fails with random seed 225627159 #156506
changed the title [-]`Mac_ios microbenchmarks_ios` failing very frequently[/-][+]`Mac_ios microbenchmarks_ios` fails with random seed 225627159[/+]on Oct 10, 2024
It appears this was failing due to the daily random seed used for ordering the tests: 225627159. I'm reducing the priority on this since today it is no longer failing, and assigning to @jtmcdole to debug.
running lib/benchmark_collection.dart in release mode on an iPhone 11
The error occurs when two calls to LiveTestWidgetsFlutterBinding.handleBeginFrame happen with no handleDrawFrame call in between.
Bad state: handleBeginFrame() called before previous handleDrawFrame()
#0 LiveTestWidgetsFlutterBinding.handleBeginFrame (package:flutter_test/src/binding.dart:1788)
#1 BenchmarkingBinding.handleBeginFrame (package:microbenchmarks/benchmark_binding.dart:15)
#2 SchedulerBinding._handleBeginFrame (package:flutter/src/scheduler/binding.dart:1155)
#6 _invoke1 (dart:ui/hooks.dart:330)
#7 PlatformDispatcher._beginFrame (dart:ui/platform_dispatcher.dart:405)
#8 _beginFrame (dart:ui/hooks.dart:272)
On my setup that happened due to a race between the handleBeginFrame calls made by WidgetTester.pumpBenchmark and handleBeginFrame calls initiated by the engine in response to system events.
Shortly after launching the benchmark the iOS engine received an event that triggered a call to updateViewportMetrics. This causes the engine to schedule a frame and call handleBeginFrame at the next vsync. If that handleBeginFrame happens during a frame interval started by pumpBenchmark, then you get the exception above.
@goderbauer Would it make sense for LiveTestWidgetsFlutterBinding to be less strict about the interleaving of handleBeginFrame and handleDrawFrame calls? The test framework can not assume that it has complete control over frame scheduling.
Instead of throwing,LiveTestWidgetsFlutterBinding.handleBeginFrame could warn about an unexpected handleBeginFrame and skip the call to the superclass.
I'm currently moving to cycle the microbenchmarks from native, with new a FlutterEngine created for each to keep the test time low and try to stabilize the test numbers.
This issue is assigned to @jtmcdole but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
This issue was assigned to @jtmcdole but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
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.
Activity
[-]`Mac_ios microbenchmarks_ios` failing very frequently[/-][+]`Mac_ios microbenchmarks_ios` fails with random seed 225627159[/+]christopherfujino commentedon Oct 10, 2024
It appears this was failing due to the daily random seed used for ordering the tests:
225627159. I'm reducing the priority on this since today it is no longer failing, and assigning to @jtmcdole to debug.jtmcdole commentedon Oct 10, 2024
Yep - this failed locally for me on the first microbenchmark run in the seed (
layout/text_intrinsic_bench.dart)jason-simmons commentedon Oct 10, 2024
I was able to reproduce this by:
layout/text_intrinsic_bench.dartbenchmarklib/benchmark_collection.dartin release mode on an iPhone 11The error occurs when two calls to
LiveTestWidgetsFlutterBinding.handleBeginFramehappen with nohandleDrawFramecall in between.On my setup that happened due to a race between the
handleBeginFramecalls made byWidgetTester.pumpBenchmarkandhandleBeginFramecalls initiated by the engine in response to system events.Shortly after launching the benchmark the iOS engine received an event that triggered a call to
updateViewportMetrics. This causes the engine to schedule a frame and callhandleBeginFrameat the next vsync. If thathandleBeginFramehappens during a frame interval started bypumpBenchmark, then you get the exception above.@goderbauer Would it make sense for
LiveTestWidgetsFlutterBindingto be less strict about the interleaving ofhandleBeginFrameandhandleDrawFramecalls? The test framework can not assume that it has complete control over frame scheduling.Instead of throwing,
LiveTestWidgetsFlutterBinding.handleBeginFramecould warn about an unexpectedhandleBeginFrameand skip the call to the superclass.jtmcdole commentedon Oct 11, 2024
I'm currently moving to cycle the microbenchmarks from native, with new a FlutterEngine created for each to keep the test time low and try to stabilize the test numbers.
flutter-triage-bot commentedon Feb 14, 2025
This issue is assigned to @jtmcdole but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
Update Mac_mokey microbenchmarks with issue to the bringup: true in c…
flutter-triage-bot commentedon May 3, 2025
This issue was assigned to @jtmcdole but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
github-actions commentedon Jun 11, 2025
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 -vand a minimal reproduction of the issue.