Skip to content

The dispose method is not called after closing FlutterViewController #137924

@LinXunFeng

Description

@LinXunFeng

Is there an existing issue for this?

Steps to reproduce

  1. Run OCProject project
  2. Click blank page to push flutter vc
  3. Click Back button

This repo: https://github.com/LinXunFeng/flutter_hybrid_bug

Expected results

The dispose method should be called.

Actual results

The dispose method is not called.

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration
2023-11-06.10.35.21.mov

Logs

Logs
2023-11-06 10:35:47.755561+0800 OCProject[82086:21786375] flutter: flutter initState
2023-11-06 10:35:52.030731+0800 OCProject[82086:21770626] dealloc -- LXFFlutterViewController

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.13.4, on macOS 13.4.1 22F770820d darwin-arm64 (Rosetta), locale zh-Hans-CN)
    • Flutter version 3.13.4 on channel stable at /Users/lxf/fvm/versions/3.13.4
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 367f9ea16b (7 weeks ago), 2023-09-12 23:27:53 -0500
    • Engine revision 9064459a8b
    • Dart version 3.1.2
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/lxf/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_SDK_ROOT = /Users/lxf/Library/Android/sdk
    • Java binary at: /usr/bin/java
    • Java version Java(TM) SE Runtime Environment (build 17.0.8+9-LTS-211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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 17.0.6+0-17.0.6b802.4-9586694)

[!] Android Studio (version unknown)
    • Android Studio at /Applications/Contents
    • 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
    ✗ Unable to determine Android Studio version.
    ✗ android-studio-dir = /Applications/
    ✗ Android Studio not found at /Applications/Contents
    • Try updating or re-installing Android Studio.
    • Consider removing your android-studio-dir setting by running:
      flutter config --android-studio-dir=

[✓] VS Code (version 1.84.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.10.2

[✓] Connected device (4 available)
    • lxf的iPhone (mobile) • 00008120-XXXXXXXXXX            • ios            • iOS 16.4.1 20E252
    • iPhone 14 (mobile)  • 20A73B49-7689-4FAA-BE22-XXXXXXXXXX • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)     • macos                                • darwin-arm64   • macOS 13.4.1 22F770820d darwin-arm64 (Rosetta)
    • Chrome (web)        • chrome                               • web-javascript • Google Chrome 118.0.5993.117

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projectengineflutter/engine related. See also e: labels.found in release: 3.13Found to occur in 3.13has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions