Status Update
Comments
je...@google.com <je...@google.com>
lu...@google.com <lu...@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.
mi...@mercurydevelopment.com <mi...@mercurydevelopment.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
lu...@google.com <lu...@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
lu...@google.com <lu...@google.com> #5
I will backport this to the 8.0 and 4.0 branches.
mi...@mercurydevelopment.com <mi...@mercurydevelopment.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?
lu...@google.com <lu...@google.com>
mi...@mercurydevelopment.com <mi...@mercurydevelopment.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
lu...@google.com <lu...@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
yu...@gmail.com <yu...@gmail.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
d....@pay-s.ru <d....@pay-s.ru> #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
da...@gmail.com <da...@gmail.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
da...@gmail.com <da...@gmail.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
ra...@gmail.com <ra...@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...@gmail.com <ro...@gmail.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
d....@pay-s.ru <d....@pay-s.ru> #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: ψξξψξξξ
.
ya...@gmail.com <ya...@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
tr...@gmail.com <tr...@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
bu...@gmail.com <bu...@gmail.com> #18
rj...@gmail.com <rj...@gmail.com> #19
gi...@indiamart.com <gi...@indiamart.com> #20
li...@gmail.com <li...@gmail.com> #21
au...@gmail.com <au...@gmail.com> #22
I'm also have this same error with zoom in flutter
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:shrinkReleaseRes'.
> Multiple task action failures occurred:
> A failure occurred while executing com.android.build.gradle.internal.transforms.ShrinkProtoResourcesAction
> ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
> A failure occurred while executing com.android.build.gradle.internal.transforms.ShrinkProtoResourcesAction
> ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
> A failure occurred while executing com.android.build.gradle.internal.transforms.ShrinkProtoResourcesAction
> ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6m 28s
Running Gradle task 'assembleRelease'... 389.5s
Gradle task assembleRelease failed with exit code 1
zoom_native_sdk: ^0.3.3
Flutter 3.10.5 • channel stable •
java version "17.0.7" 2023-04-18 LTS Java(TM) SE Runtime Environment (build 17.0.7+8-LTS-224) Java HotSpot(TM) 64-Bit Server VM (build 17.0.7+8-LTS-224, mixed mode, sharing)
Gradle 7.6.1
Build time: 2023-02-24 13:54:42 UTC Revision: 3905fe8ac072bbd925c70ddbddddf4463341f4b4
Kotlin: 1.7.10 Groovy: 3.0.13 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 17.0.7 (Oracle Corporation 17.0.7+8-LTS-224) OS: Windows 11 10.0 amd6
sa...@pocketfm.com <sa...@pocketfm.com> #23
ar...@gmail.com <ar...@gmail.com> #24
ng...@gmail.com <ng...@gmail.com> #25
sg...@google.com <sg...@google.com> #26
Manually updating the .xml
files to not have a BOM should be a way to workaround this issue. Most text editors have a way of saving without a BOM.
Description
Our app uses Zoom SDK which contains files like this in res/raw folder:
As you can see there is an empty line after xml declaration.
Both AGP 7.3.0-beta03 and AGP 7.4.0-alpha04 can't build an app containing this file with the following exception:
When there is no files with an empty line after xml declaration ShrinkResourcesNewShrinkerTask executes correctly.
AGP 7.3.0-beta02 doesn't have this issue.
The issue is probably related to these changes:https://cs.android.com/android-studio/platform/tools/base/+/a01dac7c7fff60e3f98c90f50f5295415f623b80