-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Fix the application not disposing by breaking circular references on quit #47684
Fix the application not disposing by breaking circular references on quit #47684
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie or stuartmorgan on the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Is there any way to test this? Seems like it would be a good thing to prevent a regression here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! As @gspencergoog notes, if there's a reasonable test that could be written, please add it.
Based on the issue filed, it sounds like perhaps a solution can eventually be upstreamed to GTK?
To test we'd have to launch and close a full Flutter application - it wasn't clear to me how we'd do that. I hope an upstream fix does end up in GTK, but we wouldn't be able to rely on it being there for quite some time. I talked to a GTK maintainer and they didn't see it as a major issue and they expected apps to use the shutdown signal. |
At some point I should get back to adding support for fixture tests for the Linux embedder. Until then, I don't think we have support for testing this. |
Can we file a bug for this and a test exemption request on Discord to continue? |
We're waiting on a test to be written; there have been side discussions on a mechanism for testing this and @gspencergoog has landed code that should enable a test for this, so in all likelihood won't need to file for a test exemption. |
Any updates on a test so we can move this along? |
85efb21
to
b5cf5a4
Compare
Has a test now. @gspencergoog could you have a check if it works with the testing framework changes you made? In particular I call gtk_init() without any issues, I see you use |
|
…139190) flutter/engine@570fec4...4beaa11 2023-11-29 jonahwilliams@google.com [Impeller] fix descriptor pool recycler test flake. (flutter/engine#48479) 2023-11-29 robert.ancell@canonical.com Fix the application not disposing by breaking circular references on quit (flutter/engine#47684) 2023-11-28 dnfield@google.com Fix CanonicalizeURL for file schema (flutter/engine#48466) 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 matanl@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://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
…lutter#139190) flutter/engine@570fec4...4beaa11 2023-11-29 jonahwilliams@google.com [Impeller] fix descriptor pool recycler test flake. (flutter/engine#48479) 2023-11-29 robert.ancell@canonical.com Fix the application not disposing by breaking circular references on quit (flutter/engine#47684) 2023-11-28 dnfield@google.com Fix CanonicalizeURL for file schema (flutter/engine#48466) 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 matanl@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://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
GtkApplication windows contain a reference back to the application. This means the MyApplication object in the Flutter application never disposes. We workaround this by removing these references before we quit. This occurs for all GTK applications that quit using this method, see https://gitlab.gnome.org/GNOME/gtk/-/issues/6190. This may be fixed upstream at some point but the proposed workaround should solve the problem for all versions and not conflict with any upstream solution.
Fixes flutter/flutter#136582