Skip to content

[Google3 Bug]: App crash due to Flutter roll #168445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 4 tasks
letramygoogle opened this issue May 7, 2025 · 12 comments
Open
1 of 4 tasks

[Google3 Bug]: App crash due to Flutter roll #168445

letramygoogle opened this issue May 7, 2025 · 12 comments
Labels
c: crash Stack traces logged to the console customer: google Various Google teams framework flutter/packages/flutter repository. See also f: labels. needs repro info Automated crash report whose cause isn't yet known P2 Important issues not at the top of the work list team-framework Owned by Framework team triaged-framework Triaged by Framework team

Comments

@letramygoogle
Copy link

letramygoogle commented May 7, 2025

EDIT by @matanlurey: This has nothing to do with the Flutter tool, it was a red herring. See #168445 (comment).


Help us understand the severity of this issue

  • causing severe production issues e.g. malfunctions or data loss
  • blocking next binary release
  • blocking a client feature launch within a quarter
  • nice-to-have but does not block a launch within the next quarter

Steps to reproduce

Crash report: b/416159318

It seems that the culprit is this Flutter roll cl/753573741

Expected results

App doesn't crash

Actual results

App crashed

Code sample

Not adding a minimal repro as not sure what caused the crash

Screenshots or Video

Attached in b/416159318

Logs

Attached in b/416159318

Flutter Doctor output

[   +2 ms] ProcessManager.runSync('which java')
[   +6 ms] executing: /usr/bin/adb devices -l
[        ] ProcessManager.run('/usr/bin/adb devices -l')
[        ] Gallium device polling: connecting to galliumd.
[        ] [✓] Flutter (Channel google3, on Debian GNU/Linux rodete 6.12.17-1rodete2-amd64, locale en_US.UTF-8) [0ms]
[        ]     • Framework revision 4a6965c4e6 (19 days ago), 2025-04-18T00:00:00.000
[        ]     • Engine revision 4a6965c4e6
[        ]     • Dart version 0cfefe2a03
[        ] [☠] Android toolchain - develop for Android devices (the doctor check crashed)
[        ]     ✗ Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know about
this issue
                 at https://github.com/flutter/flutter/issues.
[        ]     ✗ type 'Null' is not a subtype of type 'String' of 'executable'
[        ]     • #0      LocalProcessManager.canRun (package:process/src/interface/local_process_manager.dart:124)
[        ]       #1      getEmulatorVersion (package:flutter_tools/src/android/android_workflow.dart:64)
[        ]       #2      AndroidValidator.validateImpl (package:flutter_tools/src/android/android_workflow.dart:200)
[        ]       #3      DoctorValidator.validate (package:flutter_tools/src/doctor_validator.dart:58)
[        ]       #4      Doctor.startValidatorTasks.<anonymous closure> (package:flutter_tools/src/doctor.dart:244)
[        ]       #5      asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:109)
[        ]       #6      _rootRun (dart:async/zone.dart:1525)
[        ]       #7      _CustomZone.run (dart:async/zone.dart:1422)
[        ]       #8      _runZoned (dart:async/zone.dart:2033)
[        ]       #9      runZonedGuarded (dart:async/zone.dart:2019)
[        ]       #10     runZoned (dart:async/zone.dart:1952)
[        ]       #11     asyncGuard (package:flutter_tools/src/base/async_guard.dart:106)
[        ]       #12     Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:234)
[        ]       #13     Doctor.diagnose (package:flutter_tools/src/doctor.dart:372)
[        ]       #14     DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:59)
[        ]       #15     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1897)
[        ]       <asynchronous suspension>
[        ]       #16     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1551)
[        ]       <asynchronous suspension>
[        ]       #17     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154)
[        ]       <asynchronous suspension>
[        ]       #18     CommandRunner.runCommand (package:args/command_runner.dart:212)
[        ]       <asynchronous suspension>
[        ]       #19     FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:501)
[        ]       <asynchronous suspension>
[        ]       #20     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154)
[        ]       <asynchronous suspension>
[        ]       #21     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:438)
[        ]       <asynchronous suspension>
[        ]       #22     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:98)
[        ]       <asynchronous suspension>
[        ]       #23     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154)
[        ]       <asynchronous suspension>
[        ]       #24     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154)
[        ]       <asynchronous suspension>
[        ]       #25     run (package:mobile.flutter.cli/flutter_tools.dart:106)
[        ]       <asynchronous suspension>
[        ]       #26     main (google3:///mobile/flutter/cli/bin/cli_usage_aot.dart:4)
[        ]       <asynchronous suspension>
[        ] [✓] VS Code (version unknown) [0ms]
[        ]     • VS Code at /usr/share/code
[        ]     • Flutter extension can be installed from:
[        ]       🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[        ]     ✗ Unable to determine VS Code version.
[   +8 ms] List of devices attached
           localhost:38655        device product:lynx model:Pixel_7a device:lynx transport_id:13
