dx/d8 conversion exception

57 views
Skip to first unread message

irgend wer

unread,
Oct 24, 2024, 1:47:54 PM10/24/24
to JEB Decompiler
You can easily reproduce that error by just open
bin\app\jeb.jar
in JEB.

[C] com.pnfsoftware.jeb.core.exceptions.JebException: dx conversion exception: dx conversion error: 1

[C] at com.pnfsoftware.jeb.corei.parsers.classfile.DxRunner.ig(SourceFile:85)

[C] at com.pnfsoftware.jeb.corei.parsers.classfile.rh.Xr(SourceFile:68)

[C] at com.pnfsoftware.jeb.corei.parsers.classfile.rh.XL(SourceFile:105)

[C] at com.pnfsoftware.jeb.corei.parsers.jar.Mj.processInternal(SourceFile:61)

[C] at com.pnfsoftware.jeb.core.units.AbstractUnit.process(SourceFile:448)

[C] com.pnfsoftware.jeb.core.exceptions.JebException: d8 conversion exception: Compilation failed to complete,

position: Lcom/pnfsoftware/jebglobal/cnz;<clinit>()V,

origin: C:\Testing\jeb_global.jar:com/pnfsoftware/jebglobal/cnz.class

[C] at com.pnfsoftware.jeb.corei.parsers.classfile.X.ig(SourceFile:69)

[C] at com.pnfsoftware.jeb.corei.parsers.classfile.rh.Xr(SourceFile:68)

[C] at com.pnfsoftware.jeb.corei.parsers.classfile.rh.XL(SourceFile:105)

[C] at com.pnfsoftware.jeb.corei.parsers.jar.Mj.processInternal(SourceFile:61)

[C] at com.pnfsoftware.jeb.core.units.AbstractUnit.process(SourceFile:448)

[C] at com.pnfsoftware.jeb.rcpclient.handlers.HandlerUtil$1.call(HandlerUtil.java:207)

[C] at com.pnfsoftware.jeb.rcpclient.handlers.HandlerUtil$1.call(HandlerUtil.java:204)

[C] at com.pnfsoftware.jeb.util.concurrent.ThreadEx.run(SourceFile:52)

[C] Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete,

position: Lcom/pnfsoftware/jebglobal/cnz;<clinit>()V,

origin: C:\Testing\jeb_global.jar:com/pnfsoftware/jebglobal/cnz.class

[C] at Version.fakeStackEntry(Version_8.2.2-dev.java:0)

[C] at com.android.tools.r8.M.a(R8_8.2.2-dev_53a55043254cc5be8ef500331bba25d1b4ca4bc2cd66c555d4358bf672a1f10a:5)

[C] at com.android.tools.r8.utils.R0.a(R8_8.2.2-dev_53a55043254cc5be8ef500331bba25d1b4ca4bc2cd66c555d4358bf672a1f10a:81)

[C] at com.android.tools.r8.utils.R0.a(R8_8.2.2-dev_53a55043254cc5be8ef500331bba25d1b4ca4bc2cd66c555d4358bf672a1f10a:32)

[C] at com.android.tools.r8.utils.R0.a(R8_8.2.2-dev_53a55043254cc5be8ef500331bba25d1b4ca4bc2cd66c555d4358bf672a1f10a:31)

[C] at com.android.tools.r8.utils.R0.b(R8_8.2.2-dev_53a55043254cc5be8ef500331bba25d1b4ca4bc2cd66c555d4358bf672a1f10a:2)

[C] at com.android.tools.r8.D8.run(R8_8.2.2-dev_53a55043254cc5be8ef500331bba25d1b4ca4bc2cd66c555d4358bf672a1f10a:6)

[C] at com.pnfsoftware.jeb.corei.parsers.classfile.X.ig(SourceFile:53)

[C] ... 7 more

[C] Caused by: java.lang.ArrayIndexOutOfBoundsException

[C]  

So what failed?
 Well JEB always converts *.class-files (*.jar's) into a *.dex before it does decompilation.

To do so, it uses external tools (DX.jar and D8.jar) from the Android SDK.
And both DX as well D8 fails on the conversion failed.

Btw: In options backend/parsers/javaclass.
You can turn on /turn off  D8 for dex conversion.
And so decide whether D8.jar or DX.jar is used for the class -> dex job.


So I'm not blaming JEB for failing.
However, I blame it for not passing on the error details!
JEB should show these errors in its log clearly.
At the moment they just got lost.

To obtain the source code from JEB you may

Make a copy jeb.jar open it as Zip-File and delete these files:
bin\app\jeb.jar\com\pnfsoftware\jeb\core\assets\* 
bin\app\jeb.jar\com\pnfsoftware\jebglobal\*

Seeing these two files in  com\pnfsoftware\jeb\corei\parsers\classfile\   in compare side a side:
JEB_DX-D8_Error.PNG
shows indeed that these may need some 'love' and attention to make that code better.
Blame:
* runDX()/ D8.run()   are in a try-block without a catch. That totally discards any important error information from that call.

Nicolas Falliere

unread,
Oct 24, 2024, 7:55:11 PM10/24/24
to irgend wer, JEB Decompiler
Hello,

That code is in a try-block (the higher-level try-multi-catch, visible in your screenshot).

The stacktrace also displays the d8 exception:
...
[C] Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, position: ... origin: ...
[C] at Version.fakeStackEntry(Version_8.2.2-dev.java:0)
...

Best regards,
--
Nicolas Falliere (ni...@pnfsoftware.com)
JEB Decompiler, Founder and Architect


--
You received this message because you are subscribed to the Google Groups "JEB Decompiler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jeb-decompile...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jeb-decompiler/e1eacd73-5efe-4ca9-878e-e096f6bbf564n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages