crilofer
(Cristian)
December 20, 2017, 3:56pm
1
Hi,
I am getting this error when I am trying to build my project:
dex2oat F 10387 456025 /Users/rolandvigh/public-repo/aosp/art/runtime/runtime.cc:464]Runtime aborting...
Aborting thread:
"main" prio=5 tid=1 Runnable (still starting up)
| group="" sCount=0 dsCount=0 obj=0x0 self=0x7fb704000000
| sysTid=456025 nice=-1 cgrp=default sched=1/31 handle=0x7fffc75ea3c0
| state=? schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
| stack=0x7fff53367000-0x7fff5336f000 stackSize=8MB
| held mutexes= "abort lock" "mutator lock"(shared held)
(no managed stack frames)
Pending exception java.lang.NoClassDefFoundError: io.netty.handler.ssl.ConscryptAlpnSslEngine$BufferAllocatorAdapter
(Throwable with empty stack trace)Dumping all threads without appropriate locks held: thread list lock
All threads:
DALVIK THREADS (1):
"main" prio=5 tid=1 Runnable (still starting up)
| group="" sCount=0 dsCount=0 obj=0x0 self=0x7fb704000000
| sysTid=456025 nice=-1 cgrp=default sched=1/31 handle=0x7fffc75ea3c0
| state=? schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
| stack=0x7fff53367000-0x7fff5336f000 stackSize=8MB
| held mutexes= "abort lock" "mutator lock"(shared held)
(no managed stack frames)
dex2oat W 10387 456025 /Users/rolandvigh/public-repo/aosp/art/runtime/barrier.cc:96] Attempted to destroy barrier with non zero count -1
What could be the problem?
Thanks.
ekuleshov
(Eugene)
December 20, 2017, 4:13pm
2
Check the proguard logs if io.netty.* packages wasn’t removed and add exclusions as needed.
crilofer
(Cristian)
December 21, 2017, 12:38pm
3
The content of my proguard file:
-keep class **
-dontwarn **
vighr
(Roland Vigh - Migeran)
December 21, 2017, 12:44pm
4
Hi!
Please try add this line to proguard.append.cfg:
-keep class io.netty.** { *; }
Best Regards,
Roland
crilofer
(Cristian)
December 21, 2017, 12:55pm
5
This has been the output:
dex2oat F 6951 455642 /Users/rolandvigh/public-repo/aosp/art/runtime/runtime.cc:464]Runtime aborting...
Aborting thread:
"main" prio=5 tid=1 Runnable (still starting up)
| group="" sCount=0 dsCount=0 obj=0x0 self=0x7fb980809800
| sysTid=455642 nice=-1 cgrp=default sched=1/31 handle=0x7fffde03d3c0
| state=? schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
| stack=0x7fff5c608000-0x7fff5c610000 stackSize=8MB
| held mutexes= "abort lock" "mutator lock"(shared held)
(no managed stack frames)
Pending exception java.lang.NoClassDefFoundError: io.netty.handler.codec.marshalling.ChannelBufferByteInput
(Throwable with empty stack trace)Dumping all threads without appropriate locks held: thread list lock
All threads:
DALVIK THREADS (1):
"main" prio=5 tid=1 Runnable (still starting up)
| group="" sCount=0 dsCount=0 obj=0x0 self=0x7fb980809800
| sysTid=455642 nice=-1 cgrp=default sched=1/31 handle=0x7fffde03d3c0
| state=? schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
| stack=0x7fff5c608000-0x7fff5c610000 stackSize=8MB
| held mutexes= "abort lock" "mutator lock"(shared held)
(no managed stack frames)
dex2oat W 6951 455642 /Users/rolandvigh/public-repo/aosp/art/runtime/barrier.cc:96] Attempted to destroy barrier with non zero count -1
My proguard file:
-keep class io.netty.** { *; }
-dontwarn **
vighr
(Roland Vigh - Migeran)
December 21, 2017, 1:02pm
6
Hi!
Can you provide us with a test project to reproduce this?
Best Regards,
Roland
kisg
(Gergely Kis - Migeran)
December 21, 2017, 1:51pm
7
Is your proguard file proguard.append.cfg or proguard.cfg ? They behave very differently.
I second what Roland wrote: a test project would be the easiest way for us to help.
vighr
(Roland Vigh - Migeran)
December 21, 2017, 2:19pm
9
Hi!
Xcode project seems to be corrupt, we cannot open it in Xcode 9.2. How did you create it?
Best Regards,
Roland
crilofer
(Cristian)
December 28, 2017, 1:02pm
11
Hi,
any idea about the error?
vighr
(Roland Vigh - Migeran)
January 3, 2018, 3:36pm
12
Hi!
Could you please try this in your build.gradle? It basically removes the problematic classes from the ProGuard output. The reason is, that netty includes classes that are not expected to be used on Android, and regular Android does not have an issue with this. However, on MOE we require that only fully resolved classes are passed to the dex2oat step (the step that compiles from DEX bytecode to machine code).
moeMainProGuard {
doLast {
def jar = getOutJar()
def outputDir = file(jar.getAbsolutePath() + "_")
copy{
from(zipTree(jar)){
exclude "io/netty/handler/ssl/Java9SslEngine*"
exclude "io/netty/handler/ssl/Java9SslUtils*"
exclude "io/netty/handler/ssl/JettyAlpnSslEngine*"
exclude "io/netty/handler/ssl/JettyNpnSslEngine*"
exclude "io/netty/handler/ssl/ReferenceCountedOpenSslContext*"
exclude "io/netty/handler/ssl/OpenSslContext*"
exclude "io/netty/handler/ssl/OpenSslClientContext*"
exclude "io/netty/handler/ssl/OpenSslServerContext*"
exclude "io/netty/handler/ssl/ReferenceCountedOpenSslClientContext*"
exclude "io/netty/handler/ssl/ReferenceCountedOpenSslServerContext*"
exclude "io/netty/handler/ssl/ConscryptAlpnSslEngine*"
exclude "io/netty/handler/ssl/util/X509TrustManagerWrapper*"
exclude "io/netty/util/internal/LongAdderCounter*"
}
into outputDir
}
delete jar
ant.jar(update: "true", index: "true", destfile: jar.getAbsolutePath()) {
fileset(dir: outputDir)
}
delete outputDir
}
}
Best Regards,
Roland