Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0
-
Groovy Version: 2.0.0 JVM: 1.7.0_05 Vendor: Oracle Corporation OS: Linux
CentOS release 6.3 (Final) x86_64
CentOS release 5.8 (Final) x86_64
Description
Hello,
I am trying to build an application and I am getting some âInconsistent stack heightâ errors, I donât really know if itâs an error in the libraries I am using or a Groovy bug.
I have managed the reproduce the error with the minimum code and I have also attached all the needed files to reproduce the error.
Note:
- We donât get the Verify Error if we use âimport staticâ and change âmsg?.â with âmsg.â
- We donât get the Verify Error if we use âimportâ and with âmsg?.â
- We donât get the Verify Error if we run the code with @TypeChecked
import groovy.transform.CompileStatic import groovy.transform.TypeChecked import com.hp.openview.ib.api.jopc.JOpcServerMessage import com.hp.openview.ib.api.jopc.JOpcMessage import static com.hp.openview.ib.api.jopc.JOpcHelper.* // Uncomment for example VerifyError and Works //import com.hp.openview.ib.api.jopc.JOpcHelper // Uncomment for example Works2 //@TypeChecked // All the examples work is we use TypeChecked instead of CompileStatic @CompileStatic class ErrorReproduction { JOpcServerMessage msg ErrorReproduction() { String VerifyError = long2EventType(msg?.getEventFlag()) //String Works = long2EventType(msg.getEventFlag()) // This work if we remove the "?" //String Works2 = JOpcHelper.long2EventType(msg?.getEventFlag()) // This work if we dont use the "import static" } static void main(String[] args) { ErrorReproduction m = new ErrorReproduction() } }
Caught: java.lang.VerifyError: (class: ErrorReproduction, method: <init> signature: ()V) Inconsistent stack height 1 != 2 java.lang.VerifyError: (class: ErrorReproduction, method: <init> signature: ()V) Inconsistent stack height 1 != 2