Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@jpnurmi
Copy link
Member

@jpnurmi jpnurmi commented Aug 18, 2022

GObject's dispose() method may be called multiple times.

This explains one of the rules about the dispose() handler stated earlier: the dispose() handler can be invoked multiple times.

Guard FlView against trying to disconnect the same signal multiple times by clearing the ID to avoid warnings when closing the window.

(bug:74019): GLib-GObject-WARNING **: 11:15:08.697: ../../../gobject/gsignal.c:2731: instance '0x55e1c3ea0200' has no handler with id '255'

GObject's dispose() method may be called multiple times. Guard against
trying to disconnect the same signal multiple times by clearing the ID
to avoid warnings when closing the window.

```
(bug:74019): GLib-GObject-WARNING **: 11:15:08.697: ../../../gobject/gsignal.c:2731: instance '0x55e1c3ea0200' has no handler with id '255'
```
@flutter-dashboard
Copy link

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 on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on 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.

@dkwingsmt
Copy link
Contributor

The change LGTM, but is there a way to test it?

@jpnurmi
Copy link
Member Author

jpnurmi commented Aug 18, 2022

I've asked for a test exemption because we cannot create FlView or any GtkWidget instances in the headless CI.

Copy link
Contributor

@robert-ancell robert-ancell left a comment

Choose a reason for hiding this comment

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

LGTM

@jpnurmi
Copy link
Member Author

jpnurmi commented Aug 19, 2022

The change LGTM, but is there a way to test it?

One option could be to a) run flutter_linux_unittests using Xvfb to make it possible to create an instance of FlView or any other GtkWidget, b) fix or remove the warnings from FlTextureRegistrarTest, and b) set G_DEBUG=critical-warnings in the CI.

@chinmaygarde
Copy link
Contributor

Can we land this now? Perhaps file a followup for the test?

Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

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

LGTM

@dkwingsmt dkwingsmt merged commit 440a7ee into flutter:main Aug 25, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 25, 2022
@jpnurmi jpnurmi deleted the fl-view-disconnect-keymap branch August 29, 2022 08:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants