Fixed
Status Update
Comments
ac...@gmail.com <ac...@gmail.com> #2
since these are in public API (:/) we need to do this in 1.2
yb...@google.com <yb...@google.com> #3
since it is already marked as deprecated, we can probably do it by now.
ac...@gmail.com <ac...@gmail.com> #4
Opening diff shortly
ac...@gmail.com <ac...@gmail.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d576cbdc911cba16638a44fd8223391a90a07ef7
Author: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
Date: Tue Aug 11 09:30:34 2020
[GH] Hide deprecated internal API.
## Proposed Changes
* `RoomDatabase.java` has protected `mCallbacks` field which is leaking in the API docs, we should @Hide it.
## Testing
Test: Ran unit tests locally
## Issues Fixed
Fixes: 76109329
This is an imported pull request fromhttps://github.com/androidx/androidx/pull/61 .
Resolves #61
Github-Pr-Head-Sha: 6440daa3a63752c7f9d5ba2a390248cd85bc634f
GitOrigin-RevId: fe92d8466a59b44b218b6ca3cbd57dcda17992f7
Change-Id: Id599cdf5b02b32bdae0166266fb7da967598fe92
A room/runtime/api/current.ignore
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
https://android-review.googlesource.com/1396827
Branch: androidx-master-dev
commit d576cbdc911cba16638a44fd8223391a90a07ef7
Author: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
Date: Tue Aug 11 09:30:34 2020
[GH] Hide deprecated internal API.
## Proposed Changes
* `RoomDatabase.java` has protected `mCallbacks` field which is leaking in the API docs, we should @Hide it.
## Testing
Test: Ran unit tests locally
## Issues Fixed
Fixes: 76109329
This is an imported pull request from
Resolves #61
Github-Pr-Head-Sha: 6440daa3a63752c7f9d5ba2a390248cd85bc634f
GitOrigin-RevId: fe92d8466a59b44b218b6ca3cbd57dcda17992f7
Change-Id: Id599cdf5b02b32bdae0166266fb7da967598fe92
A room/runtime/api/current.ignore
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
tm...@gmail.com <tm...@gmail.com> #6
I have faced a similar OOM error when building my project.
I looked into the heap dump using the Eclipse Memory Analyzer, and several URLClassLoaders ate many memory (about 25%).
Please run './gradlew clean assemble' about 10 times with the attached project and try hprof.
You can see that many URLClassLoaders are not released.
I looked into the heap dump using the Eclipse Memory Analyzer, and several URLClassLoaders ate many memory (about 25%).
Please run './gradlew clean assemble' about 10 times with the attached project and try hprof.
You can see that many URLClassLoaders are not released.
tm...@gmail.com <tm...@gmail.com> #7
I reproduced OOM with android-architecture-components/BasicSample.
https://github.com/googlesamples/android-architecture-components
1. Clonehttps://github.com/googlesamples/android-architecture-components
2. Edit BasicSample/build.gradle to change archLifecycleVersion and archRoomVersion to 1.0.0-alpha3.
3. Run ./gradlew clean assembleDebug many times.
-----
$ cd BasicSample
$ while true; do echo "-----"; ./gradlew clean assembleDebug > /dev/null || break; done
-----
1. Clone
2. Edit BasicSample/build.gradle to change archLifecycleVersion and archRoomVersion to 1.0.0-alpha3.
3. Run ./gradlew clean assembleDebug many times.
-----
$ cd BasicSample
$ while true; do echo "-----"; ./gradlew clean assembleDebug > /dev/null || break; done
-----
yb...@google.com <yb...@google.com> #8
#6, #7; can you share your java versions ?
I've updated the project in #6 to gradle 4.1, android gradle plugin 3.0.0-beta4 and arch components alpha-9) Then i did run the following command w/o a problem:
for ((n=0;n<200;n++)); do gw clean && gw assemble; done
I'm unable to reproduce this but we are seeing some other apps being affected as well, trying to figure out what triggers it.
can you share the output of:
java -version from command line.
thanks.
I've updated the project in #6 to gradle 4.1, android gradle plugin 3.0.0-beta4 and arch components alpha-9) Then i did run the following command w/o a problem:
for ((n=0;n<200;n++)); do gw clean && gw assemble; done
I'm unable to reproduce this but we are seeing some other apps being affected as well, trying to figure out what triggers it.
can you share the output of:
java -version from command line.
thanks.
tm...@gmail.com <tm...@gmail.com> #9
$ java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.17.04.3-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.17.04.3-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
yb...@google.com <yb...@google.com> #10
ok, seems like we ARE still leaking these. Looks like we fixed leaking the giant object, which prevents us from seeing this issue most of the time. And if app's class loader grows big for whatever reason, it becomes noticeable.
seems like this issue is related:
https://github.com/xerial/sqlite-jdbc/issues/267
will see if we can find a workaround :/. A potential solution might be to use a single connection but that might have too many hard to discover side effects.
seems like this issue is related:
will see if we can find a workaround :/. A potential solution might be to use a single connection but that might have too many hard to discover side effects.
yb...@google.com <yb...@google.com> #11
I've tried a patch for the https://github.com/xerial/sqlite-jdbc/issues/267 and it fixes the problem (along w/ new code in Room to force unregister the driver).
Our options seems to be either wait for a xerial update or ship w/ a custom version.
If we go w/ a custom version, any other processor that uses xerial will have a problem.
We can jarjar to workaround it but need to make sure all references from native code to xerial are properly rewritten, which makes it an even more riskier change.
Our options seems to be either wait for a xerial update or ship w/ a custom version.
If we go w/ a custom version, any other processor that uses xerial will have a problem.
We can jarjar to workaround it but need to make sure all references from native code to xerial are properly rewritten, which makes it an even more riskier change.
yb...@google.com <yb...@google.com> #12
we are waiting for a new release on xerial to fix this.
if this is blocking you, please star that bug to increase its priority for Xerial developer.
if this is blocking you, please star that bug to increase its priority for Xerial developer.
yb...@google.com <yb...@google.com> #13
there is a new xerial version available that includes the fix CL.
next version of room will depend on it.
next version of room will depend on it.
wo...@gmail.com <wo...@gmail.com> #14
Great! Any idea when? I have to force-kill the process every few builds right now unless I want to wait for 20 minutes till it OOM's.
yb...@google.com <yb...@google.com> #15
probably next week.
you can try to add `org.xerial:sqlite-jdbc:3.20.1` to your annotationProcessor configuration to override the version, it will help some but we also needed to change Room to properly take advantage of the new version so proper fix will be only when we ship.
you can try to add `org.xerial:sqlite-jdbc:3.20.1` to your annotationProcessor configuration to override the version, it will help some but we also needed to change Room to properly take advantage of the new version so proper fix will be only when we ship.
yb...@google.com <yb...@google.com> #16
change is merged, will be fixed in next release.
al...@gmail.com <al...@gmail.com> #17
I tested the bug fix and the issue is still around but happens fewer times.
[Deleted User] <[Deleted User]> #18
#17: As #3 said above, DataBinding also have OOM problem. Did you use DataBinding?
al...@gmail.com <al...@gmail.com> #19
Yes, but I'm using the latest version (gradle 3.0.0) and I still have this issue.
Description
Version used: alpha2
Devices/Android versions reproduced on: all
Since I am using the libs, my Android Studio (v2.3.2) is entering a loop while building my project which results into a heap full exception. I would like to give you more details about that problem, but I'm not sure how to provide those.