Fixed
Status Update
Comments
ac...@gmail.com <ac...@gmail.com> #2
Edit: This endless compiling is only happening every 4th or 5th building process.
yb...@google.com <yb...@google.com> #3
can you check if the gradle is running out of memory ?
We had a bug like that in Room in preview versions but that has been long fixed.
Also data binding had a similar OOM error, if you are using data binding.
Can you also try w/ latest android studio & gradle (3.0-x).
If you have a project that reproduces the issue, it would be very helpful.
We had a bug like that in Room in preview versions but that has been long fixed.
Also data binding had a similar OOM error, if you are using data binding.
Can you also try w/ latest android studio & gradle (3.0-x).
If you have a project that reproduces the issue, it would be very helpful.
ac...@gmail.com <ac...@gmail.com> #4
According to the error message, that is the problem:
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.lang.OutOfMemoryError: Java heap space
Unfortunately I can't show you the current project or test on the latest version of android studio/gradle. I'm currently using the latest stable version of both.
This are the dependencies of the project:
//Support lib dependency
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:customtabs:25.3.1'
compile 'com.android.support:preference-v14:25.3.1'
//LifeCycles, LiveData and ViewModel dependency
compile "android.arch.lifecycle:runtime:1.0.0-alpha2"
compile "android.arch.lifecycle:extensions:1.0.0-alpha2"
annotationProcessor "android.arch.lifecycle:compiler:1.0.0-alpha2"
//Room dependency
compile "android.arch.persistence.room:runtime:1.0.0-alpha2"
annotationProcessor "android.arch.persistence.room:compiler:1.0.0-alpha2"
//RetroFit dependency
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.squareup.retrofit2:converter-scalars:2.3.0'
//GSON dependency
compile 'com.google.code.gson:gson:2.8.1'
//Glide dependency
compile 'com.github.bumptech.glide:glide:4.0.0-RC0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC0'
//LifeRay dependency
compile group: 'com.liferay.mobile', name: 'liferay-android-sdk', version: '7.0.6'
//FireBase dependency
compile 'com.google.firebase:firebase-core:11.0.0'
compile 'com.google.firebase:firebase-messaging:11.0.0'
compile 'com.firebase:firebase-jobdispatcher:0.6.0'
//Dagger core dependency
compile 'com.google.dagger:dagger:2.11'
annotationProcessor 'com.google.dagger:dagger-compiler:2.11'
//Dagger android dependency
compile 'com.google.dagger:dagger-android:2.11'
compile 'com.google.dagger:dagger-android-support:2.11'
annotationProcessor 'com.google.dagger:dagger-android-processor:2.11'
//HTTP dependency
compile 'com.squareup.okhttp3:logging-interceptor:3.8.0'
compile "com.squareup.okhttp3:okhttp-urlconnection:3.2.0"
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.lang.OutOfMemoryError: Java heap space
Unfortunately I can't show you the current project or test on the latest version of android studio/gradle. I'm currently using the latest stable version of both.
This are the dependencies of the project:
//Support lib dependency
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:customtabs:25.3.1'
compile 'com.android.support:preference-v14:25.3.1'
//LifeCycles, LiveData and ViewModel dependency
compile "android.arch.lifecycle:runtime:1.0.0-alpha2"
compile "android.arch.lifecycle:extensions:1.0.0-alpha2"
annotationProcessor "android.arch.lifecycle:compiler:1.0.0-alpha2"
//Room dependency
compile "android.arch.persistence.room:runtime:1.0.0-alpha2"
annotationProcessor "android.arch.persistence.room:compiler:1.0.0-alpha2"
//RetroFit dependency
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.squareup.retrofit2:converter-scalars:2.3.0'
//GSON dependency
compile 'com.google.code.gson:gson:2.8.1'
//Glide dependency
compile 'com.github.bumptech.glide:glide:4.0.0-RC0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC0'
//LifeRay dependency
compile group: 'com.liferay.mobile', name: 'liferay-android-sdk', version: '7.0.6'
//FireBase dependency
compile 'com.google.firebase:firebase-core:11.0.0'
compile 'com.google.firebase:firebase-messaging:11.0.0'
compile 'com.firebase:firebase-jobdispatcher:0.6.0'
//Dagger core dependency
compile 'com.google.dagger:dagger:2.11'
annotationProcessor 'com.google.dagger:dagger-compiler:2.11'
//Dagger android dependency
compile 'com.google.dagger:dagger-android:2.11'
compile 'com.google.dagger:dagger-android-support:2.11'
annotationProcessor 'com.google.dagger:dagger-android-processor:2.11'
//HTTP dependency
compile 'com.squareup.okhttp3:logging-interceptor:3.8.0'
compile "com.squareup.okhttp3:okhttp-urlconnection:3.2.0"
ac...@gmail.com <ac...@gmail.com> #5
It seems like that the antivirus program "McAfee" is responsible for that behavior. I will do further testing to confirm that.
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.