Status Update
Comments
sg...@google.com <sg...@google.com> #2
em...@gmail.com <em...@gmail.com> #3
Build #AI-182.4323.46.33.5012296, built on September 15, 2018
JRE: 1.8.0_152-release-1248-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 Pro 10.0
sg...@google.com <sg...@google.com> #5
em...@gmail.com <em...@gmail.com> #6
sg...@google.com <sg...@google.com> #7
em...@gmail.com <em...@gmail.com> #8
sg...@google.com <sg...@google.com> #9
em...@gmail.com <em...@gmail.com> #10
```
java.lang.Throwable: Progress subrange out of bounds: 2.949999999999999
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:145)
at com.android.tools.idea.sdk.progress.StudioLoggerProgressIndicator.logError(StudioLoggerProgressIndicator.java:47)
at com.android.repository.api.DelegatingProgressIndicator.lambda$logError$8(DelegatingProgressIndicator.java:103)
at java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4649)
at com.android.repository.api.DelegatingProgressIndicator.logError(DelegatingProgressIndicator.java:103)
at com.android.repository.api.ProgressIndicator.createSubProgress(ProgressIndicator.java:124)
at com.android.repository.impl.manager.RemoteRepoLoaderImpl.processSource(RemoteRepoLoaderImpl.java:262)
at com.android.repository.impl.manager.RemoteRepoLoaderImpl.fetchPackages(RemoteRepoLoaderImpl.java:187)
at com.android.repository.impl.manager.RepoManagerImpl$LoadTask.run(RepoManagerImpl.java:553)
at com.android.repository.api.RepoManager$DummyProgressRunner.runSyncWithProgress(RepoManager.java:397)
at com.android.repository.impl.manager.RepoManagerImpl.load(RepoManagerImpl.java:365)
at com.android.repository.api.RepoManager.loadSynchronously(RepoManager.java:290)
at com.android.tools.idea.updater.SdkComponentSource.initIfNecessary(SdkComponentSource.java:74)
at com.android.tools.idea.updater.SdkComponentSource.getComponents(SdkComponentSource.java:141)
at com.android.tools.idea.updater.SdkComponentSource.getAvailableVersions(SdkComponentSource.java:122)
at com.intellij.openapi.updateSettings.impl.UpdateChecker.checkExternalUpdates(UpdateChecker.kt:296)
at com.intellij.openapi.updateSettings.impl.UpdateChecker.doUpdateAndShowResult(UpdateChecker.kt:139)
at com.intellij.openapi.updateSettings.impl.UpdateChecker.access$doUpdateAndShowResult(UpdateChecker.kt:50)
at com.intellij.openapi.updateSettings.impl.UpdateChecker$updateAndShowResult$1.run(UpdateChecker.kt:81)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
```
IntelliJ IDEA 2019.1 (Ultimate Edition)
Build #IU-191.6183.87, built on March 27, 2019
Licensed to Gareth Jones
Subscription is active until June 22, 2019
JRE: 1.8.0_202-release-1483-b39 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
It's been going on for quite a while. IntelliJ doesn't tell me what version of the plugin I've got.
Any chance of some more information about the state of this bug & its fix?
sg...@google.com <sg...@google.com> #11
Thanks to trying out the patch! I was aware that you mentioned that you indicated Android 7.0 - 8.1 in VerifictionError
.
sg...@google.com <sg...@google.com> #12
I finally managed to reproduce the VerificationError
locally. As the reporter already mentioned this is only a VerificationError
on Android 7.0 - 8.1. On all other versions we are testing on the code runs fine.
The reproduction requires a feature split is as follows:
The base contains the following code where Base
is captured in a lambda (passed to printInt
).
fun printInt(l: () -> Int ) = println(l())
open class Base(@JvmField var x: Int, @JvmField var y: Int)
fun main(args: Array<String>) {
val base = Base(args.size + 1, args.size + 2)
printInt { base.x }
printInt { base.y }
}
And the feature contains this code where Feature
extends Base
and is a capture in a lambda.
class Feature(x: Int, y: Int) : Base(x, y)
fun feature(i: Int) {
val f = Feature(i, i + 1)
printInt { f.x }
printInt { f.y }
}
When this is compiled the lambdas from the base and the lambdas from the feature are both added to a lambda group which is placed in the base.
The lambda group invoke
contains this for the first lambda from the feature:
8: 0x0d: IgetObject v0, v2, Field java.lang.Object com.android.tools.r8.kotlin.lambda.b148525512.-$$LambdaGroup$ks$fSoYVxbxeJxmZ1HdRAkuBp7sD8c.$capture$0
9: 0x0f: CheckCast v0, com.android.tools.r8.kotlin.lambda.b148525512.Feature
10: 0x11: Iget v0, v0, Field int com.android.tools.r8.kotlin.lambda.b148525512.Base.y
0x13, line 2, locals: [2 -> this]
11: 0x13: InvokeStatic { v0 } Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
12: 0x16: MoveResultObject v0
13: 0x17: ReturnObject v0
Which cause the VerificationError
:
java.lang.VerifyError: Verifier rejected class com.android.tools.r8.kotlin.lambda.b148525512.-$$LambdaGroup$ks$fSoYVxbxeJxmZ1HdRAkuBp7sD8c: java.lang.Object com.android.tools.r8.kotlin.lambda.b148525512.-$$LambdaGroup$ks$fSoYVxbxeJxmZ1HdRAkuBp7sD8c.invoke() failed to verify: java.lang.Object com.android.tools.r8.kotlin.lambda.b148525512.-$$LambdaGroup$ks$fSoYVxbxeJxmZ1HdRAkuBp7sD8c.invoke(): [0x11] cannot access instance field int com.android.tools.r8.kotlin.lambda.b148525512.Base.y from object of type Unresolved Reference: com.android.tools.r8.kotlin.lambda.b148525512.Feature (declaration of 'com.android.tools.r8.kotlin.lambda.b148525512.-$$LambdaGroup$ks$fSoYVxbxeJxmZ1HdRAkuBp7sD8c' appears in /tmp/junit8694733721787468186/junit10876155525460741592/out.zip) at com.android.tools.r8.kotlin.lambda.b148525512.BaseKt.main()
If the @JvmField
annotation is removed the VerificationError
_oes away, as the field access turns into a virtual invoke of the getter.
17: 0x1c: IgetObject v0, v2, Field java.lang.Object com.android.tools.r8.kotlin.lambda.b148525512.-$$LambdaGroup$ks$fSoYVxbxeJxmZ1HdRAkuBp7sD8c.$capture$0
18: 0x1e: CheckCast v0, com.android.tools.r8.kotlin.lambda.b148525512.Feature
19: 0x20: InvokeVirtual { v0 } Lcom/android/tools/r8/kotlin/lambda/b148525512/Base;->getX()I
20: 0x23: MoveResult v0
0x24, line 5, locals: [2 -> this]
21: 0x24: InvokeStatic { v0 } Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
22: 0x27: MoveResultObject v0
23: 0x28: ReturnObject v0
em...@gmail.com <em...@gmail.com> #13
That's Great !!!
Thank you for your time, please if you can, let me know as soon as it will be ready to use.
sg...@google.com <sg...@google.com>
em...@gmail.com <em...@gmail.com> #14
Thanks for the fix ! I can confirm that the issue is solved with custom R8 that i have tried. But to be sure, you said that it will be fixes in next R8 2.1.x-dev release, so just to be really sure before using it in Production does the latest version 2.1.6-dev contains the fix, or should wait and use the custom version still for the moment ?
OK, it contains it...
ch...@google.com <ch...@google.com> #15
Yes, the fix is available in 2.0.30 and 2.1.6-dev.
Description
Build #AI-193.5233.102.40.6137316, built on January 15, 2020
Runtime version: 1.8.0_212-release-1586-b04 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1994M
Cores: 4
Registry: ide.new.welcome.screen.force=true
Non-Bundled Plugins:
Kotlin 1.3.61
SDK 29
AS Canary 9
I am testing it on multi module app (on demand feature modules) and since v.2.1.2-dev it is throwing this crash :
Fatal Exception: java.lang.VerifyError: Verifier rejected class lVxFwxVBcpNcTd: java.lang.Object lVxFwxVBcpNcTd.nvWUHPf4yZeDhJS8J(java.lang.Object) failed to verify: java.lang.Object lVxFwxVBcpNcTd.nvWUHPf4yZeDhJS8J(java.lang.Object): [0x5F] cannot access instance field boolean evSF1GbQyBLWLkfhHl0angDgt.Hai8bcCnYy from object of type Unresolved Reference: com.eakteam.networkmanager.pro.tcpdump_feature.fragments.tcpdump_feature (declaration of 'lVxFwxVBcpNcTd' appears in base.apk)
Currently i am testing V. 2.1.3-dev to see if it is happening to it too...