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.ClassCastException: class jadx.api.JavaMethod cannot be cast to class jadx.api.JavaVariable (jadx.api.JavaMethod and jadx.api.JavaVariable are in unnamed module of loader 'app') #1509

Closed
muratuygun opened this issue Jun 2, 2022 · 1 comment

Comments

@muratuygun
Copy link

Please describe what you did before the error occurred.
IMPORTANT! If the error occurs with a specific APK file please attach or provide link to apk file!

  • Jadx version: 1.4.0
  • Java version: 11.0.1
  • Java VM: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM
  • Platform: Windows 10 (10.0 amd64)
  • Max heap size: 20836 MB
  • Program args: -Xms1488m -Xmx20836m -Dawt.useSystemAAFontSettings=lcd -Dswing.aatext=true -XX:+UseG1GC
java.lang.ClassCastException: class jadx.api.JavaMethod cannot be cast to class jadx.api.JavaVariable (jadx.api.JavaMethod and jadx.api.JavaVariable are in unnamed module of loader 'app')
	at jadx.api.JadxDecompiler.resolveVarRef(JadxDecompiler.java:689)
	at jadx.api.JadxDecompiler.getJavaNodeByCodeAnnotation(JadxDecompiler.java:661)
	at jadx.api.JavaClass.getUsePlacesFor(JavaClass.java:203)
	at jadx.gui.ui.dialog.UsageDialog.processUsage(UsageDialog.java:101)
	at jadx.gui.ui.dialog.UsageDialog.lambda$collectUsageData$1(UsageDialog.java:69)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base/java.util.stream.DistinctOps$1$2.accept(DistinctOps.java:175)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
	at jadx.gui.ui.dialog.UsageDialog.lambda$collectUsageData$2(UsageDialog.java:69)
	at java.base/java.util.HashMap.forEach(HashMap.java:1336)
	at jadx.gui.ui.dialog.UsageDialog.collectUsageData(UsageDialog.java:66)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

@skylot
Copy link
Owner

skylot commented Jun 2, 2022

Duplicate of #1489, already fixed in release 1.4.1.

@skylot skylot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2022
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