Status Update
Comments
vi...@google.com <vi...@google.com>
ga...@google.com <ga...@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.
je...@google.com <je...@google.com>
je...@google.com <je...@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
nc...@meta.com <nc...@meta.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
je...@google.com <je...@google.com> #5
I will backport this to the 8.0 and 4.0 branches.
[Deleted User] <[Deleted User]> #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?
le...@gmail.com <le...@gmail.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
ca...@gmail.com <ca...@gmail.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
je...@google.com <je...@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
nc...@meta.com <nc...@meta.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
ga...@google.com <ga...@google.com>
xa...@google.com <xa...@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
ga...@google.com <ga...@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
pe...@gmail.com <pe...@gmail.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
ro...@sentry.io <ro...@sentry.io> #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
nc...@meta.com <nc...@meta.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: ψξξψξξξ
.
pe...@gmail.com <pe...@gmail.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
ha...@gmail.com <ha...@gmail.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
je...@google.com <je...@google.com> #18
[Deleted User] <[Deleted User]> #19
nc...@meta.com <nc...@meta.com> #20
je...@google.com <je...@google.com> #21
#19, I am sorry, there was a misunderstanding with the release team. they had an even more urgent fix to push which was 7.4.1 and the normal dot release that contains this fix got pushed to 7.4.2 which is looking to be couple of weeks away (still working the date with them). So sorry for the wrong info, It surprised me too.
nc...@meta.com <nc...@meta.com> #22
That's confusing as the issue seems effectively fixed in 7.4.1, also in the reproducer I linked:
pe...@gmail.com <pe...@gmail.com> #23
For a workmate it also failed on his first try. We might see tomorrow.
Not sure yet, but it might be flaky now, depending on some cache or other internals.
I'll report back if I know more but it's good to know about the new target of 7.4.2. Really sad this kind of thing can't make it into a .0 release as prio 0 bug, especially since it *was* ready.
Maybe you guys can take this as a feedback and improve something, feels like it just hit a process / politics wall.
ar...@gmail.com <ar...@gmail.com> #24
je...@google.com <je...@google.com> #25
this might be due to a third party plugin. do you have a small project to reproduce the issue ?
can you provide a stack trace ?
Description
> Android Public Tracker > App Development > Android Studio > Gradle > Android Gradle Plugin
but I don't have permission to do so.
## Expected Result
AGP Variant API works well between 7.4.0-beta05 and 7.4.0-rc01
## Observed Results
Bumping AGP from 7.4.0-beta05 to 7.4.0-rc01 results in a build failure with the following message:
```
> Task :example:mapDebugSourceSetPaths FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':example:mapDebugSourceSetPaths'.
> Querying the mapped value of map(provider(java.util.Set)) before task ':example:reproducerdebugTask' has completed is not supported
```
It seems like AGP is querying the value of the `@OutputDirectory` of the task I created `example:reproducerdebugTask`.
## Reproducer
You can find a small reproducer here:
Specifically this commit shows a working setup with AGP 7.4 beta5
-
Bumping to RC01 causes the failure:
-
I've also configured the CI so you have a clean environment where you can easily reproduce.
The command to reproduce upon cloning is `./gradlew :example:assembleDebug`.
## Further Context
This issue was noticed upstream on React Native here:
as we're using a similar pattern inside the React Native Gradle Plugin.