Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method code too large! #17

Open
Krosxx opened this issue Aug 3, 2023 · 0 comments
Open

Method code too large! #17

Krosxx opened this issue Aug 3, 2023 · 0 comments

Comments

@Krosxx
Copy link

Krosxx commented Aug 3, 2023

该错误来自 BlackObfuscator-ASPlugin, 根据报错定位到 MethodWriter.getSize 方法报错,但是查看下面字节码并不是很长,该如何处理,望大佬回复

#This file is generated by dex2jar
Please report this file to https://github.com/pxb1988/dex2jar/issues if possible.

There are 629 methods fail to translate.
2023-08-03 15:41:19 UTC
version: [dex-reader-2.1-SNAPSHOT, dex-reader-api-2.1-SNAPSHOT, dex-ir-2.1-SNAPSHOT, d2j-smali-2.1-SNAPSHOT, d2j-base-cmd-2.1-SNAPSHOT, dex-tools-2.1-SNAPSHOT, dex-translator-2.1-SNAPSHOT]
cmdline: [-f, /Users/XXX/Projects/XXX/app/build/intermediates/dex/release/mergeDexRelease/1691077236803splitclasses.dex.dex, -o, /Users/XXX/Projects/XXX/app/build/intermediates/dex/release/mergeDexRelease/1691077236803obfclasses.dex.jar]
env:
java.specification.version: 17
java.vendor.url: https://openjdk.java.net/
java.specification.vendor: Oracle Corporation
java.version.date: 2023-04-18
java.home: /Users/XXX/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/231.9225.16.2311.10533651/Android Studio Preview.app/Contents/jbr/Contents/Home
java.vm.compressedOopsMode: Zero based
java.vm.specification.vendor: Oracle Corporation
java.specification.name: Java Platform API Specification
java.runtime.version: 17.0.7+0-17.0.7b829.16-10353782
java.io.tmpdir: /var/folders/zg/3d6ch2t50v13gtygpvmfnhz80000gn/T/
java.version: 17.0.7
java.vm.specification.name: Java Virtual Machine Specification
java.library.path: /Users/XXX/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
java.vendor: JetBrains s.r.o.
java.rmi.server.disableHttp: true
java.class.path: /Users/XXX/.gradle/wrapper/dists/gradle-8.2-bin/bbg7u40eoinfdyxsxr3z4i7ta/gradle-8.2/lib/gradle-launcher-8.2.jar
java.vm.vendor: JetBrains s.r.o.
java.vm.specification.version: 17
java.awt.headless: true
java.runtime.name: OpenJDK Runtime Environment
java.vm.name: OpenJDK 64-Bit Server VM
java.vendor.url.bug: https://bugreport.java.com/bugreport/
java.util.concurrent.ForkJoinPool.common.threadFactory: com.intellij.concurrency.IdeaForkJoinWorkerThreadFactory
java.vm.info: mixed mode
java.vm.version: 17.0.7+0-17.0.7b829.16-10353782
java.rmi.server.hostname: 127.0.0.1
java.class.version: 61.0


....
================= 463 ===================
Lxxx/og;->getSf()Ljava/text/SimpleDateFormat;
java.lang.RuntimeException: Method code too large!
	at org.objectweb.asm2.MethodWriter.getSize(MethodWriter.java:2036)
	at org.objectweb.asm2.AsmBridge.sizeOfMethodWriter(AsmBridge.java:31)
	at com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:54)
	at com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:134)
	at com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:686)
	at com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:476)
	at com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:379)
	at com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:515)
	at com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:190)
	at com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:295)
	at com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:120)
	at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:290)
	at top.niunaijun.blackobfuscator.core.ObfDex.handleDex(ObfDex.java:99)
	at top.niunaijun.blackobfuscator.core.ObfDex.obf(ObfDex.java:34)
	at top.niunaijun.blackobfuscator.core.ObfDex$obf.call(Unknown Source)
	at top.niunaijun.blackobfuscator.ObfPlugin$1$_execute_closure1.doCall(ObfPlugin.groovy:45)
	at jdk.internal.reflect.GeneratedMethodAccessor222.invoke(Unknown Source)
.....

.method private final getSf()Ljava/text/SimpleDateFormat;
  .registers 2
    sget-object v0, Landroidx/compose/animation/AppLog;->sf$delegate:Lkotlin/Lazy;
    invoke-interface { v0 }, Lkotlin/Lazy;->getValue()Ljava/lang/Object;
    move-result-object v0
    check-cast v0, Ljava/text/SimpleDateFormat;
    return-object v0
.end method

....
================= 612 ===================
Lxxxxx/XX;->random(JLkotlin/ranges/IntRange;)J
java.lang.RuntimeException: Method code too large!
at org.objectweb.asm2.MethodWriter.getSize(MethodWriter.java:2036)
at org.objectweb.asm2.AsmBridge.sizeOfMethodWriter(AsmBridge.java:31)
at com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:54)
at com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:134)
at com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:686)
at com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:476)
at com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:379)
at com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:515)
at com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:190)
at com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:295)
at com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:120)
at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:290)
at top.niunaijun.blackobfuscator.core.ObfDex.handleDex(ObfDex.java:99)
at top.niunaijun.blackobfuscator.core.ObfDex.obf(ObfDex.java:34)
at top.niunaijun.blackobfuscator.core.ObfDex$obf.call(Unknown Source)
at top.niunaijun.blackobfuscator.ObfPlugin$1$_execute_closure1.doCall(ObfPlugin.groovy:45)
at jdk.internal.reflect.GeneratedMethodAccessor222.invoke(Unknown Source)
...

.method private final random(JLkotlin/ranges/IntRange;)J
  .register 6
    sget-object v0, Lkotlin/random/Random;->Default:Lkotlin/random/Random$Default;
    check-cast v0, Lkotlin/random/Random;
    invoke-static { v0, p3 }, Lkotlin/random/RandomKt;->nextInt(Lkotlin/random/Random;Lkotlin/ranges/IntRange;)I
    move-result p3
    int-to-long v0, p3
    add-long/2addr p1, v0
    return-wide p1
.end method


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant