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

Closed
CezarKing9436 opened this issue May 28, 2022 · 1 comment

Comments

@CezarKing9436
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: 18.0.1.1
  • Java VM: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM
  • Platform: Windows 10 (10.0 amd64)
  • Max heap size: 11376 MB
  • Program args: -Xms128M -XX:MaxRAMPercentage=70.0 -XX:+UseG1GC -Dawt.useSystemAAFontSettings=lcd -Dswing.aatext=true
java.lang.ClassCastException: class jadx.api.JavaClass cannot be cast to class jadx.api.JavaVariable (jadx.api.JavaClass 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$null$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:174)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	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:596)
	at jadx.gui.ui.dialog.UsageDialog.lambda$collectUsageData$2(UsageDialog.java:69)
	at java.base/java.util.HashMap.forEach(HashMap.java:1421)
	at jadx.gui.ui.dialog.UsageDialog.collectUsageData(UsageDialog.java:66)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

@skylot
Copy link
Owner

skylot commented May 28, 2022

@CezarKing9436 this is duplicate of #1489. Please check latest unstable build, it should be fixed already.

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