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: jadx.api.JavaClass cannot be cast to jadx.api.JavaVariable #1602

Closed
pengxiaochuan opened this issue Aug 4, 2022 · 1 comment

Comments

@pengxiaochuan
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: 1.8.0_291
  • Java VM: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM
  • Platform: Windows 10 (10.0 amd64)
  • Max heap size: 12182 MB
  • Program args: -Xms870m -Xmx12182m -Dawt.useSystemAAFontSettings=lcd -Dswing.aatext=true -XX:+UseG1GC
java.lang.ClassCastException: jadx.api.JavaClass cannot be cast to jadx.api.JavaVariable
	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$null$1(UsageDialog.java:69)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.stream.DistinctOps$1$2.accept(DistinctOps.java:175)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at jadx.gui.ui.dialog.UsageDialog.lambda$collectUsageData$2(UsageDialog.java:69)
	at java.util.HashMap.forEach(HashMap.java:1289)
	at jadx.gui.ui.dialog.UsageDialog.collectUsageData(UsageDialog.java:66)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

@jpstotz
Copy link
Collaborator

jpstotz commented Aug 4, 2022

Duplicate of #1489 please update to the latest version of Jadx.

@jpstotz jpstotz closed this as completed Aug 4, 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