-
Notifications
You must be signed in to change notification settings - Fork 186
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
IllegalArgumentException in OpcodeStack.constantToInt #125
Comments
Please provide more context (Java version used to run FB, which JLS compilation level was used for Mt101MultibankingWorkflowTest etc), and please test first with the latest snapshot from https://github.com/findbugsproject/findbugs/releases/tag/3.1.0_preview2. |
Thank you for the quick response. |
Can you please attach the stack trace from the FB snapshot and also strip down the code from Mt101MultibankingWorkflowTest.testMultibankingOkWithMultipleASeqs() to a single reproducible test case? |
Attached the new stack trace. As to stripping down the code, I have not yet succeeded to isolate the problem. However, the code makes use of anonymous code blocks to restrict variable scope and removing these is a way to avoid the exception, at the cost of changing the semantics of the method (as now variables are reused instead of redefined). |
This is what appears to be a minimal test case. |
I am wondering, iloveeclipse, whether you have had time to look into the issue? Is this at all the right place for bug reports or should I go to https://sourceforge.net/p/findbugs/bugs? |
This is the right place, but I'm the wrong owner for this :-) |
Can I do anything to address the issue to the right owner? The problem still persists in our production environment. |
Currently there seem to be no interested developers in FB team working on this issue. If you want to get this bug fixed, you have to debug & understand FB code by yourself. Any patches are welcome of course :-) |
This project continues development in a new home: https://github.com/spotbugs/spotbugs/ Please do not open new issues here anymore! |
Using findbugs-3.0.1, we run into the following situation during analysis:
[findbugs] Executing findbugs FindBugsTask from ant task [findbugs] Running FindBugs... [findbugs] The following errors occurred during analysis: [findbugs] Error processing2 < I, 1 >iadd< Ljava/lang/String;, "", r4 > @ 706 in workflow.fileupload.swift.mt101.Mt101MultibankingWorkflowTest.testMultibankingOkWithMultipleASeqs : ()V [findbugs] java.lang.IllegalArgumentException: [findbugs] At edu.umd.cs.findbugs.OpcodeStack.constantToInt(OpcodeStack.java:2179) [findbugs] At edu.umd.cs.findbugs.OpcodeStack.pushByIntMath(OpcodeStack.java:3198) [findbugs] At edu.umd.cs.findbugs.OpcodeStack.sawOpcode(OpcodeStack.java:1644) [findbugs] At edu.umd.cs.findbugs.OpcodeStack$JumpInfoFactory$JumpStackComputation.sawOpcode(OpcodeStack.java:2846) [findbugs] At edu.umd.cs.findbugs.visitclass.DismantleBytecode.visit(DismantleBytecode.java:883) [findbugs] At edu.umd.cs.findbugs.visitclass.BetterVisitor.visitCode(BetterVisitor.java:218) [findbugs] At edu.umd.cs.findbugs.visitclass.PreorderVisitor.visitCode(PreorderVisitor.java:235) [findbugs] At edu.umd.cs.findbugs.OpcodeStack$JumpInfoFactory$JumpStackComputation.visitCode(OpcodeStack.java:2832) [findbugs] At org.apache.bcel.classfile.Code.accept(Code.java:135) [findbugs] At edu.umd.cs.findbugs.visitclass.PreorderVisitor.doVisitMethod(PreorderVisitor.java:307) [findbugs] At edu.umd.cs.findbugs.OpcodeStack$JumpInfoFactory.computeJumpInfo(OpcodeStack.java:2876) [findbugs] At edu.umd.cs.findbugs.OpcodeStack$JumpInfoFactory.analyze(OpcodeStack.java:2806) [findbugs] At edu.umd.cs.findbugs.OpcodeStack$JumpInfoFactory.analyze(OpcodeStack.java:2789) [findbugs] At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.analyzeMethod(AnalysisCache.java:369) [findbugs] At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getMethodAnalysis(AnalysisCache.java:322) [findbugs] At edu.umd.cs.findbugs.OpcodeStack.getJumpInfo(OpcodeStack.java:3007) [findbugs] At edu.umd.cs.findbugs.OpcodeStack.resetForMethodEntry(OpcodeStack.java:2978) [findbugs] At edu.umd.cs.findbugs.bcel.OpcodeStackDetector.visitCode(OpcodeStackDetector.java:62) [findbugs] At org.apache.bcel.classfile.Code.accept(Code.java:135) [findbugs] At edu.umd.cs.findbugs.visitclass.PreorderVisitor.doVisitMethod(PreorderVisitor.java:307) [findbugs] At edu.umd.cs.findbugs.visitclass.PreorderVisitor.visitJavaClass(PreorderVisitor.java:395) [findbugs] At org.apache.bcel.classfile.JavaClass.accept(JavaClass.java:215) [findbugs] At edu.umd.cs.findbugs.BytecodeScanningDetector.visitClassContext(BytecodeScanningDetector.java:38) [findbugs] At edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:76) [findbugs] At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1089) [findbugs] At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:283) [findbugs] At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:402) [findbugs] At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1200) [findbugs] Error processing2 < I, 1 >iadd< Ljava/lang/String;, "", r4 > @ 706 in workflow.fileupload.swift.mt101.Mt101MultibankingWorkflowTest.testMultibankingOkWithMultipleASeqs : ()V [findbugs] java.lang.IllegalArgumentException: [findbugs] At edu.umd.cs.findbugs.OpcodeStack.constantToInt(OpcodeStack.java:2179) [findbugs] At edu.umd.cs.findbugs.OpcodeStack.pushByIntMath(OpcodeStack.java:3198) [findbugs] At edu.umd.cs.findbugs.OpcodeStack.sawOpcode(OpcodeStack.java:1644) [findbugs] At edu.umd.cs.findbugs.OpcodeStack$JumpInfoFactory$JumpStackComputation.sawOpcode(OpcodeStack.java:2846) [findbugs] At edu.umd.cs.findbugs.visitclass.DismantleBytecode.visit(DismantleBytecode.java:883) [findbugs] At edu.umd.cs.findbugs.visitclass.BetterVisitor.visitCode(BetterVisitor.java:218) [findbugs] At edu.umd.cs.findbugs.visitclass.PreorderVisitor.visitCode(PreorderVisitor.java:235) [findbugs] At edu.umd.cs.findbugs.OpcodeStack$JumpInfoFactory$JumpStackComputation.visitCode(OpcodeStack.java:2832) [findbugs] At org.apache.bcel.classfile.Code.accept(Code.java:135) [findbugs] At edu.umd.cs.findbugs.visitclass.PreorderVisitor.doVisitMethod(PreorderVisitor.java:307) [findbugs] At edu.umd.cs.findbugs.OpcodeStack$JumpInfoFactory.computeJumpInfo(OpcodeStack.java:2876) [findbugs] At edu.umd.cs.findbugs.OpcodeStack$JumpInfoFactory.analyze(OpcodeStack.java:2806) [findbugs] At edu.umd.cs.findbugs.OpcodeStack$JumpInfoFactory.analyze(OpcodeStack.java:2789) [findbugs] At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.analyzeMethod(AnalysisCache.java:369) [findbugs] At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getMethodAnalysis(AnalysisCache.java:322) [findbugs] At edu.umd.cs.findbugs.OpcodeStack.getJumpInfo(OpcodeStack.java:3007) [findbugs] At edu.umd.cs.findbugs.OpcodeStack.resetForMethodEntry(OpcodeStack.java:2978) [findbugs] At edu.umd.cs.findbugs.bcel.OpcodeStackDetector.visitCode(OpcodeStackDetector.java:62) [findbugs] At org.apache.bcel.classfile.Code.accept(Code.java:135) [findbugs] At edu.umd.cs.findbugs.visitclass.PreorderVisitor.doVisitMethod(PreorderVisitor.java:307) [findbugs] At edu.umd.cs.findbugs.visitclass.PreorderVisitor.visitJavaClass(PreorderVisitor.java:395) [findbugs] At org.apache.bcel.classfile.JavaClass.accept(JavaClass.java:215) [findbugs] At edu.umd.cs.findbugs.BytecodeScanningDetector.visitClassContext(BytecodeScanningDetector.java:38) [findbugs] At edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:76) [findbugs] At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1089) [findbugs] At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:283) [findbugs] At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:402) [findbugs] At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1200) [findbugs] [findbugs] Calculating exit code... [findbugs] Exit code set to: 0
The text was updated successfully, but these errors were encountered: