Skip to content

SemanticsObject+UIFocusSystem crashes in Add to App with local engine #174853

Description

@vashworth

Steps to reproduce

  1. Create a storyboard iOS native app
  2. Create an Flutter module: https://docs.flutter.dev/add-to-app/ios/project-setup
  3. Show a FlutterViewController using present: https://docs.flutter.dev/add-to-app/ios/add-flutter-screen#show-a-flutterviewcontroller-with-your-flutterengine
  4. Run et run --config ios_debug_sim_unopt_arm64 in the Flutter module project (this will set the local engine environment variables)
  5. Run the native app in Xcode, click the "Show Flutter" button and then dismiss the presentation

Expected results

App should run fine when using a local engine

Actual results

App crashes when presentation is dismissed

[FATAL:flutter/fml/memory/weak_ptr.h(100)] Check failed: *this.
Image

It appears to crash here when accessing bridge->view:

Code sample

Use Flutter documentation examples

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel main, 3.36.0-1.0.pre-385, on macOS 15.6.1 24G90 darwin-arm64, locale en)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.3)
[✓] Chrome - develop for the web
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!

Metadata

Metadata

Labels

P2Important issues not at the top of the work lista: existing-appsIntegration with existing apps via the add-to-app flowplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform 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