Status Update
Comments
di...@target.com <di...@target.com> #2
Which version of R8 are you using?
ra...@google.com <ra...@google.com>
ma...@google.com <ma...@google.com> #3
di...@gmail.com <di...@gmail.com> #4
di...@target.com <di...@target.com> #5
Hi! I have also encountered a problem with r8 in --classfile mode incorrectly removing a null check, and curiously enough it also happened in and around ViewEventSinkImpl. I tried with the R8 version in Chromium and also with latest main branch local build from the repo which was be29229a110ce06989f6f3a63b0a83015ed3fefe.
The issue I'm seeing is from code which effectively does
public final class ViewEventSinkImpl ... {
private @Nullable Boolean mHasViewFocus; // not written to anywhere else
public void onViewFocusChanged(boolean gainFocus) {
if (mHasViewFocus != null && mHasViewFocus == gainFocus) return;
mHasViewFocus = gainFocus;
....
}
}
and after r8 with --classfile, the null check gets removed and the code is guaranteed to crash. Without --classfile, the null check remains in the dex. Note: for me, the code (with or without the check) was inlined at the only callsite to onViewFocusChanged.
Adding
-keep,allowobfuscation,allowshrinking class org.chromium.content.browser.ViewEventSinkImpl
works around the issue for me. I believe there is some reflection going on as one part of the code that affects that bug is the presence of
public static ViewEventSinkImpl from(WebContents webContents) {
ViewEventSinkImpl ret =
((WebContentsImpl) webContents)
.getOrSetUserData(
ViewEventSinkImpl.class, UserDataFactoryLazyHolder.INSTANCE);
return ret;
}
I hope the advice to send the repro case directly is still valid, I should have it down to a manageable size soon.
ma...@google.com <ma...@google.com> #6
Thanks, it would be great if you would be able to share a reproduction for this.
ma...@google.com <ma...@google.com> #7
I have sent the repro over by email. Can you confirm if the mail has gotten thru spam filters, etc.?
di...@target.com <di...@target.com> #8
Project: r8
Branch: main
Author: Christoffer Adamsen <
Link:
Reproduce inadequate value propagation in presence of T::new expressions
Expand for full commit details
Reproduce inadequate value propagation in presence of T::new expressions
Bug: b/397737234
Change-Id: Ia6cbb0ef3366125420afbdfcf3a8f0d228cc2004
Files:
- A
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: 0e40b2543f171f14c4727e9673cfbe1581bfb804
Date: Thu Mar 06 08:47:46 2025
di...@target.com <di...@target.com> #9
Project: r8
Branch: main
Author: Christoffer Adamsen <
Link:
Account for T::new expressions in default field value joiner
Expand for full commit details
Account for T::new expressions in default field value joiner
Bug: b/397737234
Change-Id: Iea344f54fa5a8ac40739a51da5d7e6679d5964b8
Files:
- M
src/main/java/com/android/tools/r8/optimize/argumentpropagation/propagation/DefaultFieldValueJoiner.java
- M
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: faeee0fe013067ef2c1b015822a00ebd999c19c9
Date: Thu Mar 06 09:51:41 2025
ma...@google.com <ma...@google.com> #10
Project: r8
Branch: main
Author: Christoffer Adamsen <
Link:
Fix BootstrapMethodError from invalid class merging
Expand for full commit details
Fix BootstrapMethodError from invalid class merging
Bug: b/397737234
Change-Id: Icacf51f06017c50b3448610e8493a225c225c40d
Files:
- M
src/main/java/com/android/tools/r8/horizontalclassmerging/PolicyScheduler.java
- A
src/main/java/com/android/tools/r8/horizontalclassmerging/policies/NoMethodHandleFromLambda.java
- M
src/main/java/com/android/tools/r8/shaking/Enqueuer.java
- M
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: 2d3816adfcece78053fbab0a70196dcb9c0b94dc
Date: Thu Mar 06 09:33:32 2025
di...@target.com <di...@target.com> #11
I checked faeee0fe013067ef2c1b015822a00ebd999c19c9 from r8's main (containing all the fixes above) and it also fixes my original issue on the real code I had. The null check is no longer removed and I go the code to start up correctly.
Thanks a lot!
di...@target.com <di...@target.com> #12
Project: r8
Branch: 8.9
Author: Christoffer Adamsen <
Link:
Fix BootstrapMethodError from invalid class merging
Expand for full commit details
Fix BootstrapMethodError from invalid class merging
Bug: b/397737234
Change-Id: Icacf51f06017c50b3448610e8493a225c225c40d
Files:
- M
src/main/java/com/android/tools/r8/horizontalclassmerging/PolicyScheduler.java
- A
src/main/java/com/android/tools/r8/horizontalclassmerging/policies/NoMethodHandleFromLambda.java
- M
src/main/java/com/android/tools/r8/shaking/Enqueuer.java
- M
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: 5cc2d659e1fd08cecbc8f7cfcbfc404d0bc95fa6
Date: Thu Mar 06 12:12:03 2025
ma...@google.com <ma...@google.com> #13
Project: r8
Branch: 8.9
Author: Christoffer Adamsen <
Link:
Version 8.9.29
Expand for full commit details
Version 8.9.29
Bug: b/397737234
Change-Id: I23a0b0f52df1ab2db0b175055ebd78115d407dbc
Files:
- M
src/main/java/com/android/tools/r8/Version.java
Hash: 3d1fcaa2ff1c9b42f0079ae236c48bff520d64c6
Date: Thu Mar 06 12:12:19 2025
di...@target.com <di...@target.com> #14
Project: r8
Branch: 8.9
Author: Christoffer Adamsen <
Link:
Reproduce inadequate value propagation in presence of T::new expressions
Expand for full commit details
Reproduce inadequate value propagation in presence of T::new expressions
Bug: b/397737234
Change-Id: Ia6cbb0ef3366125420afbdfcf3a8f0d228cc2004
Files:
- A
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: 7e08f18c401f4d2503ab37f8dbe59f6714ffa7a2
Date: Thu Mar 06 12:11:55 2025
ma...@google.com <ma...@google.com> #15
Project: r8
Branch: 8.9
Author: Christoffer Adamsen <
Link:
Account for T::new expressions in default field value joiner
Expand for full commit details
Account for T::new expressions in default field value joiner
Bug: b/397737234
Change-Id: Iea344f54fa5a8ac40739a51da5d7e6679d5964b8
Files:
- M
src/main/java/com/android/tools/r8/optimize/argumentpropagation/propagation/DefaultFieldValueJoiner.java
- M
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: db5ecfb23c380c97fdf9e8562ec7541a9c94ddc7
Date: Thu Mar 06 12:12:10 2025
ed...@gmail.com <ed...@gmail.com> #16
Project: r8
Branch: 8.8
Author: Christoffer Adamsen <
Link:
Reproduce inadequate value propagation in presence of T::new expressions
Expand for full commit details
Reproduce inadequate value propagation in presence of T::new expressions
Bug: b/397737234
Change-Id: Ia6cbb0ef3366125420afbdfcf3a8f0d228cc2004
Files:
- A
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: 674a5456a7f32132fb20c00e543e5a82456a08f3
Date: Thu Mar 06 12:12:45 2025
ma...@google.com <ma...@google.com> #17
Project: r8
Branch: 8.8
Author: Christoffer Adamsen <
Link:
Account for T::new expressions in default field value joiner
Expand for full commit details
Account for T::new expressions in default field value joiner
Bug: b/397737234
Change-Id: Iea344f54fa5a8ac40739a51da5d7e6679d5964b8
Files:
- M
src/main/java/com/android/tools/r8/optimize/argumentpropagation/propagation/DefaultFieldValueJoiner.java
- M
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: dff84c28b3884cecf7d816ccb7b7afe862c0f78f
Date: Thu Mar 06 12:37:41 2025
bu...@google.com <bu...@google.com> #18
Project: r8
Branch: 8.8
Author: Christoffer Adamsen <
Link:
Fix BootstrapMethodError from invalid class merging
Expand for full commit details
Fix BootstrapMethodError from invalid class merging
Bug: b/397737234
Change-Id: Icacf51f06017c50b3448610e8493a225c225c40d
Files:
- M
src/main/java/com/android/tools/r8/horizontalclassmerging/PolicyScheduler.java
- A
src/main/java/com/android/tools/r8/horizontalclassmerging/policies/NoMethodHandleFromLambda.java
- M
src/main/java/com/android/tools/r8/shaking/Enqueuer.java
- M
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: 54f1b29c6d4be82cfb1cf2cbd0483093fc583114
Date: Thu Mar 06 12:12:53 2025
di...@target.com <di...@target.com> #19
Project: r8
Branch: 8.8
Author: Christoffer Adamsen <
Link:
Version 8.8.37
Expand for full commit details
Version 8.8.37
Bug: b/397737234
Change-Id: Ibc71b252bb1283074ba65ce92bac26cb0396558c
Files:
- M
src/main/java/com/android/tools/r8/Version.java
Hash: bc26ca739f0297c4c132feb78d8090b44b6a8b5e
Date: Thu Mar 06 12:38:38 2025
ma...@google.com <ma...@google.com> #20
Project: r8
Branch: 8.9
Author: Christoffer Adamsen <
Link:
Fix BootstrapMethodError from invalid class merging
Expand for full commit details
Fix BootstrapMethodError from invalid class merging
Bug: b/397737234
Change-Id: Icacf51f06017c50b3448610e8493a225c225c40d
Files:
- M
src/main/java/com/android/tools/r8/horizontalclassmerging/PolicyScheduler.java
- A
src/main/java/com/android/tools/r8/horizontalclassmerging/policies/NoMethodHandleFromLambda.java
- M
src/main/java/com/android/tools/r8/shaking/Enqueuer.java
- M
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: 5cc2d659e1fd08cecbc8f7cfcbfc404d0bc95fa6
Date: Thu Mar 06 12:12:03 2025
za...@gmail.com <za...@gmail.com> #21
Project: r8
Branch: 8.9
Author: Christoffer Adamsen <
Link:
Reproduce inadequate value propagation in presence of T::new expressions
Expand for full commit details
Reproduce inadequate value propagation in presence of T::new expressions
Bug: b/397737234
Change-Id: Ia6cbb0ef3366125420afbdfcf3a8f0d228cc2004
Files:
- A
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: 7e08f18c401f4d2503ab37f8dbe59f6714ffa7a2
Date: Thu Mar 06 12:11:55 2025
be...@google.com <be...@google.com> #22
Project: r8
Branch: 8.9
Author: Christoffer Adamsen <
Link:
Account for T::new expressions in default field value joiner
Expand for full commit details
Account for T::new expressions in default field value joiner
Bug: b/397737234
Change-Id: Iea344f54fa5a8ac40739a51da5d7e6679d5964b8
Files:
- M
src/main/java/com/android/tools/r8/optimize/argumentpropagation/propagation/DefaultFieldValueJoiner.java
- M
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: db5ecfb23c380c97fdf9e8562ec7541a9c94ddc7
Date: Thu Mar 06 12:12:10 2025
li...@gmail.com <li...@gmail.com> #23
Thanks for the confirmation and for taking the time to create a reproduction. This should be fixed in R8 versions 8.7.37, 8.8.37, 8.9.29 and 8.10.
se...@team.bumble.com <se...@team.bumble.com> #24
Project: r8
Branch: 8.7
Author: Christoffer Adamsen <
Link:
Account for T::new expressions in default field value joiner
Expand for full commit details
Account for T::new expressions in default field value joiner
Bug: b/397737234
Change-Id: Iea344f54fa5a8ac40739a51da5d7e6679d5964b8
Files:
- M
src/main/java/com/android/tools/r8/optimize/argumentpropagation/propagation/DefaultFieldValueJoiner.java
- M
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: facb83cda9b23e96d13acfb6e61edfe77b754c56
Date: Thu Mar 06 12:47:29 2025
li...@gmail.com <li...@gmail.com> #25
Project: r8
Branch: 8.7
Author: Christoffer Adamsen <
Link:
Fix BootstrapMethodError from invalid class merging
Expand for full commit details
Fix BootstrapMethodError from invalid class merging
Bug: b/397737234
Change-Id: Icacf51f06017c50b3448610e8493a225c225c40d
Files:
- M
src/main/java/com/android/tools/r8/horizontalclassmerging/PolicyScheduler.java
- A
src/main/java/com/android/tools/r8/horizontalclassmerging/policies/NoMethodHandleFromLambda.java
- M
src/main/java/com/android/tools/r8/shaking/Enqueuer.java
- M
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: f84fe96b65408bc0b38dbed81b95ef3cc8f998af
Date: Thu Mar 06 12:45:35 2025
bu...@google.com <bu...@google.com>
se...@team.bumble.com <se...@team.bumble.com> #26
Project: r8
Branch: 8.7
Author: Christoffer Adamsen <
Link:
Reproduce inadequate value propagation in presence of T::new expressions
Expand for full commit details
Reproduce inadequate value propagation in presence of T::new expressions
Bug: b/397737234
Change-Id: Ia6cbb0ef3366125420afbdfcf3a8f0d228cc2004
Files:
- A
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: 2c63d92a87eafc74b45cba8a5a8f3a013130c653
Date: Thu Mar 06 12:45:27 2025
li...@gmail.com <li...@gmail.com> #27
Project: r8
Branch: 8.7
Author: Christoffer Adamsen <
Link:
Version 8.7.37
Expand for full commit details
Version 8.7.37
Bug: b/397737234
Change-Id: If19c362aff21345ea0eba68ee01174265aefae4e
Files:
- M
src/main/java/com/android/tools/r8/Version.java
Hash: 9dd430e92787edf015ce4dbfe5ddb309999758f5
Date: Thu Mar 06 12:47:39 2025
ma...@google.com <ma...@google.com> #28
Project: r8
Branch: 8.10
Author: Rico Wind <
Link:
Fix BootstrapMethodError from invalid class merging
Expand for full commit details
Fix BootstrapMethodError from invalid class merging
Bug: b/397737234
Change-Id: Icacf51f06017c50b3448610e8493a225c225c40d
Files:
- M
src/main/java/com/android/tools/r8/horizontalclassmerging/PolicyScheduler.java
- A
src/main/java/com/android/tools/r8/horizontalclassmerging/policies/NoMethodHandleFromLambda.java
- M
src/main/java/com/android/tools/r8/shaking/Enqueuer.java
- M
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: ad501b1308e3c0d0206bea8111a799f459492135
Date: Mon Mar 10 11:24:46 2025
ap...@google.com <ap...@google.com> #29
Project: r8
Branch: 8.10
Author: Rico Wind <
Link:
Reproduce inadequate value propagation in presence of T::new expressions
Expand for full commit details
Reproduce inadequate value propagation in presence of T::new expressions
Bug: b/397737234
Change-Id: Ia6cbb0ef3366125420afbdfcf3a8f0d228cc2004
Files:
- A
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: b62d995efb1143edee9b2589f3a22f27f1bdd10f
Date: Mon Mar 10 11:24:41 2025
li...@gmail.com <li...@gmail.com> #30
Project: r8
Branch: 8.10
Author: Rico Wind <
Link:
Account for T::new expressions in default field value joiner
Expand for full commit details
Account for T::new expressions in default field value joiner
Bug: b/397737234
Change-Id: Iea344f54fa5a8ac40739a51da5d7e6679d5964b8
Files:
- M
src/main/java/com/android/tools/r8/optimize/argumentpropagation/propagation/DefaultFieldValueJoiner.java
- M
src/test/java/com/android/tools/r8/ir/optimize/membervaluepropagation/DefaultFieldValueJoinerWithLambdaAllocationTest.java
Hash: 56515ee2eca6931b432a0bf373e6d90a486670e3
Date: Mon Mar 10 11:24:54 2025
ma...@google.com <ma...@google.com> #31
Project: r8
Branch: 8.10
Author: Rico Wind <
Link:
Version 8.10.16
Expand for full commit details
Version 8.10.16
Bug: b/397737234
Change-Id: I8aa6795562027e7b1ecf22d684385b872cd92f86
Files:
- M
src/main/java/com/android/tools/r8/Version.java
Hash: 77b6af4095578d5ccc62cb8730ba1b9555f059b7
Date: Mon Mar 10 11:25:00 2025
li...@gmail.com <li...@gmail.com> #32
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 Meerkat Feature Drop | 2024.3.2 Beta 1
- Android Gradle Plugin 8.10.0-beta01
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!
pr...@google.com <pr...@google.com> #33
The fixes for this issue are now also available in:
- Android Studio Meerkat | 2024.3.1 Patch 1
- Android Gradle Plugin 8.9.1
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
mo...@hungerstation.com <mo...@hungerstation.com> #34
Hello googlers,
I did as this
Our CI stack is Bitrise + Fastlane, I'm getting this error even when i run this sh "gcloud auth activate-service-account --key-file=#{decoded_service_account}"
Execution failed for task ':macrobenchmark:ftlDeviceShiba34Setup'.
A failure occurred while executing com.android.build.gradle.internal.tasks.ManagedDeviceSetupTask$SetupTaskWorkAction Unable to find the application-default credentials to send a request to Firebase TestLab. Please initialize your credentials using gcloud CLI. Examples: gcloud config set project $YOUR_PROJECT_ID gcloud auth application-default login gcloud auth application-default set-quota-project $YOUR_PROJECT_ID Please read
https://cloud.google.com/sdk/gcloud for details.
Description
We are trying to generate Baseline Profiles for our application using the BaselineProfiles plugin and since we want to generate it on our CI/CD pipelines we are exploring Gradle Managed devices.
As there is an already existing issue where Gradle Managed devices fail to setup on Linux machines, we are exploring the new feature of using Firebase Test Lab devices as Gradle Managed devices .
I am following the performance sample app and included the changes mentioned for running tests on Firebase Test Lab devices as Gradle Managed device. When the task
generateBaselineProfile
runs locally, Baseline Profiles are generated correctly. However, when run on the FTL configured device, tests are running successfully, but the profiles are not generated and I see this message in the output:Comparing the logs from local and FTL, I could see that the profiles are generated in a directory different than the task tries to extract from:
When run locally, I can see that it is using the same location from which it is later extracted:
Setup:
Android Studio Hedgehog | 2023.1.1 Canary 5
Build #AI-231.7864.76.2311.10195651, built on May 25, 2023
Runtime version: 17.0.6+0-17.0.6b829.9-10027231 aarch64
AGP 8.2.0-alpha05
Benchmark 1.2.0-alpha13
Could the copying be an issue?
I have attached the performance sample app code with the changes. Run it in the above configuration with FTL setup and should see a similar output.