Status Update
Comments
bi...@google.com <bi...@google.com>
jv...@google.com <jv...@google.com>
ga...@google.com <ga...@google.com>
au...@google.com <au...@google.com> #2
Thank you for the report and the supplied dump with the reproduction. I can confirm that the NPE is also present on HEAD, and I will look into it.
Quite a few of the class files in the dump has malformed inner-class attribute, where R8 reports e.g.:
Info in /tmp/tmpo67ucguh/program.jar:ofifmwrrhhmodsc/ψξψξψξξ.class:
Malformed inner-class attribute:
outerTypeInternal: ofifmwrrhhmodsc/ψξψξψξξ
innerTypeInternal: ofifmwrrhhmodsc/ψξψξψξξ$ψξξψξξξ
innerName: ψξψξψξξ$ψξξψξξξ
These are ignored, so they should not be the reason for the NPE, but something to also look into.
bi...@google.com <bi...@google.com> #3
Branch: main
commit e59500ca4445f5fb5d2ccc1114acbf66df11d196
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 09:48:55 2023
Insert patched frame instructions in the right place
Fixes:
Change-Id: Iae204ed529f9af5bf5fa3eaacba45128dfa6fd9e
M src/main/java/com/android/tools/r8/graph/LazyCfCode.java
M src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
au...@google.com <au...@google.com> #4
Branch: main
commit 780c2e83c8c033e7594d61894fa1b3dbcad6630b
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 09:48:13 2023
Add reproduction of
Bug:
Change-Id: I7573883d6a649eed47b10d7bf0cdea2e11710268
M build.gradle
M src/main/java/com/android/tools/r8/cf/code/frame/UninitializedNew.java
A src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
bi...@google.com <bi...@google.com> #5
I will backport this to the 8.0 and 4.0 branches.
ga...@google.com <ga...@google.com> #6
Thank you very much for taking a look at this!
Is this fix related to the nullpointer or the malformed inner-class attributes ?
Do you have a separated ticket for it? Could you share it?
bi...@google.com <bi...@google.com> #7
Branch: 4.0
commit 6edb00fb23e41b28d4794cfa69d706d5c5aa3fba
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:55:01 2023
Version 4.0.56
Bug:
Change-Id: I88a20fc922ce892d38fa3a34f9a3f1f4714354ae
M src/main/java/com/android/tools/r8/Version.java
sp...@google.com <sp...@google.com> #8
Branch: 4.0
commit d9215af3b02f64d1207b9ebd63a6925229307b9d
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:54:50 2023
Insert patched frame instructions in the right place
Bug:
Change-Id: Iae204ed529f9af5bf5fa3eaacba45128dfa6fd9e
M src/main/java/com/android/tools/r8/graph/LazyCfCode.java
M src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
sp...@google.com <sp...@google.com> #9
Branch: 4.0
commit 4fda9b9062c871ba0e31cb68d1518b13b993692f
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:54:33 2023
Add reproduction of
Bug:
Change-Id: I7573883d6a649eed47b10d7bf0cdea2e11710268
M build.gradle
M src/main/java/com/android/tools/r8/cf/code/frame/UninitializedNew.java
A src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
xa...@google.com <xa...@google.com> #10
Branch: 8.0
commit 6686e7dffea83ea894438b496c065d0a18cda206
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:53:01 2023
Version 8.0.37
Bug:
Change-Id: I43a723a94638088d921cd3fb6e22ef6e41f07d5f
M src/main/java/com/android/tools/r8/Version.java
sp...@google.com <sp...@google.com> #11
Branch: 8.0
commit 57f55fb70aa678a61f9c7ff1826fbc695faeac7d
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:52:27 2023
Insert patched frame instructions in the right place
Bug:
Change-Id: Iae204ed529f9af5bf5fa3eaacba45128dfa6fd9e
M src/main/java/com/android/tools/r8/graph/LazyCfCode.java
M src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
sp...@google.com <sp...@google.com> #12
Branch: 8.0
commit cd00c053222b06bb27fdd90bbed56af9c9ef0744
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:51:57 2023
Add reproduction of
Bug:
Change-Id: I7573883d6a649eed47b10d7bf0cdea2e11710268
M build.gradle
M src/main/java/com/android/tools/r8/cf/code/frame/UninitializedNew.java
A src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
sp...@google.com <sp...@google.com> #13
Branch: 4.0
commit d9215af3b02f64d1207b9ebd63a6925229307b9d
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:54:50 2023
Insert patched frame instructions in the right place
Bug:
Change-Id: Iae204ed529f9af5bf5fa3eaacba45128dfa6fd9e
M src/main/java/com/android/tools/r8/graph/LazyCfCode.java
M src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
au...@google.com <au...@google.com> #14
Branch: 4.0
commit 4fda9b9062c871ba0e31cb68d1518b13b993692f
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:54:33 2023
Add reproduction of
Bug:
Change-Id: I7573883d6a649eed47b10d7bf0cdea2e11710268
M build.gradle
M src/main/java/com/android/tools/r8/cf/code/frame/UninitializedNew.java
A src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
au...@google.com <au...@google.com> #15
Answer to
The malformed inner-class attributes is an issue with the input class files, and they where not related to the NPE. You will have to contact the supplier of the library where they are present if you would like to get rid of the "Info" messages (you will have to run ./gradlew --info ...
to see them). From what I can see the issue is that the innerName: ψξψξψξξ$ψξξψξξξ
should have been innerName: ψξξψξξξ
.
ga...@google.com <ga...@google.com> #16
Branch: 4.0
commit 49f738ff7377dacecf0fca39fec5146beb251ea3
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 18:14:15 2023
Version 4.0.57
Backport test to 4.0 test APIs.
Bug:
Change-Id: Iecf03a2ad9dcdbd53e6c572d2f08915248435682
M src/main/java/com/android/tools/r8/Version.java
M src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
bi...@google.com <bi...@google.com> #17
Branch: 8.0
commit c11ddf096e58245c2c67514dc9e5a2098dd8f705
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 18:16:54 2023
Version 8.0.38
Backport test to 8.0 test APIs.
Bug:
Change-Id: I35ae6d701fa92a6a7a734f9c0296d1383fed8e20
M src/main/java/com/android/tools/r8/Version.java
M src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
ga...@google.com <ga...@google.com> #18
je...@google.com <je...@google.com> #19
je...@google.com <je...@google.com> #20
bi...@google.com <bi...@google.com> #21
In terms of #20, I think that is expected because we normally see config cache miss if a file is created during configuration. However, if a file get modified, I assume it would say xxx has been modified.
je...@google.com <je...@google.com> #22
This debugging change says that:
analytics.settings was written at:
2023-08-30 20:08:54.977482090 +0000
first Gradle start at Wed Aug 30 20:03:28 UTC 2023
first Gradle end at Wed Aug 30 20:09:35 UTC 2023
It looks like something in the first build wrote this file somewhat near the end of the build
Specifically, about 5m26s - 5m27s after the start of the build and 40s-41s before the end of the build
Resulting scan:
I see a few tasks that started in this build scan at approximately 5m26s, mostly lint-related.
I'll see if I can get more details
je...@google.com <je...@google.com> #23
I checked some timestamps again in aosp/2731437
Gradle started at 21:01:18 UTC 2023
Gradle completed at 21:07:21 UTC 2023
analytics.settings created at 21:05:35.748195543
4m17s after Gradle started
1m46s before Gradle ended
Uploaded the scan to
I see a few tasks running in that scan around 4m17s, mostly but not exclusively lint
je...@google.com <je...@google.com> #24
I just tried this command:
OUT_DIR=../../out DIST_DIR=../../out/dist ./busytown/androidx_compose_multiplatform.sh
and found that that reproduced the error on my computer. Maybe we can simplify it from there
sp...@google.com <sp...@google.com> #25
I see a few tasks running in that scan around 4m17s, mostly but not exclusively lint
I took a look at my previous lint fix after seeing this.
I think the problem might be that LintClient.isGradle
might not always be true when running the lint tasks, in which case
LintClient.isGradle
should be true when running lint tasks from Gradle because we invoke lint with --client-id gradle
, but when I run grep -r "client=\""
on the AndroidX codebase, I see a mix of client="gradle"
and client="cli"
, which suggests to me that the client id is being reset in some cases.
je...@google.com <je...@google.com> #26
I ran this command:
rm ../../out -rf && OUT_DIR=../../out DIST_DIR=../../out/dist ./gradlew lintAnalyzeDebug -Pandroidx.verifyUpToDate
and it created ../../out/.gradle/.android/analytics.settings
but when I ran this command
rm ../../out -rf && OUT_DIR=../../out DIST_DIR=../../out/dist ./gradlew lintAnalyzeDebug -Pandroidx.verifyUpToDate --max-workers 1
it didn't create ../../out/.gradle/.android/analytics.settings
so it could be that reproducing the error requires running certain tasks at the same time
je...@google.com <je...@google.com> #27
Combining
I think lint runs inside the Gradle Daemon JVM process - is that right?
I notice LintClient.kt mentions “@JvmStatic lateinit var clientName: String”. I think that means multiple lint clients might be able to overwrite each others’ values?
Maybe I can figure out which tasks set the lint client to something else
bi...@google.com <bi...@google.com>
je...@google.com <je...@google.com> #30
Thanks!
I investigated a little bit more into the plausibility of our guess (parallel lint invocations causing incorrect client) and it seems to be holding up:
1: I notice that aosp/2724176 changes some clients from "cli" to "gradle" for example
2: I regenerated all of the lint baselines via echo | tee
find -name lint-baseline.xml && ./gradlew updateLintBaseline --max-workers=1
and found that it put 'client="gradle"' into the resulting files
I'll check again later after updating to the corresponding AGP
sp...@google.com <sp...@google.com> #31
Thanks again Jeff!
Reassigning back to Bingran assuming the lint issue has been resolved.
In our integration tests, there are cases(e.g. AnalyticsConfigurationCachingTest) we need to create this file, therefore you would get config cache miss. So it is intended that we still have an entry in ConfigurationCacheReportChecker.
Unfortunately, yes, AnalyticsSettings
is still interacting with the file in a way that is not compatible with configuration caching.
sp...@google.com <sp...@google.com>
an...@google.com <an...@google.com> #33
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Hedgehog | 2023.1.1 Beta 4
- Android Gradle Plugin 8.2.0-beta04
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
an...@google.com <an...@google.com> #34
The fixes for this issue are now also available in:
- Android Studio Iguana | 2023.2.1 Canary 4
- Android Gradle Plugin 8.3.0-alpha04
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
jf...@block.xyz <jf...@block.xyz> #35
In Gradle 8.3 we are ignoring this file with the following in gradle.properties
:
org.gradle.configuration-cache.inputs.unsafe.ignore.file-system-checks=**/.gradle/.android/analytics.settings
However, the AnalyticsService still breaks configuration on demand for some people:
> Failed to apply plugin 'com.android.internal.library'.
> Accessing GradleBuildProject.Builder through AnalyticsConfiguratorService is not allowed after AnalyticsService is created.
We've found that setting "hasOptedIn":false,"
in ~.gradle/.android/analytics.settings
fixes the issue.
sp...@google.com <sp...@google.com> #36
Re: #35, that looks like
mf...@gmail.com <mf...@gmail.com> #37
وجيهكم خلوني في حالي ..ماهو مقر.طالب
Description
DESCRIBE THE ISSUE IN DETAIL:
STEPS TO REPRODUCE:
./busytown/androidx_device_tests.sh
Expected
Our build is run twice (for up to dateness validation). Second run uses configuration cache
Actual
Second build does not use configuration cache, it is dropped due to