Status Update
Comments
sg...@google.com <sg...@google.com> #2
i donnot understand why is the data the same?
dm...@gmail.com <dm...@gmail.com> #3
sg...@google.com <sg...@google.com> #4
What steps are needed to reproduce this issue? Frequency of occurrence?
Which Android build are you using? (e.g. AP4A.241205.013.A1)
Which device did you use to reproduce this issue?
Can you confirm if this issue is reproducible on a Pixel/Nexus device?
Please provide a sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Note: Please upload the bug report and screenshot to google drive and share the folder to android-bugreport@google.com, then share the link here.
dm...@gmail.com <dm...@gmail.com> #5
Please provide the requested information to proceed further. Unfortunately the issue will be closed within 7 days if there is no further update.
sg...@google.com <sg...@google.com> #6
for example,we hava 100 users.
20 users returned the same location information, longitude is 121.474000 and latitude is 31.230001。
30 users returned the same location information, longitude is 122.474000 and latitude is 32.230001。
15 users returned the same location information, longitude is 120.474000 and latitude is 30.230001。
as for Android build,all versions have it.
I dont reprodouce this issue.
what may be the cause of this issue?please
sg...@google.com <sg...@google.com> #7
We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
sg...@google.com <sg...@google.com>
ap...@google.com <ap...@google.com> #8
Thanks for reporting this issue.
COARSE_LOCATION typically takes location information from the nearby cell tower. If many users are near the same cell tower, each of those users will be given the same position. Using a FINE position will give much more detailed information.
Also, in certain areas, for privacy reasons, a less-exact location will be given, and that less-exact location might be identical for many users. Again, a fine-location configuration will return more precise location data.
ap...@google.com <ap...@google.com> #9
We believe with reference to the above comment, your query has been answered, hence closing the bug. Please feel free to re-open the issue in the future if desired.
ap...@google.com <ap...@google.com> #10
ap...@google.com <ap...@google.com> #11
Branch: 8.2
commit 84e04300f9f777f052a0d705660f623512d0abca
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Aug 22 11:53:27 2023
Handle assume instructions in bridge hoisting
Bug:
Change-Id: I17f6760d041e95618a0d048572a306c64a042457
M src/main/java/com/android/tools/r8/ir/optimize/info/bridge/BridgeAnalyzer.java
M src/test/java/com/android/tools/r8/bridgeremoval/hoisting/BridgeAfterAssumeNoSideEffectsTest.java
ap...@google.com <ap...@google.com> #12
Branch: 8.2
commit 0a41d9044ecadbdfaa13203628b19d23a5e9a2e2
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Aug 22 11:53:13 2023
Reproduce invalid code produced from bridge hoisting
Bug:
Change-Id: I3b1a7932dcdc7222f0ee9e3143ea3f855e2b936f
A src/test/java/com/android/tools/r8/bridgeremoval/hoisting/BridgeAfterAssumeNoSideEffectsTest.java
ap...@google.com <ap...@google.com> #13
Branch: 8.1
commit 27225cb3591e706ed9755f9228279b91efeddf65
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Aug 22 15:38:14 2023
Version 8.1.67
Bug:
Change-Id: I0a90e53df159ca2a81ec29ed58a88c3928d51423
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #14
Branch: 8.1
commit 2c6a9d70c479f5508bcdf7192f713f787cb64bbb
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Aug 22 15:35:27 2023
Reproduce invalid code produced from bridge hoisting
Bug:
Change-Id: I3b1a7932dcdc7222f0ee9e3143ea3f855e2b936f
A src/test/java/com/android/tools/r8/bridgeremoval/hoisting/BridgeAfterAssumeNoSideEffectsTest.java
ap...@google.com <ap...@google.com> #15
Branch: 8.1
commit c702a784e14306728755030f96e64d7808676484
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Aug 22 15:38:00 2023
Handle assume instructions in bridge hoisting
Bug:
Change-Id: I17f6760d041e95618a0d048572a306c64a042457
M src/main/java/com/android/tools/r8/ir/optimize/info/bridge/BridgeAnalyzer.java
M src/test/java/com/android/tools/r8/bridgeremoval/hoisting/BridgeAfterAssumeNoSideEffectsTest.java
ap...@google.com <ap...@google.com> #16
Branch: 8.0
commit 64b314fb5389edd02d5c588ab6ce8d8168eab00b
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Aug 22 16:07:28 2023
Reproduce invalid code produced from bridge hoisting
Bug:
Change-Id: I3b1a7932dcdc7222f0ee9e3143ea3f855e2b936f
A src/test/java/com/android/tools/r8/bridgeremoval/hoisting/BridgeAfterAssumeNoSideEffectsTest.java
ap...@google.com <ap...@google.com> #17
Branch: 8.0
commit e43d0dd4d1f1ee92efc96869621ba31d124fe503
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Aug 22 16:08:59 2023
Version 8.0.64
Bug:
Change-Id: I02c22c219030f39db053adc109367e24b8f1e6a9
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #18
Branch: 8.0
commit c507b4132c0d989286e2fce27e6118bef2a5cb86
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Aug 22 16:08:30 2023
Handle assume instructions in bridge hoisting
Bug:
Change-Id: I17f6760d041e95618a0d048572a306c64a042457
M src/main/java/com/android/tools/r8/ir/optimize/info/bridge/BridgeAnalyzer.java
M src/test/java/com/android/tools/r8/bridgeremoval/hoisting/BridgeAfterAssumeNoSideEffectsTest.java
sg...@google.com <sg...@google.com> #19
This is now fixed, and you can use R8 8.1.67 with AGP 8.1.1 (or 8.1.0). The fix did not make it into AGP 8.1.1, which shipped with
For AGP 8.0.x use 8.0.64. For AGP 8.2.x use 8.2.26 which will go into Android Studio Hedgehog / AGP 8.2 Beta 2.
To use a specific R8 version (e.g. 8.1.67) merge the following into settings.gradle
or settings.gradle.kts
:
pluginManagement {
buildscript {
repositories {
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw")
}
}
dependencies {
classpath("com.android.tools:r8:8.1.67")
}
}
}
to...@gmail.com <to...@gmail.com> #20
Thank you for the report. Using -assumenosideeffects can have undesired effects at runtime
Sorry to jump on this issue, but since this is something that came up a few times but never ended in an official statement about it maybe now is the time to ask again.
I'm also using:
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
public static void checkNotNull(...);
public static void checkExpressionValueIsNotNull(...);
public static void checkNotNullExpressionValue(...);
public static void checkParameterIsNotNull(...);
public static void checkNotNullParameter(...);
public static void checkReturnedValueIsNotNull(...);
public static void checkFieldIsNotNull(...);
public static void throwUninitializedPropertyAccessException(...);
public static void throwNpe(...);
public static void throwJavaNpe(...);
public static void throwAssert(...);
public static void throwIllegalArgument(...);
public static void throwIllegalState(...);
}
As even with R8 full mode it reduce the dex file by aprox 100 Kb.
What is the official R8 team position about those rules, there's often remarks they probably should not be used, but no definitive answer about yes or no.
Is there any possible side effect about those specific ones, that could overcome the dex size gain?
sg...@google.com <sg...@google.com> #21
In general using -assumenosideeffects
can be dangerous as it can unconditionally remove code.
In the case of the check*
methods the null
checks will be removed. In most cases that will just postpone the NPE until later when the null value is accessed. However, that might be way later in the program execution (e.g. the value is used to set a field which is then accessed in a completely different code path). So the code will have different behavior. In the case of a pure Kotlin project this should (almost) be safe, as nullability is checked at compile time.
It is also possible to have the Kotlin compiler not emitting null checks using something like this:
android {
kotlinOptions {
freeCompilerArgs = listOf(
"-Xno-param-assertions",
"-Xno-call-assertions",
"-Xno-receiver-assertions"
)
}
}
However, that only works for the code which is compiled from source and not binary dependencies.
For the throw*
I don't know when they are actually generated by the Kotlin compiler, so how removing these affects the application soundness I cannot say.
ap...@google.com <ap...@google.com> #22
Branch: 4.0
commit 5b3819134a7d7bb3fc3ca4a9b79dc25a065a39f4
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Aug 22 16:21:18 2023
Handle assume instructions in bridge hoisting
Bug:
Change-Id: I17f6760d041e95618a0d048572a306c64a042457
M src/main/java/com/android/tools/r8/ir/optimize/info/bridge/BridgeAnalyzer.java
M src/test/java/com/android/tools/r8/bridgeremoval/hoisting/BridgeAfterAssumeNoSideEffectsTest.java
ap...@google.com <ap...@google.com> #23
Branch: 4.0
commit ec460f9dde31a99170d126d6e20f6f8794f9a559
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Aug 22 16:17:19 2023
Reproduce invalid code produced from bridge hoisting
Bug:
Change-Id: I3b1a7932dcdc7222f0ee9e3143ea3f855e2b936f
A src/test/java/com/android/tools/r8/bridgeremoval/hoisting/BridgeAfterAssumeNoSideEffectsTest.java
ap...@google.com <ap...@google.com> #24
Branch: 4.0
commit f91d04a07894ffa0d9bb58e6d45bdf87547dd4b5
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Aug 22 16:21:35 2023
Version 4.0.69
Bug:
Change-Id: I761b1fa3b18d28e3a26c1056482d8eb5657c0712
M src/main/java/com/android/tools/r8/Version.java
an...@google.com <an...@google.com> #25
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 3
- Android Gradle Plugin 8.2.0-beta03
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> #26
The fixes for this issue are now also available in:
- Android Studio Giraffe | 2022.3.1 Patch 2
- Android Gradle Plugin 8.1.2
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Description
After updating Kotlin from 1.8.21 to 1.9.0 and R8 from 4.0.48 to 8.1.56 I started receiving this fatal exception:
A quick look in a JaDX decompiler has shown that ox6 is some kind of autogenerated lambda state machine, probably a work of Kotlin compiler or R8?
Also, probably, this might be an issue of the following Proguard rules regarding stripping out Kotlin nullchecks in production, because removing them makes the application launch:
(these rules worked in R8 4.x, however)
R8: 8.1.56 (build 892155436bed60c4f2f7672d4993950e7b342bd9 from go/r8bot (luci-r8-custom-ci-focal-2-5rpr))
AGP: 8.1.0
Kotlin: 1.9.0 (K2 is disabled, KSP + KAPT applied)
JVM Target: 11