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

fixes CupertinoModalPopupRoute #147823

Merged
merged 20 commits into from
May 20, 2024

Conversation

Dimilkalathiya
Copy link
Contributor

@Dimilkalathiya Dimilkalathiya commented May 4, 2024

part of #141198

  • Fixes memory leak on CupertinoModalPopupRoute
  • Fixes memory leak on CupertinoDialogRoute
  • Adds new test-case for new changes

Pre-launch Checklist

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

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: cupertino flutter/packages/flutter/cupertino repository f: routes Navigator, Router, and related APIs. labels May 4, 2024
@Dimilkalathiya
Copy link
Contributor Author

cc: @polina-c
Added new test-case to confirm leak is not happening as every other tests are paired-up with CupertinoApp which leaks CurvedAnimation itself

@@ -1238,26 +1244,6 @@ Future<T?> showCupertinoModalPopup<T>({
final Animatable<double> _dialogScaleTween = Tween<double>(begin: 1.3, end: 1.0)
.chain(CurveTween(curve: Curves.linearToEaseOut));

Widget _buildCupertinoDialogTransitions(BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, Widget child) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You moved this method to other place, that made it hard to see diff. Can you move it back to make code review easier?

@polina-c polina-c added the a: leak tracking Issues and PRs related to memory leaks detected by leak_tracker label May 5, 2024
@Piinks
Copy link
Contributor

Piinks commented May 8, 2024

@Dimilkalathiya thanks for the contribution, it looks like there are failing checks here, can you take a look?

@Dimilkalathiya
Copy link
Contributor Author

Dimilkalathiya commented May 8, 2024

Hii @Piinks

Actually I am working on #147816 which is similar to this, once I make sure it passes Google test and gets merge I'll apply the same changes here as well

@Dimilkalathiya
Copy link
Contributor Author

@polina-c Not sure why the test-case is failing here, it passes in my pc

Does it have to do with tree status being red?

@polina-c
Copy link
Contributor

polina-c commented May 10, 2024

@polina-c Not sure why the test-case is failing here, it passes in my pc

Does it have to do with tree status being red?

You can check tree status here: https://flutter-dashboard.appspot.com/#/build
But it takes some latency to reflect failures on the tree. If in doubts, you can create draft empty PR, that changes just some doc or comment and check if tests fail for it.

I see many bots fail.
Can you give details about the test? Which exact test you are debugging?

@Dimilkalathiya
Copy link
Contributor Author

@polina-c I tried some of files path that are failed on logs:

flutter/packages/flutter/test/material/app_test.dart
draggable_scrollable_sheet_test.dart

These tests are passing locally.

@Dimilkalathiya
Copy link
Contributor Author

Dimilkalathiya commented May 11, 2024

@polina-c test are failing because of changes PR that i confirmed with draft PR but can't figure-out why, i tried few thing but no luck.

There are some things that are bit confusing to me let me know if you have any idea:

  • Test like star_border_test.dart are failing here which passes in my system.
  • Can't find connection between this test failure and changes we made star_border_test.dart is something entirely different thing.

edit:- i tried all the test-case failed by bots
Screenshot 2024-05-11 at 7 33 47 PM

@Dimilkalathiya
Copy link
Contributor Author

@Piinks @polina-c I removed everything that was changed and just left some text change (which should not effect test) here yet test-case is failing not sure why, should i create new PR same changes to check?

@polina-c
Copy link
Contributor

@Piinks @polina-c I removed everything that was changed and just left some text change (which should not effect test) here yet test-case is failing not sure why, should i create new PR same changes to check?

At the moment flutter tree is red: https://flutter-dashboard.appspot.com/#/build

That means tests are failing at master. No need to create new PR. Just wait for tree to become green and pull updates from master to your branch.

Screenshot 2024-05-18 at 12 25 59 PM

Does it help?

@Dimilkalathiya
Copy link
Contributor Author

Screenshot_2024-05-19-01-13-16-86_572064f74bd5f9fa804b05334aa4f912.jpg

I believe the tree went red recently around 2 hours ago.

I did check tree status when tests were failing it was green 10-12 hours ago when I pushed code.

You can see that all those tests have failed as well.

But just in-case if you want I'll check it once tree status is green

@polina-c
Copy link
Contributor

polina-c commented May 18, 2024

There is some latency in tree status.
When tests fails unexpectedly for me, I create separate draft PR without changes in the code just to compare failures, and make sure to refresh both PRs at the same time.

If you want to recreate PR as an experiment, go ahead. There is no penalty for it :)

@Dimilkalathiya
Copy link
Contributor Author

There is some latency in tree status.
When tests fails unexpectedly for me, I create separate draft PR without changes in the code just to compare failures, and make sure to refresh both PRs at the same time.

If you want to recreate PR as an experiment, go ahead. There is no penalty for it :)

