Skip to content

Platform messages on iOS seem to violate thread safety of using fml::WeakPtr #128746

@dnfield

Description

@dnfield

Steps to reproduce:

  • Build a local iOS unopt engine
  • Run an app that uses platform channels not on the main thread.
  • App will fail with messages like this:
2023-06-12 15:10:43.964268-0700 Runner[2265:918331] [VERBOSE-2:thread_checker.h(61)] IsCreationThreadCurrent expected thread: '' actual thread:''
2023-06-12 15:10:43.964266-0700 Runner[2265:918323] [VERBOSE-2:thread_checker.h(61)] IsCreationThreadCurrent expected thread: '' actual thread:''
2023-06-12 15:10:43.964359-0700 Runner[2265:918331] [VERBOSE-3:weak_ptr.h(109)] Check failed: (checker_.checker).IsCreationThreadCurrent().
2023-06-12 15:10:43.964358-0700 Runner[2265:918327] [VERBOSE-2:thread_checker.h(61)] IsCreationThreadCurrent expected thread: '' actual thread:''
2023-06-12 15:10:43.964439-0700 Runner[2265:918323] [VERBOSE-3:weak_ptr.h(109)] Check failed: (checker_.checker).IsCreationThreadCurrent().
2023-06-12 15:10:43.964496-0700 Runner[2265:918327] [VERBOSE-3:weak_ptr.h(109)] Check failed: (checker_.checker).IsCreationThreadCurrent().

Related to this line: https://github.com/flutter/engine/blob/f67ed35b142ebe94dc29ec3f542ad8ccf4712dcf/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm#L1207

@gaaclarke any ideas?

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.platform-iosiOS applications specificallywaiting for PR to land (fixed)A fix is in flight

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions