Status Update
Comments
jl...@google.com <jl...@google.com>
to...@gmail.com <to...@gmail.com> #2
Thanks for the report. Would it be possible for you to share a zip dump of the inputs to R8, including the app's class files, keep rules, etc.? This should enable us to reproduce the build.
You can generate this by running:
./gradlew assembleRelease --no-daemon -Dcom.android.tools.r8.dumpinputtodirectory=/path/to/r8/dumps
See also
be...@google.com <be...@google.com> #3
be...@google.com <be...@google.com> #4
Thanks for sharing. Looking at the code from the dump it is not immediately clear why this would fail with a NullPointerException. Would it be possible for you to also share the APK that is not working?
to...@gmail.com <to...@gmail.com> #5
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
at com.google.android.gms.internal.fitness.zzfv.zza(com.google.android.gms:play-services-fitness@@21.1.0:1)
at com.google.android.gms.fitness.data.Session$Builder.setActivity(com.google.android.gms:play-services-fitness@@21.1.0:1)
It happens for example when invoking:
val session = Session.Builder()
.setDescription("our description")
.setIdentifier("our package name")
.setActivity(FitnessActivities.SLEEP)
.setStartTime(startSleepTime, TimeUnit.MILLISECONDS)
.setEndTime(endSleepTime, TimeUnit.MILLISECONDS)
.build()
We tried it with both with R8 fullMode default enabled and with R8 full mode disabled, but in both cases the error occurs.
We also tested this with JavaVersion.VERSION_1_8 and with JavaVersion.VERSION_17 and in both cases the problem occurs.
In all cases it works fine with a debug build.
We we revert to gradle 7.4.2. the problem disappears.
Please let me know how we can help you with additional information.
je...@google.com <je...@google.com> #6
Would it be possible for you to share a small project that reproduces this?
The dump shared in
to...@gmail.com <to...@gmail.com> #7
A small project reproducing this issue is difficult, it requires the Google Fit integration.
I'm trying to create the code dumps for a release build, but I never use the gradlew command line and it runs with some errors, that I'm not familiar with. I will try it in another way.
to...@gmail.com <to...@gmail.com> #8
Please let me know if you need more information.
da...@gmail.com <da...@gmail.com> #9
Branch: main
commit 6c720a541af1562d61ccb0cf0727df6da0d22ba6
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 10 11:15:30 2023
Fix removal of live array-puts in presence of Assume instruction
Bug:
Change-Id: Ief4e51fcccba7e777f57efe9377ab20e89ca0554
M src/main/java/com/android/tools/r8/ir/code/ArrayPut.java
M src/test/java/com/android/tools/r8/rewrite/arrays/ArrayPutsToArrayAliasTest.java
da...@gmail.com <da...@gmail.com> #10
Branch: main
commit bed41a13debd0875e508353cf79c33c751e49a22
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 10 11:01:26 2023
Reproduce removal of live array-puts in presence of Assume instruction
Bug:
Change-Id: I2bb641c28d6b107db2f3daefd4e7fedcf85cbde9
A src/test/java/com/android/tools/r8/rewrite/arrays/ArrayPutsToArrayAliasTest.java
to...@gmail.com <to...@gmail.com> #11
Branch: 8.0
commit 6392f0ec0142bd168635cb7b8b7610b343679288
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 10 11:28:06 2023
Version 8.0.46
Bug:
Change-Id: I98398113ef7db1971e7f91cddf0227d80f715313
M src/main/java/com/android/tools/r8/Version.java
je...@google.com <je...@google.com> #12
Branch: 8.0
commit b7985cfb00840d9997e05eb5fa5084df2a7699c4
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 10 11:28:00 2023
Fix removal of live array-puts in presence of Assume instruction
Bug:
Change-Id: Ief4e51fcccba7e777f57efe9377ab20e89ca0554
M src/main/java/com/android/tools/r8/ir/code/ArrayPut.java
M src/test/java/com/android/tools/r8/rewrite/arrays/ArrayPutsToArrayAliasTest.java
sp...@google.com <sp...@google.com>
sp...@google.com <sp...@google.com> #13
Branch: 8.0
commit 38eb966d483268f8f310b741a2652a64adea7d24
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 10 11:27:54 2023
Reproduce removal of live array-puts in presence of Assume instruction
Bug:
Change-Id: I2bb641c28d6b107db2f3daefd4e7fedcf85cbde9
A src/test/java/com/android/tools/r8/rewrite/arrays/ArrayPutsToArrayAliasTest.java
to...@gmail.com <to...@gmail.com> #14
Branch: 8.1
commit 1a4e130758d76eca543445eddae6b76e4550fc41
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 10 11:32:45 2023
Version 8.1.46
Bug:
Change-Id: Ife577927219199e5be967e1a7ad1bf7286214579
M src/main/java/com/android/tools/r8/Version.java
sp...@google.com <sp...@google.com>
to...@gmail.com <to...@gmail.com> #15
Branch: 8.1
commit cc131e0e6d743f357d81802d701b698f1b8aea08
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 10 11:31:17 2023
Fix removal of live array-puts in presence of Assume instruction
Bug:
Change-Id: Ief4e51fcccba7e777f57efe9377ab20e89ca0554
M src/main/java/com/android/tools/r8/ir/code/ArrayPut.java
M src/test/java/com/android/tools/r8/rewrite/arrays/ArrayPutsToArrayAliasTest.java
sp...@google.com <sp...@google.com> #16
Branch: 8.1
commit 1ea9424e831c7ba9f213df00ac2ae674ea092349
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 10 11:30:43 2023
Reproduce removal of live array-puts in presence of Assume instruction
Bug:
Change-Id: I2bb641c28d6b107db2f3daefd4e7fedcf85cbde9
A src/test/java/com/android/tools/r8/rewrite/arrays/ArrayPutsToArrayAliasTest.java
sp...@google.com <sp...@google.com> #17
Thanks for sharing the reproduction. This is now fixed in R8 8.0.46 and 8.1.46. R8 8.0.46 and 8.1.46 should make it into AGP 8.0.2 and AGP 8.1.0-beta4, respectively.
Until that is released you can build with R8 8.0.46 by making the following change to settings.gradle
or settings.gradle.kts
.
pluginManagement {
buildscript {
repositories {
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw")
}
}
dependencies {
classpath("com.android.tools:r8:8.0.46")
}
}
}
to...@gmail.com <to...@gmail.com> #18
sp...@google.com <sp...@google.com> #20
This will be fixed in AGP 8.0.0-beta02 (Change-Id: Icb1a29bcd0c60a8ee6228a5ee05e708624c319c0)
to...@gmail.com <to...@gmail.com> #21
Thanks a lot, just to be sure this was also tested with both options from #8?
to...@gmail.com <to...@gmail.com> #22
So updated to AGP 8.0 A10 and the profiles are back but still in com.android.tools.build.profiles
this contradicts #6 is this normal/expected will it change in a future 8.0 build?
sp...@google.com <sp...@google.com> #23
Re #22, please disregard #6... that only applies to APKs, not AABs.
ma...@google.com <ma...@google.com> #24
Is there an alpha that includes this fix?
sp...@google.com <sp...@google.com> #25
The fix will be in AGP 8.0.0-beta02 and AGP 8.1.0-alpha01
Description
DESCRIBE THE ISSUE IN DETAIL:
STEPS TO REPRODUCE:
ATTACH SCREENSHOTS/RECORDINGS OF THE ISSUE
ATTACH LOG FILES (Select Help > Show Log in Files, or Show Log in Finder on a Mac)
IMPORTANT: Please readhttps://developer.android.com/studio/report-bugs.html carefully and supply
all required information.
Studio Build: Flaming A8 Version of Gradle Plugin: 8.0.0 A8 Version of Gradle: 7.6-rc-3 Version of Java: 11 OS: Windows