[   +9 ms] Gallium device polling failed to connect to galliumd: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting:
SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = localhost, port = 40890, details: null,
rawResponse: null, trailers: {})
[        ] /usr/bin/adb -s localhost:38655 shell getprop
[        ] ProcessManager.run('/usr/bin/adb -s localhost:38655 shell getprop')
[ +316 ms] ro.hardware = lynx
[        ] ro.build.characteristics = nosdcard
[        ] executing: uname -m
[        ] ProcessManager.runSync('uname -m')
[   +3 ms] Exit code 0 from: uname -m
[        ] x86_64
[        ] executing: /usr/bin/adb devices -l
[        ] ProcessManager.run('/usr/bin/adb devices -l')
[   +4 ms] List of devices attached
           localhost:38655        device product:lynx model:Pixel_7a device:lynx transport_id:13
[        ] [✓] Connected device (2 available) [347ms]
[        ]     • Pixel 7a (mobile) • localhost:38655 • android-arm64 • Android 13 (API 33)
[        ]     • Linux (desktop)   • linux           • linux-x64     • Debian GNU/Linux rodete 6.12.17-1rodete2-amd64
[        ] [✓] Google3 (on linux) [11ms]
[        ]     • KVM enabled
[        ] ! Doctor found issues in 1 category.
[        ] "flutter doctor" took 355ms.
[        ] Running 2 shutdown hooks
[        ] Shutdown hooks complete
[   +1 ms] exiting with code 0
@letramygoogle letramygoogle added the customer: google Various Google teams label May 7, 2025
@darshankawar darshankawar added the in triage Presently being triaged by the triage team label May 7, 2025
@darshankawar
Copy link
Member

@letramygoogle This seems similar to #167489 which was fixed couple of weeks ago. If you could try with latest master version to see if it resolves ?

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 7, 2025
@letramygoogle
Copy link
Author

Hi I have tried with the latest master version that's rolled into google3 and it seems that the issue is still reproducible.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 8, 2025
@letramygoogle
Copy link
Author

letramygoogle commented May 8, 2025

Output from fg3 doctor when running fg3 but built from source

[✓] Flutter (Channel google3, on Debian GNU/Linux rodete 6.12.17-1rodete2-amd64,
    locale en_US.UTF-8) [0ms]
    • Framework revision 4a6965c4e6 (20 days ago), 2025-04-18T00:00:00.000
    • Engine revision 4a6965c4e6
    • Dart version 0cfefe2a03

[☠] Android toolchain - develop for Android devices (the doctor check crashed)
    ✗ Due to an error, the doctor check did not complete. If the error message
      below is not helpful, please let us know about this issue at
      https://github.com/flutter/flutter/issues.
    ✗ type 'Null' is not a subtype of type 'String' of 'executable'
    • #0      LocalProcessManager.canRun
      (package:process/src/interface/local_process_manager.dart:124)
      #1      getEmulatorVersion
      (package:flutter_tools/src/android/android_workflow.dart:64)
      #2      AndroidValidator.validateImpl
      (package:flutter_tools/src/android/android_workflow.dart:200)
      #3      DoctorValidator.validate
      (package:flutter_tools/src/doctor_validator.dart:58)
      #4      Doctor.startValidatorTasks.<anonymous closure>
      (package:flutter_tools/src/doctor.dart:244)
      #5      asyncGuard.<anonymous closure>
      (package:flutter_tools/src/base/async_guard.dart:109)
      #6      _rootRun (dart:async/zone.dart:1525)
      #7      _CustomZone.run (dart:async/zone.dart:1422)
      #8      _runZoned (dart:async/zone.dart:2033)
      #9      runZonedGuarded (dart:async/zone.dart:2019)
      #10     runZoned (dart:async/zone.dart:1952)
      #11     asyncGuard (package:flutter_tools/src/base/async_guard.dart:106)
      #12     Doctor.startValidatorTasks
      (package:flutter_tools/src/doctor.dart:234)
      #13     Doctor.diagnose (package:flutter_tools/src/doctor.dart:372)
      #14     DoctorCommand.runCommand
      (package:flutter_tools/src/commands/doctor.dart:59)
      #15     FlutterCommand.verifyThenRunCommand
      (package:flutter_tools/src/runner/flutter_command.dart:1897)
      <asynchronous suspension>
      #16     FlutterCommand.run.<anonymous closure>
      (package:flutter_tools/src/runner/flutter_command.dart:1551)
      <asynchronous suspension>
      #17     AppContext.run.<anonymous closure>
      (package:flutter_tools/src/base/context.dart:154)
      <asynchronous suspension>
      #18     CommandRunner.runCommand (package:args/command_runner.dart:212)
      <asynchronous suspension>
      #19     FlutterCommandRunner.runCommand.<anonymous closure>
      (package:flutter_tools/src/runner/flutter_command_runner.dart:501)
      <asynchronous suspension>
      #20     AppContext.run.<anonymous closure>
      (package:flutter_tools/src/base/context.dart:154)
      <asynchronous suspension>
      #21     FlutterCommandRunner.runCommand
      (package:flutter_tools/src/runner/flutter_command_runner.dart:438)
      <asynchronous suspension>
      #22     run.<anonymous closure>.<anonymous closure>
      (package:flutter_tools/runner.dart:98)
      <asynchronous suspension>
      #23     AppContext.run.<anonymous closure>
      (package:flutter_tools/src/base/context.dart:154)
      <asynchronous suspension>
      #24     AppContext.run.<anonymous closure>
      (package:flutter_tools/src/base/context.dart:154)
      <asynchronous suspension>
      #25     run (package:mobile.flutter.cli/flutter_tools.dart:106)
      <asynchronous suspension>
      #26     main (google3:///mobile/flutter/cli/bin/cli_usage_aot.dart:4)
      <asynchronous suspension>


[✓] VS Code (version unknown) [0ms]
    • VS Code at /usr/share/code
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
    ✗ Unable to determine VS Code version.

[✓] Connected device (2 available) [502ms]
    • Pixel 7a (mobile) • localhost:38655 • android-arm64 • Android 13 (API 33)
    • Linux (desktop)   • linux           • linux-x64     • Debian GNU/Linux
      rodete 6.12.17-1rodete2-amd64

[✓] Google3 (on linux) [11ms]
    • KVM enabled

! Doctor found issues in 1 category.

@ChristianEdwardPadilla
Copy link

The flutter tools issue is a red herring - unrelated to the crash being reported. letramygoogle is attempting to create a minimal repro now and will report back with more public info 🙏🙏🙏🙏🙏🙏

@letramygoogle
Copy link
Author

letramygoogle commented May 8, 2025

Pasting the stack trace here

error: setState() or markNeedsBuild() called when widget tree was locked.
This _IconButtonM3 widget cannot be marked as needing to build because the framework is locked.
The widget on which setState() or markNeedsBuild() was called was:
_IconButtonM3
stackTrace: #0 Element.markNeedsBuild.<anonymous closure> (package:flutter/src/widgets/framework.dart:5273:9)
#1 Element.markNeedsBuild (package:flutter/src/widgets/framework.dart:5283:6)
#2 State.setState (package:flutter/src/widgets/framework.dart:1219:15)
#3 _ButtonStyleState.handleStatesControllerChange (package:flutter/src/material/button_style_button.dart:326:5)
#4 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:435:24)
#5 WidgetStatesController.update (package:flutter/src/widgets/widget_state.dart:1152:7)
#6 _InkResponseState.updateHighlight (package:flutter/src/material/ink_well.dart:995:26)
#7 _InkResponseState.handleTapCancel (package:flutter/src/material/ink_well.dart:1211:5)
#8 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:345:24)
#9 TapGestureRecognizer.handleTapCancel (package:flutter/src/gestures/tap.dart:800:11)
#10 BaseTapGestureRecognizer._checkCancel (package:flutter/src/gestures/tap.dart:388:5)
#11 BaseTapGestureRecognizer.resolve (package:flutter/src/gestures/tap.dart:336:7)
#12 OneSequenceGestureRecognizer.dispose (package:flutter/src/gestures/recognizer.dart:470:5)
#13 PrimaryPointerGestureRecognizer.dispose (package:flutter/src/gestures/recognizer.dart:765:11)
#14 RawGestureDetectorState.dispose (package:flutter/src/widgets/gesture_detector.dart:1529:18)
#15 StatefulElement.unmount (package:flutter/src/widgets/framework.dart:5922:11)
#16 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2075:13)
#17 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#18 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#19 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#20 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#21 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6994:14)
#22 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#23 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#24 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#25 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#26 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#27 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#28 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#29 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#30 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6994:14)
#31 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#32 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#33 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6994:14)
#34 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#35 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#36 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#37 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#38 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#39 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#40 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#41 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#42 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#43 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#44 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#45 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#46 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#47 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#48 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#49 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#50 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#51 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#52 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#53 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#54 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#55 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#56 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#57 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#58 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#59 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#60 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#61 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#62 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#63 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#64 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#65 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#66 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#67 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#68 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#69 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#70 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#71 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#72 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#73 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#74 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#75 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#76 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#77 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#78 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#79 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#80 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#81 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6994:14)
#82 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#83 ListIterable.forEach (dart:_internal/iterable.dart:49:13)
#84 _InactiveElements._unmountAll (package:flutter/src/widgets/framework.dart:2084:25)
#85 BuildOwner.lockState (package:flutter/src/widgets/framework.dart:2965:15)
#86 BuildOwner.finalizeTree (package:flutter/src/widgets/framework.dart:3288:7)
#87 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1255:19)
#88 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:495:5)
#89 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1438:15)
#90 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1351:9)
#91 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1204:5)
#92 _rootRun (dart:async/zone.dart:1525:13)
#93 _CustomZone.run (dart:async/zone.dart:1422:19)
#94 _CustomZone.runGuarded (dart:async/zone.dart:1321:7)
#95 _invoke (dart:ui/hooks.dart:333:10)
#96 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:444:5)
#97 _drawFrame (dart:ui/hooks.dart:303:31)
W 2025-05-05 10:39:36.156156 fitbit.p11.companion.crash: Sending report.
error: setState() or markNeedsBuild() called when widget tree was locked.
This _InkResponseStateWidget widget cannot be marked as needing to build because the framework is locked.
The widget on which setState() or markNeedsBuild() was called was:
_InkResponseStateWidget
stackTrace: #0 Element.markNeedsBuild.<anonymous closure> (package:flutter/src/widgets/framework.dart:5273:9)
#1 Element.markNeedsBuild (package:flutter/src/widgets/framework.dart:5283:6)
#2 State.setState (package:flutter/src/widgets/framework.dart:1219:15)
#3 _InkResponseState.handleStatesControllerChange (package:flutter/src/material/ink_well.dart:894:5)
#4 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:435:24)
#5 WidgetStatesController.update (package:flutter/src/widgets/widget_state.dart:1152:7)
#6 _InkResponseState.updateHighlight (package:flutter/src/material/ink_well.dart:995:26)
#7 _InkResponseState.handleTapCancel (package:flutter/src/material/ink_well.dart:1211:5)
#8 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:345:24)
#9 TapGestureRecognizer.handleTapCancel (package:flutter/src/gestures/tap.dart:800:11)
#10 BaseTapGestureRecognizer._checkCancel (package:flutter/src/gestures/tap.dart:388:5)
#11 BaseTapGestureRecognizer.resolve (package:flutter/src/gestures/tap.dart:336:7)
#12 OneSequenceGestureRecognizer.dispose (package:flutter/src/gestures/recognizer.dart:470:5)
#13 PrimaryPointerGestureRecognizer.dispose (package:flutter/src/gestures/recognizer.dart:765:11)
#14 RawGestureDetectorState.dispose (package:flutter/src/widgets/gesture_detector.dart:1529:18)
#15 StatefulElement.unmount (package:flutter/src/widgets/framework.dart:5922:11)
#16 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2075:13)
#17 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#18 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#19 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#20 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#21 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6994:14)
#22 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#23 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#24 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#25 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#26 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#27 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#28 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#29 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#30 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6994:14)
#31 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#32 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#33 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6994:14)
#34 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#35 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#36 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#37 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#38 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#39 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#40 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#41 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#42 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#43 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#44 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#45 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#46 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#47 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#48 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#49 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#50 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#51 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#52 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#53 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#54 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#55 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#56 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#57 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#58 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#59 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#60 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#61 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#62 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#63 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#64 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#65 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#66 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#67 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#68 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#69 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#70 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#71 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#72 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#73 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#74 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#75 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#76 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#77 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#78 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5763:14)
#79 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#80 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:2073:7)
#81 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6994:14)
#82 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2071:13)
#83 ListIterable.forEach (dart:_internal/iterable.dart:49:13)
#84 _InactiveElements._unmountAll (package:flutter/src/widgets/framework.dart:2084:25)
#85 BuildOwner.lockState (package:flutter/src/widgets/framework.dart:2965:15)
#86 BuildOwner.finalizeTree (package:flutter/src/widgets/framework.dart:3288:7)
#87 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1255:19)
#88 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:495:5)
#89 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1438:15)
#90 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1351:9)
#91 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1204:5)
#92 _rootRun (dart:async/zone.dart:1525:13)
#93 _CustomZone.run (dart:async/zone.dart:1422:19)
#94 _CustomZone.runGuarded (dart:async/zone.dart:1321:7)
#95 _invoke (dart:ui/hooks.dart:333:10)
#96 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:444:5)
#97 _drawFrame (dart:ui/hooks.dart:303:31)

@darshankawar
Copy link
Member

Thanks for the logs, I'll keep the issue open and label for team's tracking based on the error report and log.

@darshankawar darshankawar added c: crash Stack traces logged to the console tool Affects the "flutter" command-line tool. See also t: labels. framework flutter/packages/flutter repository. See also f: labels. t: flutter doctor Problem related to the "flutter doctor" tool team-framework Owned by Framework team fyi-tool For the attention of Flutter Tool team and removed in triage Presently being triaged by the triage team labels May 8, 2025
@matanlurey matanlurey removed tool Affects the "flutter" command-line tool. See also t: labels. t: flutter doctor Problem related to the "flutter doctor" tool fyi-tool For the attention of Flutter Tool team labels May 8, 2025
@justinmc
Copy link
Contributor

Looks like it's probably this setState, based on the stacktrace:

And that gets called when the MaterialState changes, for example when hovering the button or something like that. Maybe that helps in tracking down a repro.

@justinmc justinmc added needs repro info Automated crash report whose cause isn't yet known P2 Important issues not at the top of the work list triaged-framework Triaged by Framework team labels May 13, 2025
@victorsanni
Copy link
Contributor

The roll in the description only has 3 PRs... #167614 I think is the most likely culprit, but we can't know without more information to reproduce it.

@letramygoogle
Copy link
Author

Attached the minimum reprod in cl/759384483

@victorsanni
Copy link
Contributor

victorsanni commented May 16, 2025

I was able to reproduce it only once. I still don't know how.

EDIT: Finally able to repro on iOS simulator.

tooltip.bug.repro.mov
Sample code
import 'package:flutter/material.dart';

void main() => runApp(const ReproApp());

class ReproApp extends StatelessWidget {
  const ReproApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: InitialPage(title: 'Flutter Demo Home Page'),
    );
  }
}

class InitialPage extends StatelessWidget {
  final String title;

  InitialPage({Key? key, required this.title}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title, style: TextStyle(fontFamily: 'ProductSans')),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text('Welcome to the Initial Page!'),
            SizedBox(height: 20),
            ElevatedButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => MyHomePage(title: 'Flutter Demo Home Page')),
                );
              },
              child: Text('Go to Counter Page'),
            ),
          ],
        ),
      ),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title, style: TextStyle(fontFamily: 'ProductSans')),
      ),
      body: Center(
        child: Column( // Use Column to place multiple widgets vertically
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'Button tapped $_counter time${_counter == 1 ? '' : 's'}.',
              key: Key('CountText'),
            ),
            SizedBox(height: 20), // Add some space
            ElevatedButton(
              onPressed: () {
                // Navigate to the new DetailsPage
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => DetailsPage()),
                );
              },
              child: Text('Go to Details Page'),
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
      ),
    );
  }
}

class DetailsPage extends StatelessWidget {
  const DetailsPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Details Page', style: TextStyle(fontFamily: 'ProductSans')),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'This is the details page!',
              style: Theme.of(context).textTheme.headlineSmall,
            ),
            SizedBox(height: 20),
            ElevatedButton(
              onPressed: () {
                Navigator.pop(context);
              },
              child: Text('Go Back'),
            ),
          ],
        ),
      ),
    );
  }
}

@victorsanni
Copy link
Contributor

Confirmed, #167614 causes the bug. cc @rkishan516 who was the PR author.

@rkishan516
Copy link
Contributor

Yes @victorsanni, I think #168546 should be able to resolve this issue. Can you please test ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: crash Stack traces logged to the console customer: google Various Google teams framework flutter/packages/flutter repository. See also f: labels. needs repro info Automated crash report whose cause isn't yet known P2 Important issues not at the top of the work list team-framework Owned by Framework team triaged-framework Triaged by Framework team
Projects
None yet
Development

No branches or pull requests

7 participants