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

Java.lang.RuntimeException: Error loading class definition #162

Open
apkunpacker opened this issue Aug 7, 2021 · 5 comments
Open

Java.lang.RuntimeException: Error loading class definition #162

apkunpacker opened this issue Aug 7, 2021 · 5 comments

Comments

@apkunpacker
Copy link

apkunpacker commented Aug 7, 2021

TestSimplify.apk.zip

java -jar simplify.jar --max-call-depth 999 --max-address-visits 999 --max-method-visits 999 --ignore-error TestSimplify.apk

Error :


com/test/dec/SketchwareUtil.smali[128,4] null
Exception in thread "main" java.lang.RuntimeException: Error loading class definition: Lcom/test/dec/SketchwareUtil;
        at org.cf.smalivm.type.ClassManager.parseClass(ClassManager.java:187)
        at org.cf.smalivm.type.ClassManager.parseClassIfNecessary(ClassManager.java:205)
        at org.cf.smalivm.type.ClassManager.getVirtualType(ClassManager.java:137)
        at org.cf.smalivm.type.ClassManager.getVirtualType(ClassManager.java:158)
        at org.cf.smalivm.type.ClassManager.getVirtualClass(ClassManager.java:130)
        at org.cf.simplify.Launcher.collectTargetClassNameToMethods(Launcher.java:166)
        at org.cf.simplify.Launcher.run(Launcher.java:133)
        at org.cf.simplify.Main.main(Main.java:13)
Caused by: java.lang.RuntimeException: Unable to walk: /data/data/com.termux/files/usr/tmp/simplify11836953586600987855/com/test/dec/SketchwareUtil.smali
        at org.cf.smalivm.dex.SmaliParser.parse(SmaliParser.java:83)
        at org.cf.smalivm.type.ClassManager.parseClass(ClassManager.java:184)
        ... 7 more

and simplify stopped . i had look to this error prone class but not understand why it giving error
because all tool can parse it as proper .smali file . lost original apk , only this apk left because in this i merged 2 dex into single one as simplify not aware about multidex yet

@apkunpacker
Copy link
Author

on Android tool i see error shown as Instruction format Format45cc not supported
which seems similer to JesusFreke/smali#767

@CalebFenton
Copy link
Owner

CalebFenton commented Aug 9, 2021

This is a smali / dexlib2 issue. You can work around by rewriting the smali / deleting problematic classes. I'll update to the new dexlib version when it becomes available which should be v2.5.3 or higher.

@apkunpacker
Copy link
Author

yeah sure . till then closing issue , will try to remove problematic classes

@CalebFenton
Copy link
Owner

I'll leave it open to remind me to update dexlib versions. ;)

@KingMahmud
Copy link

Facing same issue :( , problem is mainly with invoke-polymorphic

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

3 participants