Status Update
Comments
ta...@gmail.com <ta...@gmail.com> #2
Thanks for the report Tolriq! Would it be possible for you to upload the APK built with D8 for which this fails? Is it possible to create a small reproduction project so that it is easier for us to reproduce?
ju...@gtempaccount.com <ju...@gtempaccount.com> #3
I've attached the bugged APK.
The application is very large and complex I'll try to create a repro app but as it can take a long time, would appreciate if you can confirm that you need it :)
And not fully related but tied to build tools I've reportedhttps://issuetracker.google.com/issues/73534863 that does not seems to be triaged. Maybe I chose a wrong section don't know if you can help to have it seen. As both aapt2 and D8 will become mandatory and both have problem with my app :(
And a thank you to the D8 team, build process with desugaring is quite faster for me :)
The application is very large and complex I'll try to create a repro app but as it can take a long time, would appreciate if you can confirm that you need it :)
And not fully related but tied to build tools I've reported
And a thank you to the D8 team, build process with desugaring is quite faster for me :)
to...@gmail.com <to...@gmail.com> #4
Thank you Tolriq! I'll have a look. Just to make sure I'm looking at the right thing: can you show me the D8 related parts of your gradle.properties when the app works and when the app doesn't work? I would like to figure out if this is related to D8 desugaring or D8 dexing.
pe...@gmail.com <pe...@gmail.com> #5
Gradle.properties that works.
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx4G
#-XX:MaxPermSize=4G -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#Android
android.enableAapt2=false
android.enableBuildCache=true
android.enableD8.desugaring=false
android.enableD8=false
I only tested both D8 and D8.desugaring to true and then it crash. Will try in a few minutes with only D8 true and D8.desugar to false. (But a release build is 8 minutes compilation on a i6850K 64G Ram on an Samsung M2 960 Pro ;)
That part of the code looks like:
JobManager.queueTask(() -> {
if (Device.hasOreoApi()) {
try {
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
if (notificationManager != null) {
List<NotificationChannel> channels = notificationManager.getNotificationChannels();
Both JobManager and Device are Kotlin objects but the Application is still Java.
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx4G
#-XX:MaxPermSize=4G -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#Android
android.enableAapt2=false
android.enableBuildCache=true
android.enableD8.desugaring=false
android.enableD8=false
I only tested both D8 and D8.desugaring to true and then it crash. Will try in a few minutes with only D8 true and D8.desugar to false. (But a release build is 8 minutes compilation on a i6850K 64G Ram on an Samsung M2 960 Pro ;)
That part of the code looks like:
JobManager.queueTask(() -> {
if (Device.hasOreoApi()) {
try {
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
if (notificationManager != null) {
List<NotificationChannel> channels = notificationManager.getNotificationChannels();
Both JobManager and Device are Kotlin objects but the Application is still Java.
ka...@sperling.co.nz <ka...@sperling.co.nz> #6
Ok so tested without D8 desugar and fails too.
The error message is a little different:
Process: org.leetzone.android.yatsewidgetfree, PID: 4943
java.lang.VerifyError: Verifier rejected class org.leetzone.android.yatsewidget.b due to bad method void org.leetzone.android.yatsewidget.b.run() (declaration of 'org.leetzone.android.yatsewidget.b' appears in /data/app/org.leetzone.android.yatsewidgetfree-1/base.apk)
at org.leetzone.android.yatsewidget.YatseApplication.onCreate(YatseApplication.java:383)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4518)
at android.app.ActivityThread.access$1500(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
The b method is the lambda passed to JobManager.queueTask
The error message is a little different:
Process: org.leetzone.android.yatsewidgetfree, PID: 4943
java.lang.VerifyError: Verifier rejected class org.leetzone.android.yatsewidget.b due to bad method void org.leetzone.android.yatsewidget.b.run() (declaration of 'org.leetzone.android.yatsewidget.b' appears in /data/app/org.leetzone.android.yatsewidgetfree-1/base.apk)
at org.leetzone.android.yatsewidget.YatseApplication.onCreate(YatseApplication.java:383)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4518)
at android.app.ActivityThread.access$1500(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
The b method is the lambda passed to JobManager.queueTask
[Deleted User] <[Deleted User]> #7
Thanks for being some responsive Tolriq, this is a huge help in debugging this. Can you upload the APK that works as well, then I can compare the code that works to the code that doesn't. Maybe that will give me an indication of what is going wrong here.
[Deleted User] <[Deleted User]> #8
I'll do in 2 post to not mix the files.
Here's the apk built with D8 true and D8.desugaring false
The one that works is still compiling, should only have some updated translations and build number as I'll push it to beta track too :)
You should compare this one bugged with the next one unbugged as there's other code changes since the 1st uploaded APK.
Here's the apk built with D8 true and D8.desugaring false
The one that works is still compiling, should only have some updated translations and build number as I'll push it to beta track too :)
You should compare this one bugged with the next one unbugged as there's other code changes since the 1st uploaded APK.
li...@gmail.com <li...@gmail.com> #9
And here's the APK that does work.
[Deleted User] <[Deleted User]> #10
Thank you!
ca...@gmail.com <ca...@gmail.com> #11
Hum I've just seen that the previous build is not a beta build, should not impact at all the code that interest you, but this change a BuildConfig so there's much more code change between the 2 than I thought. Hope it's not a problem.
If it is I can trigger a broken beta build to compare.
If it is I can trigger a broken beta build to compare.
le...@gmail.com <le...@gmail.com> #12
That is not a problem Tolriq. I think I see what the problem is: it looks like the verifier on these versions of Android is broken and assumes that the register for the receiver is never overwritten. That is unfortunate, but if I can verify that this is the issue I can create a workaround.
Description
Version used: 22.0.0
Android: 5.0
Manufacturer: LGE
Model: LG-D855
Full stack trace:
java.lang.IllegalArgumentException: pointerIndex out of range
at android.view.MotionEvent.nativeGetAxisValue(Native Method)
at android.view.MotionEvent.getY(MotionEvent.java:1998)
at android.support.v4.view.MotionEventCompatEclair.getY(MotionEventCompatEclair.java:35)
at android.support.v4.view.MotionEventCompat$EclairMotionEventVersionImpl.getY(MotionEventCompat.java:95)
at android.support.v4.view.MotionEventCompat.getY(MotionEventCompat.java:228)
at android.support.v4.widget.SwipeRefreshLayout.onTouchEvent(SwipeRefreshLayout.java:803)
at android.view.View.dispatchTouchEvent(View.java:8395)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2398)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2158)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2400)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2400)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2400)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2400)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2400)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2400)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2400)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2400)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2400)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2400)
at android.view.ViewGroup.cancelAndClearTouchTargets(ViewGroup.java:2263)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2049)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2376)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1727)
at android.app.Activity.dispatchTouchEvent(Activity.java:2783)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2337)
at android.view.View.dispatchPointerEvent(View.java:8585)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4074)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3940)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3485)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3538)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3504)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3512)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3485)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3538)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3504)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3614)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3512)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3671)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3485)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3538)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3504)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3512)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3485)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5759)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5733)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5704)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5878)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:143)
at android.os.Looper.loop(Looper.java:122)
at android.app.ActivityThread.main(ActivityThread.java:5274)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)
When googling around, it seems that this is an issue people are experiencing since around December 2014 and it happens to a lot of developers. Apps like Wordpress and VLC have put workarounds in place that just swallow this exception quietly, example: