deathmarine / Luyten

An Open Source Java Decompiler Gui for Procyon
Other
5.01k stars 999 forks source link

java.lang.ClassCastException: com.strobel.assembler.metadata.CoreMetadataFactory$MethodSignature cannot be cast to com.strobel.assembler.metadata.MethodReference #199

Closed egold555 closed 5 years ago

egold555 commented 5 years ago

Got this exception when attempting to decompile a class.

java.lang.ClassCastException: com.strobel.assembler.metadata.CoreMetadataFactory$MethodSignature cannot be cast to com.strobel.assembler.metadata.MethodReference at com.strobel.decompiler.languages.java.utilities.TypeUtilities.getExpectedTypeByParent(TypeUtilities.java:365) at com.strobel.decompiler.languages.java.utilities.RedundantCastUtility$IsRedundantVisitor.visitCastExpression(RedundantCastUtility.java:344) at com.strobel.decompiler.languages.java.utilities.RedundantCastUtility$IsRedundantVisitor.visitCastExpression(RedundantCastUtility.java:167) at com.strobel.decompiler.languages.java.ast.CastExpression.acceptVisitor(CastExpression.java:55) at com.strobel.decompiler.languages.java.utilities.RedundantCastUtility.isCastRedundant(RedundantCastUtility.java:67) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.visitCastExpression(InsertNecessaryConversionsTransform.java:80) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.visitCastExpression(InsertNecessaryConversionsTransform.java:37) at com.strobel.decompiler.languages.java.ast.CastExpression.acceptVisitor(CastExpression.java:55) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitCastExpression(DepthFirstAstVisitor.java:279) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.visitCastExpression(InsertNecessaryConversionsTransform.java:59) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.visitCastExpression(InsertNecessaryConversionsTransform.java:37) at com.strobel.decompiler.languages.java.ast.CastExpression.acceptVisitor(CastExpression.java:55) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitReturnStatement(DepthFirstAstVisitor.java:149) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.visitReturnStatement(InsertNecessaryConversionsTransform.java:179) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.visitReturnStatement(InsertNecessaryConversionsTransform.java:37) at com.strobel.decompiler.languages.java.ast.ReturnStatement.acceptVisitor(ReturnStatement.java:57) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.recurse(InsertNecessaryConversionsTransform.java:576) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.addCastForAssignment(InsertNecessaryConversionsTransform.java:336) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.visitReturnStatement(InsertNecessaryConversionsTransform.java:222) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.visitReturnStatement(InsertNecessaryConversionsTransform.java:37) at com.strobel.decompiler.languages.java.ast.ReturnStatement.acceptVisitor(ReturnStatement.java:57) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.recurse(InsertNecessaryConversionsTransform.java:576) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.addCastForAssignment(InsertNecessaryConversionsTransform.java:336) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.visitReturnStatement(InsertNecessaryConversionsTransform.java:222) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.visitReturnStatement(InsertNecessaryConversionsTransform.java:37) at com.strobel.decompiler.languages.java.ast.ReturnStatement.acceptVisitor(ReturnStatement.java:57) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitBlockStatement(DepthFirstAstVisitor.java:104) at com.strobel.decompiler.languages.java.ast.BlockStatement.acceptVisitor(BlockStatement.java:72) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitLambdaExpression(DepthFirstAstVisitor.java:384) at com.strobel.decompiler.languages.java.ast.LambdaExpression.acceptVisitor(LambdaExpression.java:49) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitInvocationExpression(DepthFirstAstVisitor.java:59) at com.strobel.decompiler.languages.java.ast.InvocationExpression.acceptVisitor(InvocationExpression.java:78) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitAssignmentExpression(DepthFirstAstVisitor.java:329) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.visitAssignmentExpression(InsertNecessaryConversionsTransform.java:159) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.visitAssignmentExpression(InsertNecessaryConversionsTransform.java:37) at com.strobel.decompiler.languages.java.ast.AssignmentExpression.acceptVisitor(AssignmentExpression.java:88) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitExpressionStatement(DepthFirstAstVisitor.java:109) at com.strobel.decompiler.languages.java.ast.ExpressionStatement.acceptVisitor(ExpressionStatement.java:47) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitBlockStatement(DepthFirstAstVisitor.java:104) at com.strobel.decompiler.languages.java.ast.BlockStatement.acceptVisitor(BlockStatement.java:72) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitIfElseStatement(DepthFirstAstVisitor.java:134) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.visitIfElseStatement(InsertNecessaryConversionsTransform.java:487) at com.strobel.decompiler.languages.java.ast.transforms.InsertNecessaryConversionsTransform.visitIfElseStatement(InsertNecessaryConversionsTransform.java:37) at com.strobel.decompiler.languages.java.ast.IfElseStatement.acceptVisitor(IfElseStatement.java:83) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitBlockStatement(DepthFirstAstVisitor.java:104) at com.strobel.decompiler.languages.java.ast.BlockStatement.acceptVisitor(BlockStatement.java:72) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitLambdaExpression(DepthFirstAstVisitor.java:384) at com.strobel.decompiler.languages.java.ast.LambdaExpression.acceptVisitor(LambdaExpression.java:49) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitInvocationExpression(DepthFirstAstVisitor.java:59) at com.strobel.decompiler.languages.java.ast.InvocationExpression.acceptVisitor(InvocationExpression.java:78) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitExpressionStatement(DepthFirstAstVisitor.java:109) at com.strobel.decompiler.languages.java.ast.ExpressionStatement.acceptVisitor(ExpressionStatement.java:47) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitBlockStatement(DepthFirstAstVisitor.java:104) at com.strobel.decompiler.languages.java.ast.BlockStatement.acceptVisitor(BlockStatement.java:72) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitMethodDeclaration(DepthFirstAstVisitor.java:214) at com.strobel.decompiler.languages.java.ast.ContextTrackingVisitor.visitMethodDeclaration(ContextTrackingVisitor.java:64) at com.strobel.decompiler.languages.java.ast.ContextTrackingVisitor.visitMethodDeclaration(ContextTrackingVisitor.java:28) at com.strobel.decompiler.languages.java.ast.MethodDeclaration.acceptVisitor(MethodDeclaration.java:85) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitTypeDeclaration(DepthFirstAstVisitor.java:244) at com.strobel.decompiler.languages.java.ast.ContextTrackingVisitor.visitTypeDeclaration(ContextTrackingVisitor.java:52) at com.strobel.decompiler.languages.java.ast.ContextTrackingVisitor.visitTypeDeclaration(ContextTrackingVisitor.java:28) at com.strobel.decompiler.languages.java.ast.TypeDeclaration.acceptVisitor(TypeDeclaration.java:90) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitChildren(DepthFirstAstVisitor.java:41) at com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor.visitCompilationUnit(DepthFirstAstVisitor.java:249) at com.strobel.decompiler.languages.java.ast.CompilationUnit.acceptVisitor(CompilationUnit.java:81) at com.strobel.decompiler.languages.java.ast.ContextTrackingVisitor.run(ContextTrackingVisitor.java:84) at com.strobel.decompiler.languages.java.ast.transforms.TransformationPipeline.runTransformationsUntil(TransformationPipeline.java:93) at com.strobel.decompiler.languages.java.ast.AstBuilder.runTransformations(AstBuilder.java:119) at com.strobel.decompiler.languages.java.JavaLanguage.runTransforms(JavaLanguage.java:97) at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:72) at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59) at us.deathmarine.luyten.DecompilerLinkProvider.generateContent(DecompilerLinkProvider.java:97) at us.deathmarine.luyten.OpenFile.decompileWithNavigationLinks(OpenFile.java:494) at us.deathmarine.luyten.OpenFile.decompile(OpenFile.java:467) at us.deathmarine.luyten.Model.extractClassToTextPane(Model.java:420) at us.deathmarine.luyten.Model$10.run(Model.java:1014) at java.lang.Thread.run(Unknown Source)

deathmarine commented 5 years ago

Procyon errors are being closed.