Konloch / Konloch/bytecode-viewer
ClassCastException when running "Decompile & Save All Classes"
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 15.6k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Bytecode Viewer Version: 2.13.2 [Fat Jar], OS: Windows 11, Java: 1.8.0_462
java.lang.ClassCastException: com.strobel.assembler.ir.attributes.BlobAttribute cannot be cast to com.strobel.assembler.ir.attributes.BootstrapMethodsAttribute
at com.strobel.assembler.metadata.ClassFileReader$Scope.lookupDynamicCallSite(ClassFileReader.java:1543)
at com.strobel.assembler.metadata.ClassFileReader$Scope.lookup(ClassFileReader.java:1629)
at com.strobel.assembler.ir.MetadataReader.readAttributeCore(MetadataReader.java:307)
at com.strobel.assembler.metadata.ClassFileReader.readAttributeCore(ClassFileReader.java:431)
at com.strobel.assembler.ir.MetadataReader.inflateAttributes(MetadataReader.java:440)
at com.strobel.assembler.metadata.ClassFileReader.visitAttributes(ClassFileReader.java:1403)
at com.strobel.assembler.metadata.ClassFileReader.readClass(ClassFileReader.java:667)
at com.strobel.assembler.metadata.ClassFileReader.readClass(ClassFileReader.java:605)
at com.strobel.assembler.metadata.MetadataSystem.resolveType(MetadataSystem.java:129)
at com.strobel.assembler.metadata.MetadataSystem.resolveCore(MetadataSystem.java:81)
at com.strobel.assembler.metadata.MetadataResolver.resolve(MetadataResolver.java:104)
at com.strobel.assembler.metadata.CoreMetadataFactory$UnresolvedType.resolve(CoreMetadataFactory.java:616)
at com.strobel.assembler.metadata.ClassFileReader.populateDeclaringType(ClassFileReader.java:864)
at com.strobel.assembler.metadata.ClassFileReader.readClass(ClassFileReader.java:665)
at com.strobel.assembler.metadata.ClassFileReader.readClass(ClassFileReader.java:605)
at com.strobel.assembler.metadata.MetadataSystem.resolveType(MetadataSystem.java:129)
at com.strobel.assembler.metadata.MetadataSystem.lookupTypeCore(MetadataSystem.java:86)
at com.strobel.assembler.metadata.MetadataResolver.lookupType(MetadataResolver.java:46)
at the.bytecode.club.bytecodeviewer.decompilers.impl.ProcyonDecompiler.decompileToZip(ProcyonDecompiler.java:171)
at the.bytecode.club.bytecodeviewer.resources.ResourceDecompiling.decompileSaveAll(ResourceDecompiling.java:261)
at the.bytecode.club.bytecodeviewer.resources.ResourceDecompiling.lambda$decompileSaveAll$0(ResourceDecompiling.java:122)
at java.lang.Thread.run(Thread.java:750)
More context:
The .jar file that I am decompiling is Java 25. I see that Bytecode says that it is using "Java: 1.8.0_462," so this might be the issue? My default jdk PATH on my system is pointed to the JDK 25, so shouldn't it be using that?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing “Decompile & Save All Classes” with the reported Java 25 JAR, then trace from ResourceDecompiling.decompileSaveAll through ProcyonDecompiler.decompileToZip at line 171. Read the ClassFileReader and MetadataReader locations in the stack trace to determine why the BootstrapMethodsAttribute lookup receives a BlobAttribute. Done means the operation completes without this exception for the reported input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100