-
Notifications
You must be signed in to change notification settings - Fork 246
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
list inside union: java.lang.VerifyError and "Error exists in the bytecode" #118
Comments
I'll write up a test case and see if I can reproduce and fix this. |
What version of the generator are you using? |
I'm using scrooge-gradle-plugin 0.5, which in turn brings in scrooge-generator 3.9.1, which I see only now is out of date. Does this not occur with newer versions of scrooge-generator? Thanks. |
I can't reproduce it with the latest code. |
I've updated my build script to use scrooge-generator 3.13.1 but am still seeing the issue. I've pushed the example code to https://github.com/fleminra/thrift-list-in-union-demo and am able to reproduce the problem on a few different server computers (Linux and Windows). You can use I suppose there must be some dependency version mismatch between what you're doing and I'm doing. I notice that:
Not sure if that's a problem. I tried rolling my own dependency back to 0.8.0, with no improvement. |
I think the libthrift version mismatch might be a possibility too. I can't get the example to run because I can't reach quannum.ssd.loral.com |
Ah, sorry, it's just a caching Maven server in this instance. Fixed. |
I can no reproduce this. Looking into it. |
Tracked this down to scala 2.10. If I drop the version down to 2.9.2, everything works. Not sure why. Still looking. |
Oh wait. I moved the libraries. I don't know how to change the scala compiler that gradle uses. If gradle is using the 2.9 compiler it's not going to work with the 2.10 libraries. Any ideas on what version gradle is using? |
Unfortunately all versions of scrooge-gradle-plugin depend on Scala 2.10.2, so I think that makes it hard to force Gradle to use Scala 2.9. I'm currently trying to distill down the simple command-lines to replicate what Gradle is doing for (1) scrooge-generator, (2) scalac, and (3) running the server. That way I can and control see the exact versions of everything. |
I've made two more commits to my repo:
Gradle has a "distTar" task that creates a standalone distribution of the server, such that the server can be run via a shell script (so that it's no longer running under the Gradle process). When the server is compiled with the Gradle Ant scalac, and executed via this "distTar", the problem still occurs. So it looks like the problem is in the Scala compilation phase. I'm still comparing Gradle's debug output between the non-working and working build steps. Still hard to say at this point where the bug lies. |
I'm encountering the same bug, and I also have a union with a list in it. Using scrooge 3.17, thrift 0.9.2, and sbt 13.6 Any updates? |
The example from the first comment works for me (I've modified https://github.com/twitter/finagle/tree/master/finagle-example to run it). Note that finagle uses libthrift 0.5.0. |
Thanks for replying. In summary I fixed my problem by upgrading to JDK version 1.8.0_25. I believe that scrooge was generating code that was hitting this bug https://issues.scala-lang.org/browse/SI-8645 And thus throwing a
I have more info if you are curious, but I believe the issue to be resolved now. Thanks. |
Great, thanks for digging into this. I'm closing the issue. |
The following compiles fine but has a runtime error when
f()
is invoked:The mere presence of a
list
inside theunion
causes this problem, even if the server code does not create aunion
that uses the field defined as thelist
.The error:
Versions:
Here's Server.scala:
I'm invoking it from CPython + Thrift 0.9.1.
Am I doing anything wrong? I'm somewhat new to Thrift.
Thanks!
The text was updated successfully, but these errors were encountered: