-
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
ContentDataSource fails to retain AssetFileDescriptor - file randomly closed by GC #1759
Labels
Comments
Thanks for reporting this! |
Is there any way you can see a stacktrace of the execution? This can help find where the GC is happening. |
I'm not sure it's relevant when the GC happens. The point is that the DataSource implementations shouldn't be affected by it. We have a fix internally, and will push to GitHub soon. |
Noted. Thanks! |
ojw28
added a commit
that referenced
this issue
Aug 31, 2016
Also tweak how the null checks happen in a few DataSource implementations (should be no-op changes, but allow you to look at close() and be happy it does the right thing without having to loop at the open() implementations). Issue: #1759 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=131172427
ojw28
added a commit
that referenced
this issue
Aug 31, 2016
Also tweak how the null checks happen in a few DataSource implementations (should be no-op changes, but allow you to look at close() and be happy it does the right thing without having to loop at the open() implementations). Issue: #1759 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=131172427
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
ContentDataSource
callsopenAssetFileDescriptor
but fails to retain the returnedAssetFileDescriptor
. The doc for this method says that the caller is responsible for closing the asset file descriptor. The effect is that theAssetFileDescriptor
is GCed at some random time at which point the underlying file descriptor is invalidated, causing anIOException
if it is still in use at that time.The text was updated successfully, but these errors were encountered: