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

Finalizer exception when using NetworkImage. #2950

Closed
apwilson opened this issue Mar 28, 2016 · 5 comments
Closed

Finalizer exception when using NetworkImage. #2950

apwilson opened this issue Mar 28, 2016 · 5 comments
Labels
engine flutter/engine repository. See also e: labels. framework flutter/packages/flutter repository. See also f: labels. platform-android Android applications specifically

Comments

@apwilson
Copy link
Contributor

Test app:

void main() {
  runApp(new Row(children:[new NetworkImage(src:'https://i.ytimg.com/vi/tntOCGkgt98/maxresdefault.jpg')]));
}

Exception:

03-28 10:26:27.462 E/System  (17062): Uncaught exception thrown by finalizer
03-28 10:26:27.463 E/System  (17062): java.lang.IllegalStateException: Warning: Router objects should be explicitly closed when no longer required otherwise you may leak handles.
03-28 10:26:27.463 E/System  (17062):   at org.chromium.mojo.bindings.AutoCloseableRouter.finalize(AutoCloseableRouter.java:111)
03-28 10:26:27.463 E/System  (17062):   at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:202)
03-28 10:26:27.463 E/System  (17062):   at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:185)
03-28 10:26:27.463 E/System  (17062):   at java.lang.Thread.run(Thread.java:818)
@Hixie Hixie added ⚠ bug platform-android Android applications specifically framework flutter/packages/flutter repository. See also f: labels. engine flutter/engine repository. See also e: labels. labels Apr 1, 2016
@Hixie Hixie added this to the Flutter 1.0 milestone Apr 1, 2016
@Hixie
Copy link
Contributor

Hixie commented Apr 1, 2016

See also #2509 (comment) from @jamesr:

I remember looking with @collinjackson a few months back at a number of places in flutter that have mojo or android objects owned by dart or java objects without an explicit teardown path. In both cases this produces potentially pretty bad memory leaks as neither the Android runtime nor the Dart runtime promise to run finalizers promptly or even run them at all. I don't remember if anything came of this.

In this case the Mojo bindings Java finalizer is the one complaining that some Java object was holding on to a Mojo handle when the finalizer ran, meaning it wasn't explicitly destroyed.

@Hixie
Copy link
Contributor

Hixie commented Apr 1, 2016

this sounds like the kind of thing @jason-simmons finds oddly irresistible. :-)

@Hixie
Copy link
Contributor

Hixie commented Apr 15, 2016

We're probably leaking all the mojo objects on the Java side of things when accessibility is enabled, too.

@jimbeveridge
Copy link
Contributor

+1 for this bug. Seeing it whenever I use FlutterView.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
engine flutter/engine repository. See also e: labels. framework flutter/packages/flutter repository. See also f: labels. platform-android Android applications specifically
Projects
None yet
Development

No branches or pull requests

3 participants