Fixed
Status Update
Comments
lb...@gmail.com <lb...@gmail.com> #2
Can you provide the below requested information to better understand the issue:
Can you please test with latest library and update result here.
https://developer.android.com/topic/libraries/support-library/revisions.html
If possible please provide a complete sample application.
Expected output
What do you expect to occur?
Current output
What do you see instead?
Can you please test with latest library and update result here.
If possible please provide a complete sample application.
Expected output
What do you expect to occur?
Current output
What do you see instead?
uc...@google.com <uc...@google.com> #3
This seems to be intended according to https://issuetracker.google.com/74278849 , the suggestion is to remove the extra logic to deliverResult() in onStartLoading().
lb...@gmail.com <lb...@gmail.com> #4
@gg..@google.com
Sample project is attached.
Steps to test:
1. Import, build and install apk
2. Notice "Number of 'onLoadFinished' calls: 1"
3. Click "Click me!" button to start Second Activity
4. Notice "Number of 'onLoadFinished' calls: 2"
EXPECTED: At stap 4 "Number of 'onLoadFinished' calls" should be 1.
ACTUAL: It's 2.
@ha...@gmail.com
That's not the solution because developers are not in control of all Loaders. For example CursorLoader from support libaray should be then fixed by google, not by developers.
And this is behavior change which is not documented, so suggestion on issuetracker is not good enough.
Sample project is attached.
Steps to test:
1. Import, build and install apk
2. Notice "Number of 'onLoadFinished' calls: 1"
3. Click "Click me!" button to start Second Activity
4. Notice "Number of 'onLoadFinished' calls: 2"
EXPECTED: At stap 4 "Number of 'onLoadFinished' calls" should be 1.
ACTUAL: It's 2.
@ha...@gmail.com
That's not the solution because developers are not in control of all Loaders. For example CursorLoader from support libaray should be then fixed by google, not by developers.
And this is behavior change which is not documented, so suggestion on issuetracker is not good enough.
lb...@gmail.com <lb...@gmail.com> #5
We have shared this with our engineering team and will update this issue with more information as it becomes available.
lb...@gmail.com <lb...@gmail.com> #7
@6 I think they changed the way it works, without much information about the change.
Try this solution I've written about (read the last part of the text too, as it talks about the changes) :
https://stackoverflow.com/a/22675607/878126
Try this solution I've written about (read the last part of the text too, as it talks about the changes) :
ag...@google.com <ag...@google.com> #8
@7 Thank you for your information. I still get the error when orientation change
lb...@gmail.com <lb...@gmail.com> #9
@8 I can't confirm. It works fine without any error .
Attached sample project, that "loads" content, and after 5 seconds returns a result, that will be returned on the current Activity.
Attached sample project, that "loads" content, and after 5 seconds returns a result, that will be returned on the current Activity.
lb...@gmail.com <lb...@gmail.com> #10
OK I'll check it again. Thx a lot!
lb...@gmail.com <lb...@gmail.com> #11
@9 Hello man, when orientation change the "onLoaderFinished" method, called again. Do you know how to stop calling this method?
lb...@gmail.com <lb...@gmail.com> #12
@11 It is called only once after onCreate is called, just as intended.
The reason is that after you load something, you wish to use it. After orientation change, all is destroyed, but the result is still available, so you can use it.
If you don't want to use the result, either ignore it, or check whether the loader (if existing) has a result or not.
But this loses the whole point of using a loader. By using a loader, you are supposed to use its result, even after an orientation change.
The reason is that after you load something, you wish to use it. After orientation change, all is destroyed, but the result is still available, so you can use it.
If you don't want to use the result, either ignore it, or check whether the loader (if existing) has a result or not.
But this loses the whole point of using a loader. By using a loader, you are supposed to use its result, even after an orientation change.
lb...@gmail.com <lb...@gmail.com> #13
@8 Seeing that one user has updated his review, saying that now it's possible to update, I think it's 100% because of this flag.
Attached image of it.
Attached image of it.
ag...@google.com <ag...@google.com> #14
Thanks for the updates Liran.
I'm sorry for the inconvenience this has caused you. We have attempted to reproduce update/install issues today. We have installed the old version and had playstore successfully install an update to the d8 enabled version on devices running android 5.0, 5.1, 5.1.1, 6.0.1.
In other words, we have not been able to reproduce the problem. We will keep trying and keep our eyes open for similar reports so we can get to the bottom of this.
I'm sorry for the inconvenience this has caused you. We have attempted to reproduce update/install issues today. We have installed the old version and had playstore successfully install an update to the d8 enabled version on devices running android 5.0, 5.1, 5.1.1, 6.0.1.
In other words, we have not been able to reproduce the problem. We will keep trying and keep our eyes open for similar reports so we can get to the bottom of this.
lb...@gmail.com <lb...@gmail.com> #15
@14 There is no chance it's from something else. The only difference on the new version is this flag being removed.
Since at least 3 users complained about this issue, I see no reason this could be from something else.
I don't know why this occur. As I wrote, I also failed to reproduce this issue, but I also don't have the same devices they use.
Have you tested it on the devices they have? Or only on Google devices?
I even had this issue on another app that I've put its APK with this flag turned on, on XDA forum, and got someone saying it failed to install:
https://forum.xda-developers.com/showpost.php?p=73479661&postcount=213
This person also say he has Android 5.1.1 . I don't think it's a coincidence .
I will soon create a new APK for him to try, with this flag turned off, and will see if it helps. I believe it will.
Since at least 3 users complained about this issue, I see no reason this could be from something else.
I don't know why this occur. As I wrote, I also failed to reproduce this issue, but I also don't have the same devices they use.
Have you tested it on the devices they have? Or only on Google devices?
I even had this issue on another app that I've put its APK with this flag turned on, on XDA forum, and got someone saying it failed to install:
This person also say he has Android 5.1.1 . I don't think it's a coincidence .
I will soon create a new APK for him to try, with this flag turned off, and will see if it helps. I believe it will.
ag...@google.com <ag...@google.com> #16
I definitely agree that there is some kind of issue here. We need to get more information to be able to get further. We don't have any of the devices that these users are using. I attempted to find a place where we could buy such a device yesterday but failed.
Liran, if you are in contact with any of the users it would be great if they could provide a crash report when the app fails to install. That should contain more information about the install failure.
Liran, if you are in contact with any of the users it would be great if they could provide a crash report when the app fails to install. That should contain more information about the install failure.
lb...@gmail.com <lb...@gmail.com> #17
@16 He said that the update failed even on the new APK with the flag being turned off:
https://forum.xda-developers.com/showpost.php?p=73485778&postcount=221
Now I have no idea what causes it. Could be the flag, could be something else...
I have contacted the person on XDA. If he agrees, I will publish his bug report. I suggest sending by email instead of here.
So far, these are the devices that apparently have this issue :
A1601
Redmi Pro 3 (Simone?!)
M5 Lite (GiONEE_BBL7332)
Seems all have Android 5.1.x , but other than that, I don't see further connection between them.
Now I have no idea what causes it. Could be the flag, could be something else...
I have contacted the person on XDA. If he agrees, I will publish his bug report. I suggest sending by email instead of here.
So far, these are the devices that apparently have this issue :
A1601
Redmi Pro 3 (Simone?!)
M5 Lite (GiONEE_BBL7332)
Seems all have Android 5.1.x , but other than that, I don't see further connection between them.
ag...@google.com <ag...@google.com> #18
Thanks Liran. Yes, those are the devices that I have attempted to get as well. The closest that we got was a Redmi 3 Note, but that runs Android 6.0.1 and your app worked fine (both freshly installed and by doing an upgrade from the previous version).
[Deleted User] <[Deleted User]> #19
Sync for Reddit (https://play.google.com/store/apps/details?id=com.laurencedawson.reddit_sync ), a popular Reddit client is reverting the D8 flag because of error 504. (See https://www.reddit.com/r/redditsync/comments/6ul54h/sync_for_reddit_v144_beta_1_is_now_going_live_on/dm1w542/?context=3 )
Our app Busradar (https://play.google.com/store/apps/details?id=de.raumobil.android.busliniensuche ) suffers the same problem, see the attached reviews.
Our app Busradar (
[Deleted User] <[Deleted User]> #20
The users that left the reviews are using Android 5.0 and 5.1 and the following devices:
Mobistel Cynus F9 4G
k05ts_a
Wiko RIDGE 4G
Mobistel Cynus F9 4G
k05ts_a
Wiko RIDGE 4G
lb...@gmail.com <lb...@gmail.com> #21
@19 So it actually can be because of it...
For a moment I wasn't sure.
What's so different about Android 5.x , that can cause it? I didn't see issues with other versions (before and after) ...
For a moment I wasn't sure.
What's so different about Android 5.x , that can cause it? I didn't see issues with other versions (before and after) ...
[Deleted User] <[Deleted User]> #22
Is it possible that all affected devices have Mediatek chips?
lb...@gmail.com <lb...@gmail.com> #23
@22 My app has a lot of users and downloads, but not enough to decide what's common about those issues.
One of the devices I've mentions is Redmi Pro 3, which has SnapDragon chip (http://www.gsmarena.com/xiaomi_redmi_3_pro-8007.php ), but could be a wrong deduction, because maybe this user was affected by something else, and it could be a different device because it says "Simone" which I have no idea what it is
One of the devices I've mentions is Redmi Pro 3, which has SnapDragon chip (
ag...@google.com <ag...@google.com> #24
Thanks for the additional information Kirill. I am still unable to reproduce this on the hardware that we have. However, we now have a piece of hardware that we can actually get. I just placed an order for a Mobistel Cygnus F9 4G. It should arrive next week and I will attempt to reproduce on that as soon as I get it.
In the mean time, if any of your users are able to get a logcat from the device when it fails to install an app build with D8 that would be really useful. Alternatively, if they can report a bug from the phone when it fails to install we might also be able to get more information from there.
In the mean time, if any of your users are able to get a logcat from the device when it fails to install an app build with D8 that would be really useful. Alternatively, if they can report a bug from the phone when it fails to install we might also be able to get more information from there.
[Deleted User] <[Deleted User]> #25
Here's another device: Huawei X2
fl...@polarsteps.com <fl...@polarsteps.com> #26
I have also encountered an issue last week which forced me to release an update with "android.enableD8=false". Review by user on device: "P8 Lite (hwALE-H) Android 5.0".
Alongside the install errors, I have seen a spike in crashes in various (no pattern) native libraries happening on Android 4.0 in that release. The crashes left no stacktrace for me unfortunately, but after disabling D8 the crashes were gone as well.
Hope that can help. D8 is definitely not ready for production if those things can happen. It is in an early stage as I understand, so no hard feelings ;)
Alongside the install errors, I have seen a spike in crashes in various (no pattern) native libraries happening on Android 4.0 in that release. The crashes left no stacktrace for me unfortunately, but after disabling D8 the crashes were gone as well.
Hope that can help. D8 is definitely not ready for production if those things can happen. It is in an early stage as I understand, so no hard feelings ;)
lb...@gmail.com <lb...@gmail.com> #27
@24 One kind user has decided to share his logs and bug report right after the failure of install.
Attached here. device info, from his screenshot:
https://forum.xda-developers.com/showpost.php?p=73479661&postcount=213
Attached here. device info, from his screenshot:
ag...@google.com <ag...@google.com> #28
Awesome, thanks Liran. The interesting part from the bugreport is:
Build fingerprint: 'Xiaomi/ido/ido:5.1.1/LMY47V/7.4.20:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 19883, tid: 19889, name: Compiler driver >>> /system/bin/dex2oat <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'art/compiler/dex/quick/arm64/utility_arm64.cc:568] Check failed: r_dest_src1.Is64Bit() == r_src2.Is64Bit() (r_dest_src1.Is64Bit()=1, r_src2.Is64Bit()=0) '
r0 00000000 r1 00004db1 r2 00000006 r3 00000000
r4 f23f0dd8 r5 00000006 r6 00000002 r7 0000010c
r8 00000001 r9 ab38cd80 sl ab39f2e8 fp ab809100
ip 00004db1 sp f23f0678 lr f6ed3b81 pc f6efa6a0 cpsr 600f0010
d0 ffffffffffffffff d1 2e656d69746e7572
d2 747379732f202074 d3 6c2f62696c2f6d2f
d4 28206f732e636269 d5 705f5f35314c5a5f
d6 735f646165726874 d7 332b765074726174
d8 0000000000000000 d9 0000000000000000
d10 0000000000000000 d11 0000000000000000
d12 0000000000000000 d13 0000000000000000
d14 0000000000000000 d15 0000000000000000
d16 0000000000000000 d17 2039363532203731
d18 2020202020202020 d19 2020202020202020
d20 2020202020202020 d21 732f202020202020
d22 696c2f6d65747379 d23 64747362696c2f62
d24 0000000000000006 d25 0000000000000000
d26 0000000030000000 d27 0000000000000000
d28 0000000080000000 d29 0000000000000000
d30 00000000b0000000 d31 0000000000000000
scr 80000010
backtrace:
#00 pc 0003a6a0 /system/lib/libc.so (tgkill+12)
#01 pc 00013b7d /system/lib/libc.so (pthread_kill+52)
#02 pc 0001479b /system/lib/libc.so (raise+10)
#03 pc 00011015 /system/lib/libc.so (__libc_android_abort+36)
#04 pc 0000f574 /system/lib/libc.so (abort+4)
#05 pc 00217c61 /system/lib/libart.so (_ZN3art7Runtime5AbortEv+160)
#06 pc 000a648b /system/lib/libart.so (_ZN3art10LogMessageD1Ev+1322)
#07 pc 000c3d89 /system/lib/libart-compiler.so (_ZN3art12Arm64Mir2Lir13OpRegRegShiftENS_6OpKindENS_10RegStorageES2_i+1944)
#08 pc 000c681b /system/lib/libart-compiler.so (_ZN3art12Arm64Mir2Lir8OpRegRegENS_6OpKindENS_10RegStorageES2_+18)
#09 pc 000b8a03 /system/lib/libart-compiler.so (_ZN3art12Arm64Mir2Lir11OpCmpBranchENS_13ConditionCodeENS_10RegStorageES2_PNS_3LIRE+10)
#10 pc 000d565b /system/lib/libart-compiler.so (_ZN3art7Mir2Lir19GenCompareAndBranchENS_11Instruction4CodeENS_11RegLocationES3_PNS_3LIRES5_+206)
#11 pc 000fa249 /system/lib/libart-compiler.so (_ZN3art7Mir2Lir24CompileDalvikInstructionEPNS_3MIREPNS_10BasicBlockEPNS_3LIRE+1048)
#12 pc 000fbda7 /system/lib/libart-compiler.so (_ZN3art7Mir2Lir18MethodBlockCodeGenEPNS_10BasicBlockE+330)
#13 pc 000fbf25 /system/lib/libart-compiler.so (_ZN3art7Mir2Lir13MethodMIR2LIREv+140)
#14 pc 000cc853 /system/lib/libart-compiler.so (_ZN3art7Mir2Lir11MaterializeEv+118)
#15 pc 00139cd7 /system/lib/libart-compiler.so
#16 pc 0013a317 /system/lib/libart-compiler.so (ArtQuickCompileMethod+38)
#17 pc 001518f5 /system/lib/libart-compiler.so (_ZN3art14CompilerDriver13CompileMethodEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS1_NS_24DexToDexCompilationLevelEb+1012)
#18 pc 0015210f /system/lib/libart-compiler.so (_ZN3art14CompilerDriver12CompileClassEPKNS_26ParallelCompilationManagerEj+1518)
#19 pc 00147d79 /system/lib/libart-compiler.so
#20 pc 002318eb /system/lib/libart.so (_ZN3art16ThreadPoolWorker3RunEv+34)
#21 pc 00232139 /system/lib/libart.so (_ZN3art16ThreadPoolWorker8CallbackEPv+52)
#22 pc 00013367 /system/lib/libc.so (_ZL15__pthread_startPv+30)
#23 pc 0001137f /system/lib/libc.so (__start_thread+6)
So this is hitting what looks to be a compiler bug in the arm64 quick compiler. I'll dig deeper, now we have something to go on!
Build fingerprint: 'Xiaomi/ido/ido:5.1.1/LMY47V/7.4.20:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 19883, tid: 19889, name: Compiler driver >>> /system/bin/dex2oat <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'art/compiler/dex/quick/arm64/utility_arm64.cc:568] Check failed: r_dest_src1.Is64Bit() == r_src2.Is64Bit() (r_dest_src1.Is64Bit()=1, r_src2.Is64Bit()=0) '
r0 00000000 r1 00004db1 r2 00000006 r3 00000000
r4 f23f0dd8 r5 00000006 r6 00000002 r7 0000010c
r8 00000001 r9 ab38cd80 sl ab39f2e8 fp ab809100
ip 00004db1 sp f23f0678 lr f6ed3b81 pc f6efa6a0 cpsr 600f0010
d0 ffffffffffffffff d1 2e656d69746e7572
d2 747379732f202074 d3 6c2f62696c2f6d2f
d4 28206f732e636269 d5 705f5f35314c5a5f
d6 735f646165726874 d7 332b765074726174
d8 0000000000000000 d9 0000000000000000
d10 0000000000000000 d11 0000000000000000
d12 0000000000000000 d13 0000000000000000
d14 0000000000000000 d15 0000000000000000
d16 0000000000000000 d17 2039363532203731
d18 2020202020202020 d19 2020202020202020
d20 2020202020202020 d21 732f202020202020
d22 696c2f6d65747379 d23 64747362696c2f62
d24 0000000000000006 d25 0000000000000000
d26 0000000030000000 d27 0000000000000000
d28 0000000080000000 d29 0000000000000000
d30 00000000b0000000 d31 0000000000000000
scr 80000010
backtrace:
#00 pc 0003a6a0 /system/lib/libc.so (tgkill+12)
#01 pc 00013b7d /system/lib/libc.so (pthread_kill+52)
#02 pc 0001479b /system/lib/libc.so (raise+10)
#03 pc 00011015 /system/lib/libc.so (__libc_android_abort+36)
#04 pc 0000f574 /system/lib/libc.so (abort+4)
#05 pc 00217c61 /system/lib/libart.so (_ZN3art7Runtime5AbortEv+160)
#06 pc 000a648b /system/lib/libart.so (_ZN3art10LogMessageD1Ev+1322)
#07 pc 000c3d89 /system/lib/libart-compiler.so (_ZN3art12Arm64Mir2Lir13OpRegRegShiftENS_6OpKindENS_10RegStorageES2_i+1944)
#08 pc 000c681b /system/lib/libart-compiler.so (_ZN3art12Arm64Mir2Lir8OpRegRegENS_6OpKindENS_10RegStorageES2_+18)
#09 pc 000b8a03 /system/lib/libart-compiler.so (_ZN3art12Arm64Mir2Lir11OpCmpBranchENS_13ConditionCodeENS_10RegStorageES2_PNS_3LIRE+10)
#10 pc 000d565b /system/lib/libart-compiler.so (_ZN3art7Mir2Lir19GenCompareAndBranchENS_11Instruction4CodeENS_11RegLocationES3_PNS_3LIRES5_+206)
#11 pc 000fa249 /system/lib/libart-compiler.so (_ZN3art7Mir2Lir24CompileDalvikInstructionEPNS_3MIREPNS_10BasicBlockEPNS_3LIRE+1048)
#12 pc 000fbda7 /system/lib/libart-compiler.so (_ZN3art7Mir2Lir18MethodBlockCodeGenEPNS_10BasicBlockE+330)
#13 pc 000fbf25 /system/lib/libart-compiler.so (_ZN3art7Mir2Lir13MethodMIR2LIREv+140)
#14 pc 000cc853 /system/lib/libart-compiler.so (_ZN3art7Mir2Lir11MaterializeEv+118)
#15 pc 00139cd7 /system/lib/libart-compiler.so
#16 pc 0013a317 /system/lib/libart-compiler.so (ArtQuickCompileMethod+38)
#17 pc 001518f5 /system/lib/libart-compiler.so (_ZN3art14CompilerDriver13CompileMethodEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS1_NS_24DexToDexCompilationLevelEb+1012)
#18 pc 0015210f /system/lib/libart-compiler.so (_ZN3art14CompilerDriver12CompileClassEPKNS_26ParallelCompilationManagerEj+1518)
#19 pc 00147d79 /system/lib/libart-compiler.so
#20 pc 002318eb /system/lib/libart.so (_ZN3art16ThreadPoolWorker3RunEv+34)
#21 pc 00232139 /system/lib/libart.so (_ZN3art16ThreadPoolWorker8CallbackEPv+52)
#22 pc 00013367 /system/lib/libc.so (_ZL15__pthread_startPv+30)
#23 pc 0001137f /system/lib/libc.so (__start_thread+6)
So this is hitting what looks to be a compiler bug in the arm64 quick compiler. I'll dig deeper, now we have something to go on!
lb...@gmail.com <lb...@gmail.com> #29
@28 Thank the user who sent it. :)
The only credit I got from Google was on a contribution page, and for some reason my name was removed after a few months there:
https://source.android.com/security/overview/acknowledgements (for writing this post: https://issuetracker.google.com/issues/37109432 )
:(
The only credit I got from Google was on a contribution page, and for some reason my name was removed after a few months there:
:(
na...@google.com <na...@google.com> #30
(+v.m for the quick compiler - given the pattern of crashes, it seems likely to be a vendor customization but still)
vm...@google.com <vm...@google.com> #31
Reproduced with "adb install 241.apk" (no previous installation of 240.apk is necessary) on Nexus 9,
google/volantisg/flounder_lte:5.1.1/LMY47V/1836172:userdebug/dev-keys
google/volantisg/flounder_lte:5.1.1/LMY49S/3276206:userdebug/dev-keys
Running modified LMY47V with a bit more logging, dex2oat is crashing while compiling
void android.support.v4.app.FragmentTransitionCompat21.setNameOverridesReordered(
android.view.View, java.util.ArrayList, java.util.ArrayList, java.util.ArrayList, java.util.Map)
instruction at offset @0x26.
The relevant fragment from dexdump is:
113568: 1204 |001c: const/4 v4, #int 0 // #0
11356a: 6e20 2d51 4200 |001d: invoke-virtual {v2, v4}, Landroid/view/View;.setTransitionName:(Ljava/lang/String;)V // method@512d
113570: 7220 6695 3b00 |0020: invoke-interface {v11, v3}, Ljava/util/Map;.get:(Ljava/lang/Object;)Ljava/lang/Object; // method@9566
113576: 0c02 |0023: move-result-object v2
113578: 1f02 d415 |0024: check-cast v2, Ljava/lang/String; // type@15d4
11357c: 3514 1900 |0026: if-ge v4, v1, 003f // +0019
...
1135a8: d804 0401 |003c: add-int/lit8 v4, v4, #int 1 // #01
1135ac: 28e8 |003e: goto 0026 // -0018
The v4=0 from const/4 at offset 001c is used first as null in the call to View.setTransitionName() at offset 001d but then it's used as the initial value of a loop variable typed as "int". That gets Quick confused and crashes. If I remember correctly, in newer ART, using the same const/4 as both a reference and an int causes a soft verification failure and, since the verification status is recorded per class, all methods of that class shall be executed by the _slow_ interpreter.
Please avoid that pattern in D8, use distinct const/4 instructions to initialize ints and references.
google/volantisg/flounder_lte:5.1.1/LMY47V/1836172:userdebug/dev-keys
google/volantisg/flounder_lte:5.1.1/LMY49S/3276206:userdebug/dev-keys
Running modified LMY47V with a bit more logging, dex2oat is crashing while compiling
void android.support.v4.app.FragmentTransitionCompat21.setNameOverridesReordered(
android.view.View, java.util.ArrayList, java.util.ArrayList, java.util.ArrayList, java.util.Map)
instruction at offset @0x26.
The relevant fragment from dexdump is:
113568: 1204 |001c: const/4 v4, #int 0 // #0
11356a: 6e20 2d51 4200 |001d: invoke-virtual {v2, v4}, Landroid/view/View;.setTransitionName:(Ljava/lang/String;)V // method@512d
113570: 7220 6695 3b00 |0020: invoke-interface {v11, v3}, Ljava/util/Map;.get:(Ljava/lang/Object;)Ljava/lang/Object; // method@9566
113576: 0c02 |0023: move-result-object v2
113578: 1f02 d415 |0024: check-cast v2, Ljava/lang/String; // type@15d4
11357c: 3514 1900 |0026: if-ge v4, v1, 003f // +0019
...
1135a8: d804 0401 |003c: add-int/lit8 v4, v4, #int 1 // #01
1135ac: 28e8 |003e: goto 0026 // -0018
The v4=0 from const/4 at offset 001c is used first as null in the call to View.setTransitionName() at offset 001d but then it's used as the initial value of a loop variable typed as "int". That gets Quick confused and crashes. If I remember correctly, in newer ART, using the same const/4 as both a reference and an int causes a soft verification failure and, since the verification status is recorded per class, all methods of that class shall be executed by the _slow_ interpreter.
Please avoid that pattern in D8, use distinct const/4 instructions to initialize ints and references.
ro...@gmail.com <ro...@gmail.com> #32
One of our user have reported that he can not update our new app version on Google Play. He always get -504 error code when installing the update.
I had to ask him to come to our office and managed to find this interesting and strange log:
```08-25 17:41:09.578 249-249/? E/installd: DexInv: --- END '/data/app/ourcompany.package.release-1/base.apk' --- status=0x0006, process failed
08-25 17:41:09.611 752-786/? W/PackageManager: Package couldn't be installed in /data/app/ourcompany.package.release-1
com.android.server.pm.PackageManagerException: scanPackageLI
at com.android.server.pm.PackageManagerService.scanPackageDirtyLI(PackageManagerService.java:6333)
at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:5623)
at com.android.server.pm.PackageManagerService.replaceNonSystemPackageLI(PackageManagerService.java:10693)
at com.android.server.pm.PackageManagerService.replacePackageLI(PackageManagerService.java:10648)
at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:11145)
at com.android.server.pm.PackageManagerService.access$2800(PackageManagerService.java:241)
at com.android.server.pm.PackageManagerService$6.run(PackageManagerService.java:9013)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
08-25 17:41:09.693 752-786/? W/PackageParser: Unknown element under <manifest>: meta-data at /data/app/ourcompany.package.release-2/base.apk Binary XML file line #71```
Disabling d8 helps resolve this issue in our case. Our user could upgrade to the version which was built with `android.enabledD8=false`
I had to ask him to come to our office and managed to find this interesting and strange log:
```08-25 17:41:09.578 249-249/? E/installd: DexInv: --- END '/data/app/ourcompany.package.release-1/base.apk' --- status=0x0006, process failed
08-25 17:41:09.611 752-786/? W/PackageManager: Package couldn't be installed in /data/app/ourcompany.package.release-1
com.android.server.pm.PackageManagerException: scanPackageLI
at com.android.server.pm.PackageManagerService.scanPackageDirtyLI(PackageManagerService.java:6333)
at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:5623)
at com.android.server.pm.PackageManagerService.replaceNonSystemPackageLI(PackageManagerService.java:10693)
at com.android.server.pm.PackageManagerService.replacePackageLI(PackageManagerService.java:10648)
at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:11145)
at com.android.server.pm.PackageManagerService.access$2800(PackageManagerService.java:241)
at com.android.server.pm.PackageManagerService$6.run(PackageManagerService.java:9013)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
08-25 17:41:09.693 752-786/? W/PackageParser: Unknown element under <manifest>: meta-data at /data/app/ourcompany.package.release-2/base.apk Binary XML file line #71```
Disabling d8 helps resolve this issue in our case. Our user could upgrade to the version which was built with `android.enabledD8=false`
ag...@google.com <ag...@google.com> #33
#31 Thanks for your help reproducing this Vladimir! We do have that split, but it must have slipped in some of our optimizations. That is very concrete and I'll dig in and get it fixed.
#32 Thanks for the report Hiếu. Do you remember the type of device this was happening on? I would love to figure out if this is the same issue (an arm64 device running lollipop).
#32 Thanks for the report Hiếu. Do you remember the type of device this was happening on? I would love to figure out if this is the same issue (an arm64 device running lollipop).
ro...@gmail.com <ro...@gmail.com> #34
#33: there the device info:
* Lenovo P1ma40
* Android version 5.1
* Hardware version H401
* Baseband version P1ma40_A_V035_160226
* Build number P1ma40_S029_160226_16G_ROW
One thing to add is that both *installing* and *updating* don't work on this device with d8 is enabled.
* Lenovo P1ma40
* Android version 5.1
* Hardware version H401
* Baseband version P1ma40_A_V035_160226
* Build number P1ma40_S029_160226_16G_ROW
One thing to add is that both *installing* and *updating* don't work on this device with d8 is enabled.
ag...@google.com <ag...@google.com> #35
Thanks for the extra info Hiếu. That does indeed look like the same issue. The chip in that phone is an arm64 MediaTek chip. I'm working on the fix now.
ag...@google.com <ag...@google.com> #36
Fix is out for review: https://r8-review.googlesource.com/c/r8/+/5341
I will merge to release branches once that cycles green on our buildbots.
Thanks to everyone who help locate the issue so we could fix it!
I will merge to release branches once that cycles green on our buildbots.
Thanks to everyone who help locate the issue so we could fix it!
ag...@google.com <ag...@google.com> #37
Fix has been merged to release branch. Over to Ivan for gradle integration.
lb...@gmail.com <lb...@gmail.com> #38
@37 Please next time try it on multiple devices and Android versions.
Such a huge change should be checked a lot.
Even today, I still get an unknown crash of this sort that I don't get why it occurs:
https://issuetracker.google.com/issues/65108249
Such a huge change should be checked a lot.
Even today, I still get an unknown crash of this sort that I don't get why it occurs:
ga...@google.com <ga...@google.com> #40
Fix merged to AS in ag/I2d1fca1c2e136ace270fa23be9e22e19214d05d5. It should land in the plugin 3.0.0-beta5.
lb...@gmail.com <lb...@gmail.com> #41
@40 Is it available?
ga...@google.com <ga...@google.com> #42
@41 3.0.0-beta5 should be released in 1-2 weeks.
lb...@gmail.com <lb...@gmail.com> #43
@42 Please consider mentioning in all Google websites of using it (especially here: https://android-developers.googleblog.com/2017/08/next-generation-dex-compiler-now-in.html ) , that it might has this issue, so that developers would consider not using this flag till this issue gets fixed.
jv...@google.com <jv...@google.com> #44
we've updated the blog post to point to this bug as well as discourage people from deploying apks built with the experimental feature to Google Play.
Thanks for the bug report, this was a challenging one and I'm glad we caught it before making D8 the default Dexer!
Thanks for the bug report, this was a challenging one and I'm glad we caught it before making D8 the default Dexer!
lb...@gmail.com <lb...@gmail.com> #45
@44 The change in the blog:
"There is currently a known issue around 64 bit devices running KitKat."
According to what I've noticed, it's on 5.x (Lollipop). Kitkat is 4.4 ...
Could occur on Kitkat, but I didn't get reports about it there.
"There is currently a known issue around 64 bit devices running KitKat."
According to what I've noticed, it's on 5.x (Lollipop). Kitkat is 4.4 ...
Could occur on Kitkat, but I didn't get reports about it there.
zb...@gmail.com <zb...@gmail.com> #46
Can you update the blog to either remove the warning about using in production and issue reference from the blog post or mention the version it applied to, as it's marked as fixed in 3.0?
> There is currently a known issue around 64-bit devices running Lollipop. Give D8 a try but please don't use it to deploy your app to Google Play. We would love to hear your feedback. You can file a bug report using this link.
https://android-developers.googleblog.com/2017/08/next-generation-dex-compiler-now-in.html
> There is currently a known issue around 64-bit devices running Lollipop. Give D8 a try but please don't use it to deploy your app to Google Play. We would love to hear your feedback. You can file a bug report using this link.
ja...@google.com <ja...@google.com> #47
Blog post has been updated. Thanks!
lb...@gmail.com <lb...@gmail.com> #48
@47 Wait. Does it mean now it's completely safe to use it?
If so, why not just set it enabled by default from now on?
If so, why not just set it enabled by default from now on?
ag...@google.com <ag...@google.com> #49
It is enabled by default in Android Studio 3.1.
lb...@gmail.com <lb...@gmail.com> #50
@49 So maybe warn there that this shouldn't be altered at all, because before of 3.1 it was dangerous, and on 3.1 it's enabled anyway.
me...@gmail.com <me...@gmail.com> #51
I have recently applied that "android.enableD8=true", and I am going to give an update.
Is this issue solved? Because I don't want my app rating fall.
Is this issue solved? Because I don't want my app rating fall.
lb...@gmail.com <lb...@gmail.com> #52
@51 This issue should be closed, because this flag shouldn't be used anymore, as it's stable and always enabled by default.
See recent posts above yours:
Question: " Wait. Does it mean now it's completely safe to use it?
If so, why not just set it enabled by default from now on?
"
Answer: "It is enabled by default in Android Studio 3.1."
The blog post wasn't updated about this for some reason. Still says we should give it a try.
Anyway, you can safely remove this flag, because it's already enabled.
See recent posts above yours:
Question: " Wait. Does it mean now it's completely safe to use it?
If so, why not just set it enabled by default from now on?
"
Answer: "It is enabled by default in Android Studio 3.1."
The blog post wasn't updated about this for some reason. Still says we should give it a try.
Anyway, you can safely remove this flag, because it's already enabled.
me...@gmail.com <me...@gmail.com> #53
@52 Thank you so much. By the way, I have Android Studio 3.0.1, I did not get Android Studio 3.1 update.
lb...@gmail.com <lb...@gmail.com> #54
me...@gmail.com <me...@gmail.com> #55
@52 wow, this is cool. Thank you so much
[Deleted User] <[Deleted User]> #56
We are also having a similar problem with some devices.
Here is the error log with stacktrace when I try to install our app on Samsung Galaxy S4 (Android version 5.0.1)
The APK is built with tools version android tools version `3.1.1`
05-16 11:10:02.853 1047-4805/? E/Parcel: Class not found when unmarshalling: com.google.android.finsky.dfemodel.Document
java.lang.ClassNotFoundException: com.google.android.finsky.dfemodel.Document
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:308)
at java.lang.Class.forName(Class.java:272)
at android.os.Parcel.readParcelableCreator(Parcel.java:2275)
at android.os.Parcel.readParcelable(Parcel.java:2239)
at android.os.Parcel.readValue(Parcel.java:2146)
at android.os.Parcel.readListInternal(Parcel.java:2520)
at android.os.Parcel.readArrayList(Parcel.java:1836)
at android.os.Parcel.readValue(Parcel.java:2167)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2479)
at android.os.BaseBundle.unparcel(BaseBundle.java:221)
at android.os.BaseBundle.getString(BaseBundle.java:918)
at android.content.Intent.getStringExtra(Intent.java:5386)
at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1780)
at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1334)
at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:4802)
at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:4639)
at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:142)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3139)
at android.os.Binder.execTransact(Binder.java:446)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.finsky.dfemodel.Document" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:308)
at java.lang.Class.forName(Class.java:272)
at android.os.Parcel.readParcelableCreator(Parcel.java:2275)
at android.os.Parcel.readParcelable(Parcel.java:2239)
at android.os.Parcel.readValue(Parcel.java:2146)
at android.os.Parcel.readListInternal(Parcel.java:2520)
at android.os.Parcel.readArrayList(Parcel.java:1836)
at android.os.Parcel.readValue(Parcel.java:2167)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2479)
at android.os.BaseBundle.unparcel(BaseBundle.java:221)
at android.os.BaseBundle.getString(BaseBundle.java:918)
at android.content.Intent.getStringExtra(Intent.java:5386)
at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1780)
at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1334)
at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:4802)
at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:4639)
at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:142)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3139)
at android.os.Binder.execTransact(Binder.java:446)
Suppressed: java.lang.ClassNotFoundException: com.google.android.finsky.dfemodel.Document
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 21 more
Here is the error log with stacktrace when I try to install our app on Samsung Galaxy S4 (Android version 5.0.1)
The APK is built with tools version android tools version `3.1.1`
05-16 11:10:02.853 1047-4805/? E/Parcel: Class not found when unmarshalling: com.google.android.finsky.dfemodel.Document
java.lang.ClassNotFoundException: com.google.android.finsky.dfemodel.Document
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:308)
at java.lang.Class.forName(Class.java:272)
at android.os.Parcel.readParcelableCreator(Parcel.java:2275)
at android.os.Parcel.readParcelable(Parcel.java:2239)
at android.os.Parcel.readValue(Parcel.java:2146)
at android.os.Parcel.readListInternal(Parcel.java:2520)
at android.os.Parcel.readArrayList(Parcel.java:1836)
at android.os.Parcel.readValue(Parcel.java:2167)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2479)
at android.os.BaseBundle.unparcel(BaseBundle.java:221)
at android.os.BaseBundle.getString(BaseBundle.java:918)
at android.content.Intent.getStringExtra(Intent.java:5386)
at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1780)
at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1334)
at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:4802)
at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:4639)
at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:142)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3139)
at android.os.Binder.execTransact(Binder.java:446)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.finsky.dfemodel.Document" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:308)
at java.lang.Class.forName(Class.java:272)
at android.os.Parcel.readParcelableCreator(Parcel.java:2275)
at android.os.Parcel.readParcelable(Parcel.java:2239)
at android.os.Parcel.readValue(Parcel.java:2146)
at android.os.Parcel.readListInternal(Parcel.java:2520)
at android.os.Parcel.readArrayList(Parcel.java:1836)
at android.os.Parcel.readValue(Parcel.java:2167)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2479)
at android.os.BaseBundle.unparcel(BaseBundle.java:221)
at android.os.BaseBundle.getString(BaseBundle.java:918)
at android.content.Intent.getStringExtra(Intent.java:5386)
at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1780)
at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1334)
at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:4802)
at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:4639)
at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:142)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3139)
at android.os.Binder.execTransact(Binder.java:446)
Suppressed: java.lang.ClassNotFoundException: com.google.android.finsky.dfemodel.Document
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 21 more
[Deleted User] <[Deleted User]> #57
I'm getting the above error every time I try to install but it may not be related.
This is also something I found in the logs when installation fails.
05-16 13:22:22.009 1047-1087/? I/PackageManager: do mInstaller.dexopt : -1
05-16 13:22:22.009 1047-1087/? D/PackageManager: Time to dexopt: 10.767 seconds
05-16 13:22:22.049 1047-1087/? W/PackageManager: Package couldn't be installed in /data/app/com.wayfair.wayfair-1
com.android.server.pm.PackageManagerException: scanPackageLI
at com.android.server.pm.PackageManagerService.scanPackageDirtyLI(PackageManagerService.java:7784)
at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:6966)
at com.android.server.pm.PackageManagerService.installNewPackageLI(PackageManagerService.java:13302)
at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:14200)
at com.android.server.pm.PackageManagerService.access$2700(PackageManagerService.java:334)
at com.android.server.pm.PackageManagerService$8.run(PackageManagerService.java:11415)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
05-16 13:22:22.049 1047-1087/? D/PackageManager: doPostInstall for uid{-1}
This is also something I found in the logs when installation fails.
05-16 13:22:22.009 1047-1087/? I/PackageManager: do mInstaller.dexopt : -1
05-16 13:22:22.009 1047-1087/? D/PackageManager: Time to dexopt: 10.767 seconds
05-16 13:22:22.049 1047-1087/? W/PackageManager: Package couldn't be installed in /data/app/com.wayfair.wayfair-1
com.android.server.pm.PackageManagerException: scanPackageLI
at com.android.server.pm.PackageManagerService.scanPackageDirtyLI(PackageManagerService.java:7784)
at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:6966)
at com.android.server.pm.PackageManagerService.installNewPackageLI(PackageManagerService.java:13302)
at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:14200)
at com.android.server.pm.PackageManagerService.access$2700(PackageManagerService.java:334)
at com.android.server.pm.PackageManagerService$8.run(PackageManagerService.java:11415)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
05-16 13:22:22.049 1047-1087/? D/PackageManager: doPostInstall for uid{-1}
ag...@google.com <ag...@google.com> #58
Regarding #56 and #57 that looks like a different issue. This looks like a class not being present in the dex file for some reason. Does your APK contain more than one dex file? If it does, did you enable multidex support? https://developer.android.com/studio/build/multidex
Description
Knowing this issue, he already tried to reset the Play Services and Play Store apps, but it still didn't help.
Attached his review screenshot, and the app is here:
Also attached image of the device info, as shown on the Play Console.