Skip to content
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

java.lang.VerifyError: Inconsistent stack height #203

Closed
scabug opened this issue Oct 23, 2007 · 4 comments
Closed

java.lang.VerifyError: Inconsistent stack height #203

scabug opened this issue Oct 23, 2007 · 4 comments

Comments

@scabug
Copy link

scabug commented Oct 23, 2007

With Scala 2.6.0-final using Java 6u3, the following code

object Test extends Application {
  for (i <- 0 until 10) {
    "foo" match {
      case "bar" => ()
      case _ => null
    }
  }
}

generates the following stack trace:

scala Test
java.lang.VerifyError: (class: Test$$$$anonfun$$0, method: apply signature: (I)V) Inconsistent stack height 1 != 0
        at Test$$.<init>(t.scala:2)
        at Test$$.<clinit>(t.scala)
        at Test.main(t.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at scala.tools.nsc.ObjectRunner$$$$anonfun$$0.apply(ObjectRunner.scala:75)
        at scala.tools.nsc.ObjectRunner$$.withContextClassLoader(ObjectRunner.scala:49)
        at scala.tools.nsc.ObjectRunner$$.run(ObjectRunner.scala:74)
        at scala.tools.nsc.MainGenericRunner$$.main(MainGenericRunner.scala:154)
        at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

It appears that the for loop is needed to get the exception.

@scabug
Copy link
Author

scabug commented Oct 23, 2007

Imported From: https://issues.scala-lang.org/browse/SI-203?orig=1
Reporter: @blair

@scabug
Copy link
Author

scabug commented Oct 24, 2007

@dragos said:
This is fixed in the trunk, it might have had the same cause as ticket #88.

@scabug
Copy link
Author

scabug commented Oct 24, 2007

@blair said:
Thanks, I confirmed that trunk r13141 works fine.

Thanks,
Blair

@scabug
Copy link
Author

scabug commented Jan 14, 2009

@odersky said:
Milestone 2.6.1 deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant