Skip to content

iOS unit tests crashing when the tests are randomized #72107

@gaaclarke

Description

@gaaclarke

This appears to be a memory corruption since it is showing up in weird places like so:

#0	0x0000600021c300b0 in fml::WeakPtr<flutter::PlatformView>::operator->() const at /Users/aaclarke/dev/engine/src/flutter/fml/memory/weak_ptr.h:112
#1	0x0000600021c993c1 in -[FlutterViewController surfaceUpdated:] at /Users/aaclarke/dev/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm:587
#2	0x0000600021c9a401 in -[FlutterViewController applicationWillResignActive:] at /Users/aaclarke/dev/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm:707
#3	0x00007fff23ac2c1c in __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ ()
#4	0x00007fff23ac20a5 in _CFXRegistrationPost1 ()
#5	0x00007fff23ac1e0f in ___CFXNotificationPost_block_invoke ()
#6	0x00007fff23bbffe3 in -[_CFXNotificationRegistrar find:object:observer:enumerator:] ()
#7	0x00007fff23ac1776 in _CFXNotificationPost ()
#8	0x00007fff2564d429 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#9	0x0000600021bca8d7 in -[FlutterPluginAppLifeCycleDelegateTest testWillResignActive] at /Users/aaclarke/dev/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPluginAppLifeCycleDelegateTest.m:48

Steps to reproduce:

  • Check out master
  • Run the unit tests in random order, eventually you'll get a crash

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work lista: tests"flutter test", flutter_test, or one of our testsc: crashStack traces logged to the consoleengineflutter/engine related. See also e: labels.platform-iosiOS applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions