Status Update
Comments
ch...@google.com <ch...@google.com>
an...@gmail.com <an...@gmail.com> #2
ch...@google.com <ch...@google.com>
mk...@google.com <mk...@google.com> #3
Thank you for posting an issue. The -dontoptimize flag is not really a fix, but it can circumvent the issue. The problem seems to come from not processing the accessibility bridges in correct order which incorrectly allowed us to conclude the the first argument was always null. It is fixed on our -dev branch, but the issue is still on the beta branch. I am working on a fix and will report back when one is available on our beta release branch.
an...@gmail.com <an...@gmail.com> #4
Thank you for working on it!
ap...@google.com <ap...@google.com> #5
Branch: 2.0
commit 144e12555be9a41dfa495c22bbb5cffa03371f93
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Tue Apr 07 20:21:10 2020
Version 2.0.64
Cherry-pick: Reland "Adjust accessibility for desugared lambdas prior to
IR processing in R8"
CL:
Bug: 152865051
Change-Id: I5862890fe77fe1dbaac8a24cdbf5448869702f93
M src/main/java/com/android/tools/r8/Version.java
M src/main/java/com/android/tools/r8/graph/DexEncodedMethod.java
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
M src/main/java/com/android/tools/r8/ir/desugar/LambdaClass.java
M src/main/java/com/android/tools/r8/ir/desugar/LambdaRewriter.java
M src/main/java/com/android/tools/r8/ir/desugar/LambdaRewriterGraphLense.java
M src/main/java/com/android/tools/r8/ir/optimize/classinliner/ClassInliner.java
M src/main/java/com/android/tools/r8/ir/optimize/classinliner/InlineCandidateProcessor.java
M src/test/java/com/android/tools/r8/R8RunExamplesAndroidOTest.java
M src/test/java/com/android/tools/r8/ir/optimize/reflection/GetNameTestBase.java
A src/test/java/com/android/tools/r8/regress/b152865051/CallSiteOptimizationWithLambdaMethodReference.java
M src/test/java/com/android/tools/r8/utils/codeinspector/analysis/ProtoApplicationStats.java
mk...@google.com <mk...@google.com> #6
I was able to compile your project and run it afterwards with the changes added in 2.0.64. Can I ask you to try out the version to confirm that it works for you? You can try it out by adding the following to your top-level build.gradle file:
buildscript {
repositories {
maven {
url 'https://storage.googleapis.com/r8-releases/raw'
}
}
dependencies {
classpath 'com.android.tools:r8:2.0.64' // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:X.Y.Z' // Your current AGP version.
}
}
an...@gmail.com <an...@gmail.com> #7
mk...@google.com <mk...@google.com> #8
Perfect - thank you for reporting back. The fix will be included in an upcoming version of studio, hopefully a beta version or the first release candidate.
sa...@google.com <sa...@google.com> #9
If you notice any further issues or have questions please file a new bug report from Android Studio by selecting Help > Submit Feedback.
Thank you for taking the time to submit feedback -- we really appreciate it!
ma...@gmail.com <ma...@gmail.com> #10
Turned up build output to verbose and seeing something now.
Still not seeing anything _useful_ in the Console though...
Really I am just saying - aapt DOES CRASH on my very vanilla Win XP ADT setup. (As in Windows XP pops a dialogue and tries to send an Error Report to Microsoft).
I can reproduce it if anyone wants me to try anything further.
With verbose build output, below is the last bit of what I see:
Notice the fragmented output line "(new"
Interestingly, it seems to process the implicated menu fine earlier, but blows later amidst unrelated .wav files...
<Lots before this, then: >
...
[2013-11-21 17:39:55 - MyApp] (new resource id say50 from C:\AndroidDev\EclipseWorkspace\MyApp\res\raw\say50.wav)
[2013-11-21 17:39:57 - MyApp] (new
[2013-11-21 17:39:57 - MyApp] 'aapt' error. Pre Compiler Build aborted.
[2013-11-21 17:39:57 - MyApp] Starting full Package build.
[2013-11-21 17:39:57 - MyApp] Using default Build Tools revision 19.0.0
Description
AI-193.6494.35.40.6296804, JRE 1.8.0_242-release-1644-b3-6222593x64 JetBrains s.r.o, OS Linux(amd64) v5.3.0-42-generic, screens 1920x1080
AS: 4.0 Beta 3; Kotlin plugin: 1.3.61; Android Gradle Plugin: 4.0.0-beta03; Gradle: 6.3; NDK: from local.properties: 21.0.6113669, latest from SDK: (not found); LLDB: LLDB 3.1 (revision: 3.1.4508709); CMake: from local.properties: (not specified), latest from SDK: 3.10.2, from PATH: 3.13.4
How to reproduce:
1. Open this
to 'com.android.tools.build:gradle:4.0.0-beta03'
2. Run the release build:
./gradlew clean fermata:bundleRelease
After starting the application, I'm getting the following exception:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Throwable.getMessage()' on a null object reference
at me.aap.fermata.ui.activity.MainActivityDelegate.onMediaServiceBind(MainActivityDelegate.java:21)
at d.a.a.d.a.a.accept(Unknown Source:5)
at me.aap.fermata.media.service.FermataServiceUiBinder.onServiceConnected(FermataServiceUiBinder.java:10)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1730)
The method onMediaServiceBind(
rh.accept(this, null);
Thus, the first argument is never null. But in the method d.a.a.d.a.a.accept() the first argument is always null:
.method public final accept(Ljava/lang/Object;Ljava/lang/Object;)V
.registers 4
iget-object p1, p0, Ld/a/a/d/a/a;->a:Lme/aap/fermata/ui/activity/MainActivityDelegate;
check-cast p2, Ljava/lang/Throwable;
const/4 v0, 0x0
invoke-virtual {p1, v0, p2}, Lme/aap/fermata/ui/activity/MainActivityDelegate;->onMediaServiceBind(Lme/aap/fermata/media/service/FermataServiceUiBinder;Ljava/lang/Throwable;)V
return-void
.end method