Assigned
Status Update
Comments
ib...@google.com <ib...@google.com> #2
Comment has been deleted.
ib...@google.com <ib...@google.com> #3
Comment has been deleted.
ib...@google.com <ib...@google.com>
ti...@google.com <ti...@google.com>
ib...@google.com <ib...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 3882ac8364fd905c9935d38c93f84599009226d6
Author: Clara Fok <clarafok@google.com>
Date: Fri Jul 09 14:17:48 2021
Implement LoadResult.Invalid to handle race
For non-initial loads in LimitOffsetPagingSource, loads will run Room
InvalidationTracker's refreshVersionSync to synchronously check if
tables have been invalidated and notify observers. If invalidated,
load will return LoadResult.Invalid.
Paging3 will handle Invalid return type by invalidating the paging
source and closing the page event flow, such that no more loads will be
attempted on this paging source.
Note that refreshVersionSync is a temporary solution for
LimitOffsetPagingSource to check table invalidation. Another solution
that does not require a transaction is in development. Related b/192269858 .
Bug: 191806126
Test: ./gradlew :room:integration-tests:room-testapp-kotlin:cC
Test: ./gradlew room:room-paging:cC
Change-Id: I48634ab95949bae608374f5156a4edd0500a74a3
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/PagingSourceTest.kt
M room/room-paging/build.gradle
M room/room-paging/src/androidTest/kotlin/androidx/room/paging/LimitOffsetPagingSourceTest.kt
M room/room-paging/src/main/kotlin/androidx/room/paging/LimitOffsetPagingSource.kt
https://android-review.googlesource.com/1761130
Branch: androidx-main
commit 3882ac8364fd905c9935d38c93f84599009226d6
Author: Clara Fok <clarafok@google.com>
Date: Fri Jul 09 14:17:48 2021
Implement LoadResult.Invalid to handle race
For non-initial loads in LimitOffsetPagingSource, loads will run Room
InvalidationTracker's refreshVersionSync to synchronously check if
tables have been invalidated and notify observers. If invalidated,
load will return LoadResult.Invalid.
Paging3 will handle Invalid return type by invalidating the paging
source and closing the page event flow, such that no more loads will be
attempted on this paging source.
Note that refreshVersionSync is a temporary solution for
LimitOffsetPagingSource to check table invalidation. Another solution
that does not require a transaction is in development. Related
Bug: 191806126
Test: ./gradlew :room:integration-tests:room-testapp-kotlin:cC
Test: ./gradlew room:room-paging:cC
Change-Id: I48634ab95949bae608374f5156a4edd0500a74a3
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/PagingSourceTest.kt
M room/room-paging/build.gradle
M room/room-paging/src/androidTest/kotlin/androidx/room/paging/LimitOffsetPagingSourceTest.kt
M room/room-paging/src/main/kotlin/androidx/room/paging/LimitOffsetPagingSource.kt
Description
Version used: 1.3.6
Devices/Android versions reproduced on: Android emulator Pixel 5 API 30
When trying to create an ExifInterface instance of the following file, I got this error:
java.lang.OutOfMemoryError: Failed to allocate a 163840016 byte allocation with 25165824 free bytes and 107MB until OOM, target footprint 113264584, growth limit 201326592
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.skip(BufferedInputStream.java:382)
at java.io.FilterInputStream.skip(FilterInputStream.java:151)
at androidx.exifinterface.media.ExifInterface$ByteOrderedDataInputStream.skipFully(ExifInterface.java:7874)
at androidx.exifinterface.media.ExifInterface$SeekableByteOrderedDataInputStream.seek(ExifInterface.java:7719)
at androidx.exifinterface.media.ExifInterface.readImageFileDirectory(ExifInterface.java:6899)
at androidx.exifinterface.media.ExifInterface.getRawAttributes(ExifInterface.java:5714)
at androidx.exifinterface.media.ExifInterface.loadAttributes(ExifInterface.java:4601)
at androidx.exifinterface.media.ExifInterface.<init>(ExifInterface.java:4056)
at androidx.exifinterface.media.ExifInterface.<init>(ExifInterface.java:4011)
This image is of 8368w x 5584h, not sure whether it's related to the extreme resolution