Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ios] Fix testDeallocated failing locally. #45663

Merged

Conversation

cyanglaz
Copy link
Contributor

@cyanglaz cyanglaz commented Sep 11, 2023

Moving the code block to autorelease pool to ensure the FlutterEngine is released in the test.

Fixes: flutter/flutter#134388

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@cyanglaz cyanglaz marked this pull request as ready for review September 11, 2023 20:15
Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval since it demonstrably works. I have some concerns that the issue is another thread that has a retain on the engine, not the autorelease pool.

@@ -113,7 +113,7 @@ - (void)testInfoPlist {

- (void)testDeallocated {
__weak FlutterEngine* weakEngine = nil;
{
@autoreleasepool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you able to track down how the engine is getting onto the autorelease pool?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. I'm not sure how to do that.

I have some concerns that the issue is another thread that has a retain on the engine
In what situation could this happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only happening when running the test locally tho, ci never failed. So Im not sure what the difference is that caused the FlutterEngine getting onto the pool.

@cyanglaz cyanglaz added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 12, 2023
@auto-submit auto-submit bot merged commit 2c53043 into flutter:main Sep 12, 2023
25 checks passed
@cyanglaz cyanglaz deleted the flutter_test_dealloced_local_failure branch September 12, 2023 18:47
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 12, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 12, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 12, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 12, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Sep 13, 2023
…ions) (#134589)

Manual roll requested by bdero@google.com

flutter/engine@496ef6a...c90fadf

2023-09-12 skia-flutter-autoroll@skia.org Manual roll Dart SDK from 43d4b1373788 to 1ee7ef8bbc65 (6 revisions) (flutter/engine#45726)
2023-09-12 ychris@google.com Reland "Build iOS unittest target in unopt builds" (#44356)"" (#45346)" (flutter/engine#45519)
2023-09-12 skia-flutter-autoroll@skia.org Roll Skia from a4f8f5177c8b to 211d63b1e1f5 (2 revisions) (flutter/engine#45724)
2023-09-12 jacksongardner@google.com Fix JS interop signatures to use only JS types. (flutter/engine#45668)
2023-09-12 ychris@google.com [ios] Fix testDeallocated failing locally.  (flutter/engine#45663)
2023-09-12 ychris@google.com [iOS] move arm64 builds to arm machines (flutter/engine#45721)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Mairramer pushed a commit to Mairramer/flutter that referenced this pull request Oct 10, 2023
…ions) (flutter#134589)

Manual roll requested by bdero@google.com

flutter/engine@496ef6a...c90fadf

2023-09-12 skia-flutter-autoroll@skia.org Manual roll Dart SDK from 43d4b1373788 to 1ee7ef8bbc65 (6 revisions) (flutter/engine#45726)
2023-09-12 ychris@google.com Reland "Build iOS unittest target in unopt builds" (flutter#44356)"" (flutter#45346)" (flutter/engine#45519)
2023-09-12 skia-flutter-autoroll@skia.org Roll Skia from a4f8f5177c8b to 211d63b1e1f5 (2 revisions) (flutter/engine#45724)
2023-09-12 jacksongardner@google.com Fix JS interop signatures to use only JS types. (flutter/engine#45668)
2023-09-12 ychris@google.com [ios] Fix testDeallocated failing locally.  (flutter/engine#45663)
2023-09-12 ychris@google.com [iOS] move arm64 builds to arm machines (flutter/engine#45721)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-ios
Projects
None yet
2 participants