-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolecustomer: googleVarious Google teamsVarious Google teamscustomer: money (g3)needs repro infoAutomated crash report whose cause isn't yet knownAutomated crash report whose cause isn't yet knownr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Steps to reproduce
- Add PopUpMenuButton and show it
- While the menu is being displayed, trigger drawFrame (such that PopupMenuRoute gets rebuilt)
- _positionBuilder inside PopupMenuRoute crashes due to the stale context
This crash only happens with this commit efa7d52. Seems like positionBuilder now calculates position dynamically, but it holds to the invalidated context sometimes.
Crash trace
_TypeError: Null check operator used on a null value
at Navigator.of (navigator.dart:2894)
at PopupMenuButtonState._positionBuilder (popup_menu.dart:1522)
at _PopupMenuRoute.buildPage.<anonymous closure> (popup_menu.dart:972)
at _LayoutBuilderElement._rebuildWithConstraints.updateChildCallback (layout_builder.dart:201)
at BuildOwner.buildScope (framework.dart:3056)
at _LayoutBuilderElement._rebuildWithConstraints (layout_builder.dart:240)
at _LayoutBuilderElement._rebuildWithConstraints (layout_builder.dart:196)
at RenderObject.invokeLayoutCallback.<anonymous closure> (object.dart:2827)
at PipelineOwner._enableMutationsToDirtySubtrees (object.dart:1161)
at RenderObject.invokeLayoutCallback (object.dart:2826)
at RenderConstrainedLayoutBuilder.rebuildIfNecessary (layout_builder.dart:293)
at _RenderLayoutBuilder.performLayout (layout_builder.dart:390)
at RenderObject.layout (object.dart:2715)
at RenderProxyBoxMixin.performLayout (proxy_box.dart:115)
at RenderObject.layout (object.dart:2715)
at RenderProxyBoxMixin.performLayout (proxy_box.dart:115)
at RenderObject.layout (object.dart:2715)
at RenderProxyBoxMixin.performLayout (proxy_box.dart:115)
at RenderObject.layout (object.dart:2715)
at RenderProxyBoxMixin.performLayout (proxy_box.dart:115)
at RenderObject.layout (object.dart:2715)
at RenderProxyBoxMixin.performLayout (proxy_box.dart:115)
at RenderOffstage.performLayout (proxy_box.dart:3750)
at RenderObject.layout (object.dart:2715)
at RenderProxyBoxMixin.performLayout (proxy_box.dart:115)
at RenderObject.layout (object.dart:2715)
at _RenderTheaterMixin.layoutChild (overlay.dart:1076)
at _RenderTheater.performLayout (overlay.dart:1422)
at RenderObject._layoutWithoutResize (object.dart:2548)
at PipelineOwner.flushLayout (object.dart:1112)
at PipelineOwner.flushLayout (object.dart:1125)
at RendererBinding.drawFrame (binding.dart:616)
at WidgetsBinding.drawFrame (binding.dart:1231)
at RendererBinding._handlePersistentFrameCallback (binding.dart:482)
at RendererBinding._handlePersistentFrameCallback (binding.dart:481)
at SchedulerBinding._invokeFrameCallback (binding.dart:1442)
at SchedulerBinding.handleDrawFrame (binding.dart:1355)
at SchedulerBinding._handleDrawFrame (binding.dart:1208)
at SchedulerBinding._handleDrawFrame (binding.dart:1190)
at _invoke (hooks.dart:316)
at PlatformDispatcher._drawFrame (platform_dispatcher.dart:428)
at _drawFrame (hooks.dart:288)
at _drawFrame (hooks.dart:286)
Expected results
Popup menu stays displayed
Actual results
App Crashes
Code sample
<>
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
✓] Flutter (Channel google3, on Debian GNU/Linux rodete 6.10.11-1rodete2-amd64, locale en_US.UTF-8) [93ms]
• Framework revision 5944d992ac (11 days ago), 2025-02-06T00:00:00.000
• Engine revision 5944d992ac
• Dart version 548dcc7a54
[✓] Android toolchain - develop for Android devices (Android SDK version Stable) [93ms]
• Android SDK at google3
• Platform Stable, build-tools Stable
• Java binary at: /opt/android-studio-with-blaze-stable/jbr/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.5+-12932927-b750.29)
[!] Flutter IDE Support (No supported IDEs installed) [0ms]
• IntelliJ - https://www.jetbrains.com/idea/
• Android Studio - https://developer.android.com/studio/
• VS Code - https://code.visualstudio.com/
[✓] Connected device (1 available) [22ms]
• Linux (desktop) • linux • linux-x64 • Debian GNU/Linux rodete 6.10.11-1rodete2-amd64
sz7i, ChaserVasya, dmitry-fbm, willbe, katjai1 and 2 more
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolecustomer: googleVarious Google teamsVarious Google teamscustomer: money (g3)needs repro infoAutomated crash report whose cause isn't yet knownAutomated crash report whose cause isn't yet knownr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team