ThexXTURBOXx / dex2jar

Tools to work with android .dex and java .class files
Apache License 2.0
235 stars 59 forks source link

got IndexOutOfBoundsException #21

Closed nickolastone closed 2 years ago

nickolastone commented 2 years ago

v51

if i use openjava18. i got this error

This file is generated by dex2jar

Please report this file to one of following link if possible (any one). https://github.com/ThexXTURBOXx/dex2jar/issues nico.mexis@kabelmail.de

There are 1 fails. 2022-06-07 08:15:12 UTC version: [dex-reader-null, dex-reader-api-null, dex-ir-null, d2j-smali-null, d2j-base-cmd-null, dex-tools-null, dex-translator-null] cmdline: [--force, classes.dex] env: java.specification.version: 18 java.class.path: .:../dex-tools-2.1-SNAPSHOT/lib/ST4-4.3.1.jar:../dex-tools-2.1-SNAPSHOT/lib/antlr-3.5.2.jar:../dex-tools-2.1-SNAPSHOT/lib/antlr-runtime-3.5.2.jar:../dex-tools-2.1-SNAPSHOT/lib/antlr4-4.9.3.jar:../dex-tools-2.1-SNAPSHOT/lib/antlr4-runtime-4.9.3.jar:../dex-tools-2.1-SNAPSHOT/lib/asm-9.3.jar:../dex-tools-2.1-SNAPSHOT/lib/asm-analysis-9.3.jar:../dex-tools-2.1-SNAPSHOT/lib/asm-commons-9.3.jar:../dex-tools-2.1-SNAPSHOT/lib/asm-tree-9.3.jar:../dex-tools-2.1-SNAPSHOT/lib/asm-util-9.3.jar:../dex-tools-2.1-SNAPSHOT/lib/d2j-base-cmd-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/d2j-jasmin-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/d2j-smali-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/d8-32.0.0.jar:../dex-tools-2.1-SNAPSHOT/lib/dex-ir-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/dex-reader-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/dex-reader-api-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/dex-tools-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/dex-translator-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/dex-writer-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/dx-30.0.3.jar:../dex-tools-2.1-SNAPSHOT/lib/icu4j-69.1.jar:../dex-tools-2.1-SNAPSHOT/lib/javax.json-1.0.4.jar:../dex-tools-2.1-SNAPSHOT/lib/org.abego.treelayout.core-1.0.3.jar java.vm.vendor: Homebrew java.vendor.url: https://github.com/Homebrew/homebrew-core/issues java.vm.specification.version: 18 java.specification.vendor: Oracle Corporation java.version.date: 2022-04-19 java.home: /usr/local/Cellar/openjdk/18.0.1/libexec/openjdk.jdk/Contents/Home java.vm.compressedOopsMode: Zero based java.vm.specification.vendor: Oracle Corporation java.specification.name: Java Platform API Specification java.runtime.version: 18.0.1+0 java.runtime.name: OpenJDK Runtime Environment java.vm.name: OpenJDK 64-Bit Server VM java.vendor.version: Homebrew java.vendor.url.bug: https://github.com/Homebrew/homebrew-core/issues java.io.tmpdir: /var/folders/2t/5kv5st7x3vqfhlvy8stqnkr40000gn/T/ java.version: 18.0.1 java.vm.specification.name: Java Virtual Machine Specification java.library.path: /Users/nicko/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:. java.vm.info: mixed mode, sharing java.vendor: Homebrew java.vm.version: 18.0.1+0 java.class.version: 62.0 java.lang.IndexOutOfBoundsException at java.base/java.nio.Buffer.checkIndex(Buffer.java:746) at java.base/java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:439) at com.googlecode.d2j.reader.DexFileReader.getString(DexFileReader.java:1029) at com.googlecode.d2j.reader.DexFileReader.getType(DexFileReader.java:1044) at com.googlecode.d2j.reader.DexFileReader.accept(DexFileReader.java:716) at com.googlecode.d2j.reader.DexFileReader.accept(DexFileReader.java:690) at com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:47) at com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:246) at com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:103) at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:297) at com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:16)

ThexXTURBOXx commented 2 years ago

I don't think, this is related to OpenJDK 18. Could you share the APK/Dex file you are trying to convert?

nickolastone commented 2 years ago

if i use openjava8. i got this error

This file is generated by dex2jar

Please report this file to one of following link if possible (any one). https://github.com/ThexXTURBOXx/dex2jar/issues nico.mexis@kabelmail.de

There are 1 fails. 2022-06-07 08:20:57 UTC version: [dex-reader-null, dex-reader-api-null, dex-ir-null, d2j-smali-null, d2j-base-cmd-null, dex-tools-null, dex-translator-null] cmdline: [--force, classes.dex, classes02.dex, classes03.dex, classes04.dex, classes05.dex, classes06.dex, classes07.dex, classes08.dex, classes09.dex, classes10.dex, classes11.dex, classes12.dex, classes13.dex, classes14.dex, classes15.dex, classes16.dex, classes17.dex, classes18.dex, classes19.dex, classes20.dex, classes21.dex, classes22.dex, classes23.dex, classes24.dex, classes25.dex, classes26.dex, classes27.dex, classes28.dex, classes29.dex, classes30.dex, classes31.dex, classes32.dex, classes33.dex, classes34.dex, classes35.dex, classes36.dex, classes37.dex, classes38.dex, classes39.dex, classes40.dex, classes41.dex, classes42.dex, classes43.dex] env: java.runtime.name: OpenJDK Runtime Environment java.vm.version: 25.275-b01 java.vm.vendor: AdoptOpenJDK java.vendor.url: https://adoptopenjdk.net/ java.vm.name: OpenJDK 64-Bit Server VM java.vm.specification.name: Java Virtual Machine Specification java.runtime.version: 1.8.0_275-b01 java.awt.graphicsenv: sun.awt.CGraphicsEnvironment java.endorsed.dirs: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/endorsed java.io.tmpdir: /var/folders/2t/5kv5st7x3vqfhlvy8stqnkr40000gn/T/ java.vm.specification.vendor: Oracle Corporation java.library.path: /Users/nicko/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:. java.specification.name: Java Platform API Specification java.class.version: 52.0 java.awt.printerjob: sun.lwawt.macosx.CPrinterJob java.specification.version: 1.8 java.class.path: .:../dex-tools-2.1-SNAPSHOT/lib/ST4-4.3.1.jar:../dex-tools-2.1-SNAPSHOT/lib/antlr-3.5.2.jar:../dex-tools-2.1-SNAPSHOT/lib/antlr-runtime-3.5.2.jar:../dex-tools-2.1-SNAPSHOT/lib/antlr4-4.9.3.jar:../dex-tools-2.1-SNAPSHOT/lib/antlr4-runtime-4.9.3.jar:../dex-tools-2.1-SNAPSHOT/lib/asm-9.3.jar:../dex-tools-2.1-SNAPSHOT/lib/asm-analysis-9.3.jar:../dex-tools-2.1-SNAPSHOT/lib/asm-commons-9.3.jar:../dex-tools-2.1-SNAPSHOT/lib/asm-tree-9.3.jar:../dex-tools-2.1-SNAPSHOT/lib/asm-util-9.3.jar:../dex-tools-2.1-SNAPSHOT/lib/d2j-base-cmd-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/d2j-jasmin-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/d2j-smali-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/d8-32.0.0.jar:../dex-tools-2.1-SNAPSHOT/lib/dex-ir-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/dex-reader-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/dex-reader-api-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/dex-tools-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/dex-translator-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/dex-writer-2.1-SNAPSHOT.jar:../dex-tools-2.1-SNAPSHOT/lib/dx-30.0.3.jar:../dex-tools-2.1-SNAPSHOT/lib/icu4j-69.1.jar:../dex-tools-2.1-SNAPSHOT/lib/javax.json-1.0.4.jar:../dex-tools-2.1-SNAPSHOT/lib/org.abego.treelayout.core-1.0.3.jar java.vm.specification.version: 1.8 java.home: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre java.specification.vendor: Oracle Corporation java.vm.info: mixed mode java.version: 1.8.0_275 java.ext.dirs: /Users/nicko/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java java.vendor: AdoptOpenJDK java.vendor.url.bug: https://github.com/AdoptOpenJDK/openjdk-support/issues java.lang.IndexOutOfBoundsException at java.nio.Buffer.checkIndex(Buffer.java:550) at java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:377) at com.googlecode.d2j.reader.DexFileReader.getString(DexFileReader.java:1029) at com.googlecode.d2j.reader.DexFileReader.getType(DexFileReader.java:1044) at com.googlecode.d2j.reader.DexFileReader.accept(DexFileReader.java:716) at com.googlecode.d2j.reader.DexFileReader.accept(DexFileReader.java:690) at com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:47) at com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:246) at com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:103) at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:297) at com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:16)

ThexXTURBOXx commented 2 years ago

Could you please share your classes.dex files? Otherwise, this bug might be impossible to pin down for me :)

nickolastone commented 2 years ago

I don't think, this is related to OpenJDK 18. Could you share the APK/Dex file you are trying to convert?

https://we.tl/t-YnyYEr72It

nickolastone commented 2 years ago

Could you please share your classes.dex files? Otherwise, this bug might be impossible to pin down for me :)

could you download it success?

ThexXTURBOXx commented 2 years ago

Yes, Thanks! I will inspect the issue asap

nickolastone commented 2 years ago

thank for you help!

ThexXTURBOXx commented 2 years ago

It seems like the dex file is either damaged or incomplete. The dex checksum does not match and other programs (like JADX) also fail decompiling or parsing the file