Status Update
Comments
ey...@gmail.com <ey...@gmail.com> #2
Here is the stacktrace:
java.lang.VerifyError: Verifier rejected class WN: android.app.Notification$Style WN.h(android.app.Person, android.app.PendingIntent) failed to verify: android.app.Notification$Style WN.h(android.app.Person, android.app.PendingIntent): [0x4] can't resolve returned type 'Reference: android.app.Notification$Style' or 'Unresolved Reference: android.app.Notification$CallStyle' (declaration of 'WN' appears in base.apk!classes4.dex)
at Tj.<init>(SourceFile:17)
at kT1.<init>(SourceFile:23)
at aL1.<init>(SourceFile:293)
at bh4.get(SourceFile:1606)
at cL1.a(SourceFile:29)
at cL1.e(SourceFile:17)
at s1i.getValue(Unknown Source:17)
at dL1.a(SourceFile:11)
at RQ1.b(Unknown Source:2)
at EQ1.execute(SourceFile:15)
at lU1.handleMessage(SourceFile:18)
at android.os.Handler.dispatchMessage(Handler.java:106)
at N52.dispatchMessage(SourceFile:7)
at android.os.Looper.loop(Looper.java:237)
at android.os.HandlerThread.run(HandlerThread.java:67)
Unfortunately, I can't share the dex2oat
logs for this as I'm running into
ri...@google.com <ri...@google.com> #3
Thanks for the report. Can you share the APK failing and give suggestions to force the error such that I can see the entire logcat on device. The outline is looking correct so I believe the error is someplace else and logcat will show that.
ey...@gmail.com <ey...@gmail.com> #4
I shared the APK and instructions to reproduce over email. Let me know if you have any trouble reproing the crash.
ri...@google.com <ri...@google.com> #5
Thank you for the dump and information. Turns out that behavior of the verifier changed on Android 11 and 12 but was reverted again. I am working on a fix that should be easy to merge to the 4.0 branch.
Note that the verification error is actually also easy to create by manual outlining, but our pattern just emphasize it.
ey...@gmail.com <ey...@gmail.com> #6 Restricted
ey...@gmail.com <ey...@gmail.com> #7
Branch: main
commit 88dd6ed0006725301bcbe88942e474569c9aa1b1
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Mon Mar 20 12:43:54 2023
[ApiModel] Add tests for introducing verification issues when outlining
Bug:
Change-Id: I5684a12bf42422bb96122422e063ffd0503fb5e5
M src/main/java/com/android/tools/r8/utils/AndroidApiLevel.java
A src/test/java/com/android/tools/r8/apimodel/ApiModelManualOutlineWithUnknownReturnTypeTest.java
A src/test/java/com/android/tools/r8/apimodel/ApiModelOutlineWithUnknownReturnTypeTest.java
ri...@google.com <ri...@google.com> #8
thanks for the fix. if this can be backported to 4.0 that would be great
ey...@gmail.com <ey...@gmail.com> #9
Branch: 8.0
commit e1cdcb66b3a225076a41b646a2684d150a594693
Author: Rico Wind <ricow@google.com>
Date: Tue Mar 21 18:58:29 2023
Version 8.0.39
Bug:
Change-Id: Iad8a15631027cf587871f6c8df12a8b4c601296c
M src/main/java/com/android/tools/r8/Version.java
ri...@google.com <ri...@google.com> #10
Branch: 8.0
commit 7248df9f87378eda019093887585afba9631a669
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Tue Mar 21 13:59:20 2023
[ApiModel] Insert CheckCast for return values causing verification error
Bug:
Change-Id: I2479d669217d90f057fa248fcea0f0f27faf91a6
M src/main/java/com/android/tools/r8/androidapi/ComputedApiLevel.java
M src/main/java/com/android/tools/r8/ir/code/Return.java
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
M src/main/java/com/android/tools/r8/ir/desugar/apimodel/ApiInvokeOutlinerDesugaring.java
A src/main/java/com/android/tools/r8/ir/optimize/RemoveVerificationErrorForUnknownReturnedValues.java
M src/main/java/com/android/tools/r8/utils/AndroidApiLevelUtils.java
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
M src/test/java/com/android/tools/r8/apimodel/ApiModelManualOutlineWithUnknownReturnTypeTest.java
M src/test/java/com/android/tools/r8/apimodel/ApiModelOutlineHorizontalMergingTest.java
M src/test/java/com/android/tools/r8/apimodel/ApiModelOutlineInstanceInitializerTest.java
M src/test/java/com/android/tools/r8/apimodel/ApiModelOutlineWithUnknownReturnTypeTest.java
ey...@gmail.com <ey...@gmail.com> #11
Branch: 8.0
commit 4c0694de75503094bb84d6e28fd091453b172e2e
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Tue Mar 21 13:59:12 2023
[ApiModel] Add tests for introducing verification issues when outlining
Bug:
Change-Id: I5684a12bf42422bb96122422e063ffd0503fb5e5
M src/main/java/com/android/tools/r8/utils/AndroidApiLevel.java
A src/test/java/com/android/tools/r8/apimodel/ApiModelManualOutlineWithUnknownReturnTypeTest.java
A src/test/java/com/android/tools/r8/apimodel/ApiModelOutlineWithUnknownReturnTypeTest.java
ri...@google.com <ri...@google.com> #12
Branch: 4.0
commit 4fe0ece4d3da01068bf0b63cd7a5f37d47fa6244
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Wed Mar 22 16:30:30 2023
[ApiModel] Add tests for introducing verification issues when outlining
Bug:
Change-Id: I5684a12bf42422bb96122422e063ffd0503fb5e5
M src/main/java/com/android/tools/r8/utils/AndroidApiLevel.java
A src/test/java/com/android/tools/r8/apimodel/ApiModelManualOutlineWithUnknownReturnTypeTest.java
A src/test/java/com/android/tools/r8/apimodel/ApiModelOutlineWithUnknownReturnTypeTest.java
M src/test/java/com/android/tools/r8/apimodel/ApiModelingTestHelper.java
ey...@gmail.com <ey...@gmail.com> #13 Restricted
ri...@google.com <ri...@google.com> #14
Branch: 4.0
commit b367460c6cab514f9c8c974f2a48e7ed862610de
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Wed Mar 22 16:30:37 2023
[ApiModel] Insert CheckCast for return values causing verification error
Bug:
Change-Id: I2479d669217d90f057fa248fcea0f0f27faf91a6
M src/main/java/com/android/tools/r8/androidapi/ComputedApiLevel.java
M src/main/java/com/android/tools/r8/ir/code/Return.java
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
M src/main/java/com/android/tools/r8/ir/desugar/apimodel/ApiInvokeOutlinerDesugaring.java
A src/main/java/com/android/tools/r8/ir/optimize/RemoveVerificationErrorForUnknownReturnedValues.java
M src/main/java/com/android/tools/r8/utils/AndroidApiLevelUtils.java
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
M src/test/java/com/android/tools/r8/apimodel/ApiModelManualOutlineWithUnknownReturnTypeTest.java
M src/test/java/com/android/tools/r8/apimodel/ApiModelOutlineWithUnknownReturnTypeTest.java
ap...@google.com <ap...@google.com> #15
I've backported the fix to version 4.0.58. Could you take that version for a spin to see if that solves the issues?
ap...@google.com <ap...@google.com> #16
I verified the fix works. Thanks!
ap...@google.com <ap...@google.com> #17
Thanks for reporting back and your help with this issue.
ap...@google.com <ap...@google.com> #18
ap...@google.com <ap...@google.com> #19
ชà¸à¸š
ap...@google.com <ap...@google.com> #20
ชà¸à¸šà¹€à¸£à¸µà¸¢à¸™à¸£à¸¹à¹‰
ap...@google.com <ap...@google.com> #21
Branch: 8.0
commit aa653f09ec2c293dfb1441c41ee3b23c14edbc14
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:27:02 2023
Ensure redundant array get elimination leads to narrowing
Bug:
Change-Id: I5f4fd4f491ddac40d4e720862ab711220c0be145
M src/main/java/com/android/tools/r8/ir/optimize/RedundantFieldLoadAndStoreElimination.java
M src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ap...@google.com <ap...@google.com> #22
Branch: 8.0
commit 3c78b472e17ff4df1a4cbe7f779963f4551ceac7
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:26:09 2023
Reproduce VerifyError after redundant array get elimination
Bug:
Change-Id: Ia2c62ad8f7a4c5f2d9333a6514a71f7d8db8720c
A src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ap...@google.com <ap...@google.com> #23
Branch: 4.0
commit 6847d39873c892ae31dd0a0051ede9c029a73e53
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:29:51 2023
Version 4.0.60
Bug:
Change-Id: I5c3e809529a800a2bd0cf393f12fafb86b9d27c1
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #24
Branch: 4.0
commit 44f109564ca44b7457b0426ace67db36a5fbea3a
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:26:59 2023
Ensure redundant array get elimination leads to narrowing
Bug:
Change-Id: I5f4fd4f491ddac40d4e720862ab711220c0be145
M src/main/java/com/android/tools/r8/ir/optimize/RedundantFieldLoadAndStoreElimination.java
M src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ap...@google.com <ap...@google.com> #25
Branch: 4.0
commit 5b029e66087245d269c4c484e553142b9d7dbb22
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:26:11 2023
Reproduce VerifyError after redundant array get elimination
Bug:
Change-Id: Ia2c62ad8f7a4c5f2d9333a6514a71f7d8db8720c
A src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ap...@google.com <ap...@google.com> #26
Branch: 8.0
commit aa653f09ec2c293dfb1441c41ee3b23c14edbc14
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:27:02 2023
Ensure redundant array get elimination leads to narrowing
Bug:
Change-Id: I5f4fd4f491ddac40d4e720862ab711220c0be145
M src/main/java/com/android/tools/r8/ir/optimize/RedundantFieldLoadAndStoreElimination.java
M src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ap...@google.com <ap...@google.com> #27
Branch: 8.0
commit 3c78b472e17ff4df1a4cbe7f779963f4551ceac7
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:26:09 2023
Reproduce VerifyError after redundant array get elimination
Bug:
Change-Id: Ia2c62ad8f7a4c5f2d9333a6514a71f7d8db8720c
A src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ch...@google.com <ch...@google.com> #28
This should be fixed in R8 4.0, 8.0, 8.1, and 8.2 now. It would be great if you could confirm if 8.1.39 works for you. Thanks.
ey...@gmail.com <ey...@gmail.com> #29
I tested with 8.1.39 and it looks like it is fixed, thank you!
Any idea of what version of AGP this will ship with?
ch...@google.com <ch...@google.com> #30
Good to hear! This should land in AGP 8.1 beta 2.
Description
After updating Kotlin to 1.8.20 my app crashes in release mode with R8 enabled:
From the mapping, it appears that
rm3
isandroidx.profileinstaller.ProfileInstallerInitializer$Choreographer16Impl
We're using AGP 8.1.0-alpha11