google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

Invalid code. java.lang.VerifyError: ... Attempt to split long or double on the stack #153

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create simple project in eclipse (or whereever) with the attached files. 
2. Try to run the test

What is the expected output? What do you see instead?
I expect the test to pass when run in junit. Instead I get this exception:
java.lang.VerifyError: (class: com/kolibrifx/domain/types/PriceTickData, 
method: DEFAULT_CONS_METHOD signature: ()V) Attempt to split long or double on 
the stack
    at com.kolibrifx.gwt.tests.TestPriceTickData.testPriceTickCreation(TestPriceTickData.java:20)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at com.googlecode.gwt.test.internal.runner.AbstractGwtRunner.run(AbstractGwtRunner.java:40)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

What version of the product are you using? On what operating system?
gwt-test-utils 0.39, gwt 2.4, junit 4.8.2, javassist 3.12.1.GA, slf4j 1.6.6.
Using OSX 10.7 (Lion), Eclipse Juno, 

Please provide any additional information below.

Original issue reported on code.google.com by s...@kolibrifx.com on 25 Jul 2012 at 2:24

Attachments:

GoogleCodeExporter commented 9 years ago
Forgot to add that I use jdk 7, but compile to 1.6 and do not use any java 7 
specialties.

Original comment by s...@kolibrifx.com on 26 Jul 2012 at 7:41

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 26 Jul 2012 at 8:24

GoogleCodeExporter commented 9 years ago
This is a very tricky one, related to javassist bytecode generation... I won't 
be able to do anything other than open an issue on javassist tracker.

What you could do (if acceptable) is to change your PriceTickData constructor 
to use primitive type class wrapper for your parameters : 

  public PriceTickData() {
      this(-1L, 0.0d, 0.0d, 0.0d, 0.0d, 0, 0);
   }

  public PriceTickData(final Long timestamp, final Double bid, final Double offer,
            final Double bidSize, final Double offerSize, final Integer pipUnits,
            final Integer status) { ... }

Original comment by gael.laz...@gmail.com on 26 Jul 2012 at 8:11

GoogleCodeExporter commented 9 years ago
Using the class versions of the primitive types would have been fine for 
client-code, but these are shared domain objects also used a lot on the server 
where we don't really want too much consing for each price tick.  But I will 
try to find some workarounds - thanks :-)

Original comment by s...@kolibrifx.com on 27 Jul 2012 at 8:17

GoogleCodeExporter commented 9 years ago
I think I have a similar problem which relates to XmlBeans and Saxon. Is there 
any workaround other than changing the xml processing library? I have tried to 
upgrade javassist to 3.17.0-GA, but it did not work. Could you point to related 
javassist issue? I would like to get to know something more about this problem 
while trying to solve it.

libs: xmlbeans 2.4.0, saxon 9.0, javassist 3.17.0-GA (same effect with 
3.15.0-GA)

java.lang.VerifyError: (class: net/sf/saxon/sort/IntHashMap, method: 
DEFAULT_CONS_METHOD signature: ()V) Attempt to split long or double on the stack
  at net.sf.saxon.type.BuiltInType.<clinit>(BuiltInType.java:21)
  at net.sf.saxon.type.BuiltInAtomicType.makeAtomicType(BuiltInAtomicType.java:1053)
  at net.sf.saxon.type.BuiltInAtomicType.init(BuiltInAtomicType.java:131)
  at net.sf.saxon.type.BuiltInAtomicType.<clinit>(BuiltInAtomicType.java:120)
  at net.sf.saxon.type.BuiltInListType.init(BuiltInListType.java:41)
  at net.sf.saxon.type.BuiltInListType.<clinit>(BuiltInListType.java:30)
  at net.sf.saxon.Configuration.init(Configuration.java:282)
  at net.sf.saxon.Configuration.<init>(Configuration.java:248)
  at net.sf.saxon.sxpath.XPathEvaluator.<init>(XPathEvaluator.java:42)
  at org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath.selectNodes(XBeansXPath.java:94)
  at org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath.selectPath(XBeansXPath.java:148)
  at org.apache.xmlbeans.impl.store.Path$DelegatePathImpl$DelegatePathEngine.next(Path.java:541)
  at org.apache.xmlbeans.impl.store.Cursor._toSelection(Cursor.java:931)
  at org.apache.xmlbeans.impl.store.Cursor._toNextSelection(Cursor.java:920)
  at org.apache.xmlbeans.impl.store.Cursor._hasNextSelection(Cursor.java:912)
  at org.apache.xmlbeans.impl.store.Cursor.hasNextSelection(Cursor.java:2652)
  at org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.java:464)
  at org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.java:446)

  [here is test method code which reads XmlBeans object successfully, and tries to find element by XmlBeans XPath]

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
  at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
  at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
  at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
  at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
  at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
  at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
  at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
  at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
  at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
  at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
  at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
  at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
  at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
  at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
  at com.googlecode.gwt.test.internal.junit.GwtBlockJUnit4ClassRunner.run(GwtBlockJUnit4ClassRunner.java:27)
  at com.googlecode.gwt.test.internal.junit.AbstractGwtRunner.run(AbstractGwtRunner.java:47)
  at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
  at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
  at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
  at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
  at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
  at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
  at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)

Original comment by marek.romanowski@gmail.com on 24 Nov 2012 at 9:33