I see if it has latency then it makes sense, I will update PR when tree status is green.

Since CupertinoDialogRoute is the one causing an issue before here I'll leave it out and update PR so we can merge CupertinoModalPopupRoute's fix since I think i would be able to help-out in other leaks faster instead of spending too much time in this

@polina-c
Copy link
Contributor

polina-c commented May 19, 2024

There is some latency in tree status.
When tests fails unexpectedly for me, I create separate draft PR without changes in the code just to compare failures, and make sure to refresh both PRs at the same time.
If you want to recreate PR as an experiment, go ahead. There is no penalty for it :)

I see if it has latency then it makes sense, I will update PR when tree status is green.

Since CupertinoDialogRoute is the one causing an issue before here I'll leave it out and update PR so we can merge CupertinoModalPopupRoute's fix since I think i would be able to help-out in other leaks faster instead of spending too much time in this

Yes, smaller PRs are easier to review and troubleshoot.

@Dimilkalathiya Dimilkalathiya changed the title fixes CupertinoModalPopupRoute and CupertinoDialogRoute leaks fixes CupertinoModalPopupRoute May 20, 2024
@Dimilkalathiya
Copy link
Contributor Author

@polina-c We can merge now :)

@polina-c polina-c merged commit e2de8d8 into flutter:master May 20, 2024
72 checks passed
@Piinks
Copy link
Contributor

Piinks commented May 20, 2024

@polina-c please remember to have two members of flutter-hackers approve changes before merging. The autosubmit bot should probably just be left to merge the PR, it ensures this is done.

Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

LGTM for second approval

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request May 21, 2024
flutter/flutter@02a6c91...d02292d

2024-05-21 ian@hixie.ch Make FileSystem dependency explicit througout (more). (flutter/flutter#148095)
2024-05-20 magder@google.com Remove add-to-app bitcode warning (flutter/flutter#148587)
2024-05-20 rmolivares@renzo-olivares.dev SelectionArea's selection should not be cleared on loss of window focus (flutter/flutter#148067)
2024-05-20 katelovett@google.com [wiki migration] Engine team pages (flutter/flutter#148696)
2024-05-20 goderbauer@google.com Manual roll camera dependency (flutter/flutter#148426)
2024-05-20 katelovett@google.com [wiki migration] Framework team pages (flutter/flutter#148721)
2024-05-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from a8fb9daae8d0 to c2ef01f6f1ab (3 revisions) (flutter/flutter#148722)
2024-05-20 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.5 to 3.25.6 (flutter/flutter#148715)
2024-05-20 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.4.0 to 4.4.1 (flutter/flutter#148714)
2024-05-20 louisehsu@google.com Fixes incorrect read/write permissions on Flutter.framework and FlutterMacOS.framework (flutter/flutter#148580)
2024-05-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from c6fecf65fbf3 to a8fb9daae8d0 (3 revisions) (flutter/flutter#148700)
2024-05-20 jason-simmons@users.noreply.github.com Remove the no-shuffle tag on the flutter_tools create_test suite (flutter/flutter#148688)
2024-05-20 andrewrkolos@gmail.com log incoming vm service messages in `FlutterVMService::runInView` (flutter/flutter#148596)
2024-05-20 sokolovskyi.konstantin@gmail.com Add tests for shared_app_data.#.dart API examples. (flutter/flutter#147830)
2024-05-20 sokolovskyi.konstantin@gmail.com Add tests for logical_key_set.0.dart API example. (flutter/flutter#147735)
2024-05-20 katelovett@google.com [wiki migration] Ecosystem team pages (flutter/flutter#148589)
2024-05-20 sokolovskyi.konstantin@gmail.com Fix painting API examples tests directories structure. (flutter/flutter#148177)
2024-05-20 102401667+Dimilkalathiya@users.noreply.github.com fixes `CupertinoModalPopupRoute` (flutter/flutter#147823)
2024-05-20 nate.w5687@gmail.com Implement new `AnimationStatus` getters (flutter/flutter#148570)
2024-05-20 nate.w5687@gmail.com Reland "`if` chains � `switch` expressions" (flutter/flutter#148634)
2024-05-20 gspencergoog@users.noreply.github.com Factor out `RawView`, make `View` listen to engine generated view focus events (flutter/flutter#143259)
2024-05-20 zanderso@users.noreply.github.com Remove all tests from a02s. Replace with mokey in bringup (flutter/flutter#148563)

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

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

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
hello-coder-xu added a commit to hello-coder-xu/flutter that referenced this pull request May 22, 2024
…-coder-xu/flutter into fix/slider_text_null_error

* 'fix/slider_text_null_error' of https://github.com/hello-coder-xu/flutter: (65 commits)
  Change implementation method
  fix slider text null error
  Make FileSystem dependency explicit througout (more). (flutter#148095)
  Remove add-to-app bitcode warning (flutter#148587)
  SelectionArea's selection should not be cleared on loss of window focus (flutter#148067)
  [wiki migration] Engine team pages (flutter#148696)
  Manual roll camera dependency (flutter#148426)
  [wiki migration] Framework team pages (flutter#148721)
  Roll Flutter Engine from a8fb9daae8d0 to c2ef01f6f1ab (3 revisions) (flutter#148722)
  Bump github/codeql-action from 3.25.5 to 3.25.6 (flutter#148715)
  Bump codecov/codecov-action from 4.4.0 to 4.4.1 (flutter#148714)
  Fixes incorrect read/write permissions on Flutter.framework and FlutterMacOS.framework (flutter#148580)
  Roll Flutter Engine from c6fecf65fbf3 to a8fb9daae8d0 (3 revisions) (flutter#148700)
  Remove the no-shuffle tag on the flutter_tools create_test suite (flutter#148688)
  log incoming vm service messages in `FlutterVMService::runInView` (flutter#148596)
  Add tests for shared_app_data.#.dart API examples. (flutter#147830)
  Add tests for logical_key_set.0.dart API example. (flutter#147735)
  [wiki migration] Ecosystem team pages (flutter#148589)
  Fix painting API examples tests directories structure. (flutter#148177)
  fixes `CupertinoModalPopupRoute` (flutter#147823)
  ...
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this pull request May 22, 2024
…r#6778)

flutter/flutter@02a6c91...d02292d

2024-05-21 ian@hixie.ch Make FileSystem dependency explicit througout (more). (flutter/flutter#148095)
2024-05-20 magder@google.com Remove add-to-app bitcode warning (flutter/flutter#148587)
2024-05-20 rmolivares@renzo-olivares.dev SelectionArea's selection should not be cleared on loss of window focus (flutter/flutter#148067)
2024-05-20 katelovett@google.com [wiki migration] Engine team pages (flutter/flutter#148696)
2024-05-20 goderbauer@google.com Manual roll camera dependency (flutter/flutter#148426)
2024-05-20 katelovett@google.com [wiki migration] Framework team pages (flutter/flutter#148721)
2024-05-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from a8fb9daae8d0 to c2ef01f6f1ab (3 revisions) (flutter/flutter#148722)
2024-05-20 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.5 to 3.25.6 (flutter/flutter#148715)
2024-05-20 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.4.0 to 4.4.1 (flutter/flutter#148714)
2024-05-20 louisehsu@google.com Fixes incorrect read/write permissions on Flutter.framework and FlutterMacOS.framework (flutter/flutter#148580)
2024-05-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from c6fecf65fbf3 to a8fb9daae8d0 (3 revisions) (flutter/flutter#148700)
2024-05-20 jason-simmons@users.noreply.github.com Remove the no-shuffle tag on the flutter_tools create_test suite (flutter/flutter#148688)
2024-05-20 andrewrkolos@gmail.com log incoming vm service messages in `FlutterVMService::runInView` (flutter/flutter#148596)
2024-05-20 sokolovskyi.konstantin@gmail.com Add tests for shared_app_data.#.dart API examples. (flutter/flutter#147830)
2024-05-20 sokolovskyi.konstantin@gmail.com Add tests for logical_key_set.0.dart API example. (flutter/flutter#147735)
2024-05-20 katelovett@google.com [wiki migration] Ecosystem team pages (flutter/flutter#148589)
2024-05-20 sokolovskyi.konstantin@gmail.com Fix painting API examples tests directories structure. (flutter/flutter#148177)
2024-05-20 102401667+Dimilkalathiya@users.noreply.github.com fixes `CupertinoModalPopupRoute` (flutter/flutter#147823)
2024-05-20 nate.w5687@gmail.com Implement new `AnimationStatus` getters (flutter/flutter#148570)
2024-05-20 nate.w5687@gmail.com Reland "`if` chains � `switch` expressions" (flutter/flutter#148634)
2024-05-20 gspencergoog@users.noreply.github.com Factor out `RawView`, make `View` listen to engine generated view focus events (flutter/flutter#143259)
2024-05-20 zanderso@users.noreply.github.com Remove all tests from a02s. Replace with mokey in bringup (flutter/flutter#148563)

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

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

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
arc-yong pushed a commit to Arctuition/packages-arc that referenced this pull request Jun 14, 2024
…r#6778)

flutter/flutter@02a6c91...d02292d

2024-05-21 ian@hixie.ch Make FileSystem dependency explicit througout (more). (flutter/flutter#148095)
2024-05-20 magder@google.com Remove add-to-app bitcode warning (flutter/flutter#148587)
2024-05-20 rmolivares@renzo-olivares.dev SelectionArea's selection should not be cleared on loss of window focus (flutter/flutter#148067)
2024-05-20 katelovett@google.com [wiki migration] Engine team pages (flutter/flutter#148696)
2024-05-20 goderbauer@google.com Manual roll camera dependency (flutter/flutter#148426)
2024-05-20 katelovett@google.com [wiki migration] Framework team pages (flutter/flutter#148721)
2024-05-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from a8fb9daae8d0 to c2ef01f6f1ab (3 revisions) (flutter/flutter#148722)
2024-05-20 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.5 to 3.25.6 (flutter/flutter#148715)
2024-05-20 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.4.0 to 4.4.1 (flutter/flutter#148714)
2024-05-20 louisehsu@google.com Fixes incorrect read/write permissions on Flutter.framework and FlutterMacOS.framework (flutter/flutter#148580)
2024-05-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from c6fecf65fbf3 to a8fb9daae8d0 (3 revisions) (flutter/flutter#148700)
2024-05-20 jason-simmons@users.noreply.github.com Remove the no-shuffle tag on the flutter_tools create_test suite (flutter/flutter#148688)
2024-05-20 andrewrkolos@gmail.com log incoming vm service messages in `FlutterVMService::runInView` (flutter/flutter#148596)
2024-05-20 sokolovskyi.konstantin@gmail.com Add tests for shared_app_data.#.dart API examples. (flutter/flutter#147830)
2024-05-20 sokolovskyi.konstantin@gmail.com Add tests for logical_key_set.0.dart API example. (flutter/flutter#147735)
2024-05-20 katelovett@google.com [wiki migration] Ecosystem team pages (flutter/flutter#148589)
2024-05-20 sokolovskyi.konstantin@gmail.com Fix painting API examples tests directories structure. (flutter/flutter#148177)
2024-05-20 102401667+Dimilkalathiya@users.noreply.github.com fixes `CupertinoModalPopupRoute` (flutter/flutter#147823)
2024-05-20 nate.w5687@gmail.com Implement new `AnimationStatus` getters (flutter/flutter#148570)
2024-05-20 nate.w5687@gmail.com Reland "`if` chains � `switch` expressions" (flutter/flutter#148634)
2024-05-20 gspencergoog@users.noreply.github.com Factor out `RawView`, make `View` listen to engine generated view focus events (flutter/flutter#143259)
2024-05-20 zanderso@users.noreply.github.com Remove all tests from a02s. Replace with mokey in bringup (flutter/flutter#148563)

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

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

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

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
a: leak tracking Issues and PRs related to memory leaks detected by leak_tracker f: cupertino flutter/packages/flutter/cupertino repository f: routes Navigator, Router, and related APIs. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants