Verified
Status Update
Comments
op...@gmail.com <op...@gmail.com> #2
P.S. I managed to get a "Google Pixel 3 XL" running on Android 10, and I found the same issue. I am using Android Studio 4.0.1. If you want, I would be happy to email you my Android bundle. Thank you indeed for your time.
ze...@google.com <ze...@google.com> #3
Thanks for the report. This sounds a bit like a device specific issue, tentatively marking it as such.
It would be great if you could share both the APK that witnesses the failure as well as the APK that does not (with the 2* + workaround).
You can share them privately by sending them (or a link to a file-sharing location) to zerny@google.com
It would be great if you could share both the APK that witnesses the failure as well as the APK that does not (with the 2* + workaround).
You can share them privately by sending them (or a link to a file-sharing location) to zerny@google.com
op...@gmail.com <op...@gmail.com> #4
Thank you so much for your time. I attach the 2 bundles (1_0 produces the
crash, 1_1 does not). I replicated the same issue in 2 different devices
(LG Stylo 4 running Android 8.1.0, and "Google Pixel 3 XL" running on
Android 10).
On Sun, Sep 6, 2020 at 11:11 PM <buganizer-system@google.com> wrote:
crash, 1_1 does not). I replicated the same issue in 2 different devices
(LG Stylo 4 running Android 8.1.0, and "Google Pixel 3 XL" running on
Android 10).
On Sun, Sep 6, 2020 at 11:11 PM <buganizer-system@google.com> wrote:
ze...@google.com <ze...@google.com> #5
Thanks for the bundles. I can confirm that the issue reproduces locally using bundletool to do a local install on Pixel 3 running Android 10.
The code in both the bundle and in the standalone apks is indeed incorrect. The verifier rightfully rejects the instruction:
0x71: InvokeStatic { v13 v14 v15 v0 } Lcom/device_context/stepsmagic_free/mMFile;->m530(DD)D
which is being called with an invalid register pair {v15,v0} as the second double argument.
I'm surprised if this issue is only hit by some runtimes as the DEX code is clearly wrong.
Would it be possible to share the class file inputs that are used for the R8 compilation that goes wrong?
If so you can obtain them by running:
./gradlew :app:assembleRelease -Dcom.android.tools.r8.dumpinputtofile=/path/to/dump.zip
that will dump the inputs to dump.zip and abort compilation (so compilation should fail with an error saying the inputs are dumped). You can attach the dump here in public or share it (or a link to it) privately with zerny@google.com.
The code in both the bundle and in the standalone apks is indeed incorrect. The verifier rightfully rejects the instruction:
0x71: InvokeStatic { v13 v14 v15 v0 } Lcom/device_context/stepsmagic_free/mMFile;->m530(DD)D
which is being called with an invalid register pair {v15,v0} as the second double argument.
I'm surprised if this issue is only hit by some runtimes as the DEX code is clearly wrong.
Would it be possible to share the class file inputs that are used for the R8 compilation that goes wrong?
If so you can obtain them by running:
./gradlew :app:assembleRelease -Dcom.android.tools.r8.dumpinputtofile=/path/to/dump.zip
that will dump the inputs to dump.zip and abort compilation (so compilation should fail with an error saying the inputs are dumped). You can attach the dump here in public or share it (or a link to it) privately with zerny@google.com.
ap...@google.com <ap...@google.com> #6
Project: r8
Branch: master
commit 249c8717ce7b20e5b0428138fb6b1f23bf5d5185
Author: Ian Zerny <zerny@google.com>
Date: Thu Sep 10 20:52:00 2020
Check highest register for limit when splitting spilled intervals.
Bug: 167704467
Change-Id: I9f4122dfc6282037fe3c9790d65608874bd49dbc
M src/main/java/com/android/tools/r8/ir/regalloc/LinearScanRegisterAllocator.java
https://r8-review.googlesource.com/53720
Branch: master
commit 249c8717ce7b20e5b0428138fb6b1f23bf5d5185
Author: Ian Zerny <zerny@google.com>
Date: Thu Sep 10 20:52:00 2020
Check highest register for limit when splitting spilled intervals.
Bug: 167704467
Change-Id: I9f4122dfc6282037fe3c9790d65608874bd49dbc
M src/main/java/com/android/tools/r8/ir/regalloc/LinearScanRegisterAllocator.java
ap...@google.com <ap...@google.com> #7
Project: r8
Branch: 2.0
commit f2f85c02ac521f1cf60b24052b5b87115a3e41f0
Author: Ian Zerny <zerny@google.com>
Date: Fri Sep 11 09:46:43 2020
Version 2.0.100
Cherry-pick: Check highest register for limit when splitting spilled intervals.
CL:https://r8-review.googlesource.com/c/r8/+/53720
Bug: 167704467
Change-Id: I9f4122dfc6282037fe3c9790d65608874bd49dbc
M src/main/java/com/android/tools/r8/Version.java
M src/main/java/com/android/tools/r8/ir/regalloc/LinearScanRegisterAllocator.java
https://r8-review.googlesource.com/53742
Branch: 2.0
commit f2f85c02ac521f1cf60b24052b5b87115a3e41f0
Author: Ian Zerny <zerny@google.com>
Date: Fri Sep 11 09:46:43 2020
Version 2.0.100
Cherry-pick: Check highest register for limit when splitting spilled intervals.
CL:
Bug: 167704467
Change-Id: I9f4122dfc6282037fe3c9790d65608874bd49dbc
M src/main/java/com/android/tools/r8/Version.java
M src/main/java/com/android/tools/r8/ir/regalloc/LinearScanRegisterAllocator.java
ap...@google.com <ap...@google.com> #8
Project: r8
Branch: 2.1
commit cc1556056e7317b5b4350c6d92800895e9115550
Author: Ian Zerny <zerny@google.com>
Date: Fri Sep 11 09:48:45 2020
Version 2.1.67
Cherry-pick: Check highest register for limit when splitting spilled intervals.
CL:https://r8-review.googlesource.com/c/r8/+/53720
Bug: 167704467
Change-Id: I9f4122dfc6282037fe3c9790d65608874bd49dbc
M src/main/java/com/android/tools/r8/Version.java
M src/main/java/com/android/tools/r8/ir/regalloc/LinearScanRegisterAllocator.java
https://r8-review.googlesource.com/53743
Branch: 2.1
commit cc1556056e7317b5b4350c6d92800895e9115550
Author: Ian Zerny <zerny@google.com>
Date: Fri Sep 11 09:48:45 2020
Version 2.1.67
Cherry-pick: Check highest register for limit when splitting spilled intervals.
CL:
Bug: 167704467
Change-Id: I9f4122dfc6282037fe3c9790d65608874bd49dbc
M src/main/java/com/android/tools/r8/Version.java
M src/main/java/com/android/tools/r8/ir/regalloc/LinearScanRegisterAllocator.java
ze...@google.com <ze...@google.com> #9
The fix for this issue has landed on our release branches. You can update you local build to use the fixed version by amending you top-level build.gradle with:
buildscript {
repositories {
maven {
url 'https://storage.googleapis.com/r8-releases/raw '
}
}
dependencies {
classpath 'com.android.tools:r8:2.0.100' // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:X.Y.Z' // Your current AGP version.
}
}
Let us know if this resolves or fails to resolve your issue locally.
Thanks for the report and help reproducing it!
buildscript {
repositories {
maven {
url '
}
}
dependencies {
classpath 'com.android.tools:r8:2.0.100' // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:X.Y.Z' // Your current AGP version.
}
}
Let us know if this resolves or fails to resolve your issue locally.
Thanks for the report and help reproducing it!
op...@gmail.com <op...@gmail.com> #10
It WORKS! Thank you so much for your help!
Description
I have created an Android app, and tested it in several phones. When I create a signed apk for release (or a bundle uploaded to Google Play), the app crashes right after starting it, and I get a message like this (I replace package name by ***):
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.VerifyError: Verifier rejected class com.***.mMFile: boolean com.***.mMFile.m112() failed to verify: boolean com.***.mMFile.m112(): [0x71] Rejecting invocation, long or double parameter at index 2 is not a pair: 15 + 0. (declaration of 'com.***.mMFile' appears in /data/app/com.***-2YgS5zVH_pm9j79DtR4O4Q==/base.apk)
This error happens with one of my phones: LG Stylo4 (LG-Q710AL) running Android 8.1.0, in which the debuggable version works flawlessly. Other phones running Android 4 or 6 do not have this issue. I have not been able to test with Android 9 or 10.
My gradle.build file contains:
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
Trying and testing for a solution, I found that by replacing the following line in my m112() method:
else if ( m530(l02,3*l00)<0.125 || m530(l02,4*l00)<0.125 ) {
by:
else if ( m530(l02,3*l00)<0.125 || m530(l02, (2*l00 + (2*l00) ) )<0.125 ) {
the app does not crash. Looks like substituting 4 by 2+2 solves the issue, but it does not make sense. Moreover, I found some performance issues in said LG phone with this new version; those performance issues do not happen with the debuggable version, or with the release version in my other phones.
Any help would be very appreciated.