bytecode-viewer icon indicating copy to clipboard operation
bytecode-viewer copied to clipboard

Decompiler and Disassembler Width Issue in Bytecode Viewer 2.12

Open sphcode opened this issue 2 years ago • 7 comments

I discovered a minor bug while using Bytecode Viewer 2.12. When opening the mockito-core-5.14.1.jar file and randomly clicking on a few classes, particularly MockitoTestRule.class and VerificationCollector.class (both located in org.junit), the widths of the Decompiler and Disassembler sections behave strangely.

This bug does not occur 100% of the time, and I am unsure of the exact triggering conditions. Below is a GIF demonstrating the issue along with the JAR file that triggers it.

Thank you for your attention! bug mockito

sphcode avatar Oct 07 '24 03:10 sphcode

Hi, could you verify if this behavior is fixed for the latest snapshot - https://github.com/Konloch/bytecode-viewer/actions/runs/11197361153

This issue should be fixed, but if it's not just let us know and we'll resolve it

Konloch avatar Oct 07 '24 04:10 Konloch

Hi, could you verify if this behavior is fixed for the latest snapshot - https://github.com/Konloch/bytecode-viewer/actions/runs/11197361153

This issue should be fixed, but if it's not just let us know and we'll resolve it

Sorry, I can not exectue the version of the jar. The error info is followed:

Please send this error log to https://github.com/Konloch/bytecode-viewer/issues or Konloch at https://the.bytecode.club or [email protected] If you hold appropriate legal rights to the relevant class/jar/apk file please include that as well. Bytecode Viewer Version: 2.12 [Fat Jar], OS: Windows 10, Java: 16.0.2

java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because "the.bytecode.club.bytecodeviewer.Settings.recentPlugins" is null at the.bytecode.club.bytecodeviewer.Settings.resetRecentFilesMenu(Settings.java:180) at the.bytecode.club.bytecodeviewer.BytecodeViewer.boot(BytecodeViewer.java:267) at the.bytecode.club.bytecodeviewer.BytecodeViewer.main(BytecodeViewer.java:232)

sphcode avatar Oct 07 '24 04:10 sphcode

Sorry about that, here's a snapshot with that fixed - https://github.com/Konloch/bytecode-viewer/actions/runs/11209173590

This snapshot might still have some more issues, so I will test it a bit more and try to resolve them

I'll also test out the GUI issue on my end, and see if I can replicate it on my end with the current version

Thank you for testing the snapshot, I will make sure to fix the issues I introduced with the last few updates

Konloch avatar Oct 07 '24 05:10 Konloch

Sorry about that, here's a snapshot with that fixed - https://github.com/Konloch/bytecode-viewer/actions/runs/11209173590

This snapshot might still have some more issues, so I will test it a bit more and try to resolve them

I'll also test out the GUI issue on my end, and see if I can replicate it on my end with the current version

Thank you for testing the snapshot, I will make sure to fix the issues I introduced with the last few updates

A fatal bug occurs instead of the minor one mentioned above. You can see them in the gif. bug

The Error logs may help. UnsolvedSymbolException{context='null', name='TestRule', cause='null'} at com.github.javaparser.ast.type.ClassOrInterfaceType.convertToUsage(ClassOrInterfaceType.java:358) at com.github.javaparser.symbolsolver.javaparsermodel.JavaParserFacade.convertToUsage(JavaParserFacade.java:648) at com.github.javaparser.symbolsolver.javaparsermodel.JavaParserFacade.convertToUsage(JavaParserFacade.java:659) at com.github.javaparser.symbolsolver.JavaSymbolSolver.toResolvedType(JavaSymbolSolver.java:433) at com.github.javaparser.ast.type.ClassOrInterfaceType.resolve(ClassOrInterfaceType.java:336) at the.bytecode.club.bytecodeviewer.resources.classcontainer.parser.visitors.MyVoidVisitor.visit(MyVoidVisitor.java:330) at com.github.javaparser.ast.type.ClassOrInterfaceType.accept(ClassOrInterfaceType.java:139) at com.github.javaparser.ast.visitor.VoidVisitorAdapter.lambda$visit$28(VoidVisitorAdapter.java:151) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at com.github.javaparser.ast.NodeList.forEach(NodeList.java:288) at com.github.javaparser.ast.visitor.VoidVisitorAdapter.visit(VoidVisitorAdapter.java:151) at the.bytecode.club.bytecodeviewer.resources.classcontainer.parser.visitors.MyVoidVisitor.visit(MyVoidVisitor.java:285) at com.github.javaparser.ast.body.ClassOrInterfaceDeclaration.accept(ClassOrInterfaceDeclaration.java:158) at com.github.javaparser.ast.visitor.VoidVisitorAdapter.lambda$visit$44(VoidVisitorAdapter.java:176) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at com.github.javaparser.ast.NodeList.forEach(NodeList.java:288) at com.github.javaparser.ast.visitor.VoidVisitorAdapter.visit(VoidVisitorAdapter.java:176) at com.github.javaparser.ast.CompilationUnit.accept(CompilationUnit.java:140) at the.bytecode.club.bytecodeviewer.resources.classcontainer.ClassFileContainer.parse(ClassFileContainer.java:74) at the.bytecode.club.bytecodeviewer.gui.util.BytecodeViewPanelUpdater.processDisplay(BytecodeViewPanelUpdater.java:122) at the.bytecode.club.bytecodeviewer.gui.util.BytecodeViewPanelUpdater.run(BytecodeViewPanelUpdater.java:174) at java.base/java.lang.Thread.run(Thread.java:831)

sphcode avatar Oct 07 '24 05:10 sphcode

Sorry about that, this issue is fixed in the latest snapshot - https://github.com/Konloch/bytecode-viewer/actions/runs/11226061866

Would you be able to test this out when you're able to, and let us know if there are any problems with this version? Thank you for all of your help so far.

Konloch avatar Oct 08 '24 00:10 Konloch

Sorry about that, this issue is fixed in the latest snapshot - https://github.com/Konloch/bytecode-viewer/actions/runs/11226061866

Would you be able to test this out when you're able to, and let us know if there are any problems with this version? Thank you for all of your help so far.

Both of the two bugs don't happen in the version. 👍

sphcode avatar Oct 08 '24 03:10 sphcode

Awesome to hear! Thanks for your help.

Bl3nd avatar Oct 08 '24 03:10 Bl3nd