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

Unknown instruction: 'invoke-custom' #620

Closed
bagipro opened this issue Apr 23, 2019 · 1 comment
Closed

Unknown instruction: 'invoke-custom' #620

bagipro opened this issue Apr 23, 2019 · 1 comment

Comments

@bagipro
Copy link
Collaborator

bagipro commented Apr 23, 2019

Hi, I was inspecting native Java classes and faced with the exception

    /*  JADX ERROR: Method load error
        jadx.core.utils.exceptions.DecodeException: Load method exception: Unknown instruction: 'invoke-custom' in method: java.lang.reflect.AnnotatedElement.getDeclaredAnnotationsByType(java.lang.Class):T[], dex: 
        	at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:138)
        	at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:250)
        	at jadx.core.ProcessClass.process(ProcessClass.java:27)
        	at jadx.core.ProcessClass.lambda$processDependencies$0(ProcessClass.java:49)
        	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
        	at jadx.core.ProcessClass.processDependencies(ProcessClass.java:49)
        	at jadx.core.ProcessClass.process(ProcessClass.java:35)
        	at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:290)
        	at jadx.api.JavaClass.decompile(JavaClass.java:62)
        	at jadx.api.JadxDecompiler.getJavaMethodByNode(JadxDecompiler.java:324)
        	at jadx.api.JavaClass.convertNode(JavaClass.java:163)
        	at jadx.api.JavaClass.getJavaNodeAtPosition(JavaClass.java:181)
        Caused by: jadx.core.utils.exceptions.DecodeException: Unknown instruction: 'invoke-custom'
        	at jadx.core.dex.instructions.InsnDecoder.decode(InsnDecoder.java:588)
        	at jadx.core.dex.instructions.InsnDecoder.process(InsnDecoder.java:77)
        	at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:124)
        	... 11 more
        */
    <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType(java.lang.Class<T> r1) {
        /*
        // Can't load method instructions: Load method exception: Unknown instruction: 'invoke-custom' in method: java.lang.reflect.AnnotatedElement.getDeclaredAnnotationsByType(java.lang.Class):T[], dex: 
        */
        throw new UnsupportedOperationException("Method not decompiled: java.lang.reflect.AnnotatedElement.getDeclaredAnnotationsByType(java.lang.Class):java.lang.annotation.Annotation[]");
    }

Use jadx to open class java.lang.reflect.AnnotatedElement from %JRE_PATH%/lib/rt.jar

@skylot
Copy link
Owner

skylot commented Apr 23, 2019

This instruction not yet supported see #384

@skylot skylot closed this as completed Apr 23, 2019
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

2 participants