Skip to content

OverlayPortal in Table/TableRow crashes when OverlayPortalController.show is called before the OverlayPortalController is assigned to the OverlayPortal #174133

Description

@TB-StarcMed

I have a Flutter project that runs fine with Flutter SDK 3.32.X, but crashes at a specific point after upgrading to Flutter 3.35.1. I am not allowed to disclose this project and therefore derived a smaller version from it:

overlay_portal_assertion.zip

The output from the debug console is contained in the "debug console.txt" within the folder of the project.

To cause the exception:

  1. Execute the application in debug mode,
  2. Click the Button (with label "Login") and
  3. Click the button on the right (with label "Tools"). Then the exception is triggered.

Flutter doctor output when having and using Flutter 3.35.1:

[√] Flutter (Channel stable, 3.35.1, on Microsoft Windows [Version 10.0.26100.4946], locale de-DE) [230ms]
    • Flutter version 3.35.1 on channel stable at C:\Progs\Flutter\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 20f8274939 (6 days ago), 2025-08-14 10:53:09 -0700
    • Engine revision 1e9a811bf8
    • Dart version 3.9.0
    • DevTools version 2.48.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-lldb-debugging

[√] Windows Version (11 Pro 64-bit, 24H2, 2009) [2,1s]

[√] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [1.645ms]
    • Android SDK at C:\Progs\Android\SDK
    • Emulator version 36.1.9.0 (build_id 13823996) (CL:N/A)
    • Platform android-36, build-tools 36.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\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.6+-13391695-b895.109)
    • All Android licenses accepted.

[√] Chrome - develop for the web [70ms]
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.14.12) [69ms]
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.14.36408.4
    • Windows 10 SDK version 10.0.26100.0

[√] Android Studio (version 2025.1.2) [13ms]
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)

[√] VS Code, 64-bit edition (version 1.103.1) [11ms]
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.116.0

[√] Connected device (3 available) [174ms]
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.26100.4946]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 139.0.7258.128
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 137.0.3296.93

[√] Network resources [267ms]
    • All expected network resources are available.

• No issues found!

For running the app with Flutter 3.32.8:

  1. Go to the folder with the Flutter SDK,
  2. Switch the working copy to branch "3.32.8",
  3. Run "flutter doctor -v" to let adjust to the switched branch,
  4. Change the version for the Dart sdk under "environment:" "sdk:" to "^3.8.1" in file pubspec.yaml of the project,
  5. Run "flutter pub get" to update the packages.
  6. Execute the app in debug mode and execute the same steps as above.

To revert to the latest SDK:

  1. Execute "flutter channel stable",
  2. Execute "flutter doctor -v"
  3. Change the version for the Dart SDK back to 3.9.0 in file pubspec.yaml of the project,
  4. Run "flutter pub get" to update the packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: error messageError messages from the Flutter frameworkc: crashStack traces logged to the consolec: regressionIt was better in the past than it is nowfound in release: 3.35Found to occur in 3.35found in release: 3.36Found to occur in 3.36frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions