-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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: Bad type on operand stack after migrating #16398
Comments
Probably the Protobuf runtime needs to be updated as well in addition to the Java gencode? Note that we removed GeneratedMessageV3 in the v26.0 release, so that might be what |
I believe I have updated the Protobuf runtime on both, though? CMake points to this on the C++ project side: and running so that's updated to 26.1. and on the macOS Java side: Decompiling the Java jar shows the 4.26.1 dependency in the "shaded" package. so I'm not sure what else to check |
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment. This issue is labeled |
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it. This issue was closed and archived because there has been no new activity in the 14 days since the |
Migrating my project from 3.26.3 to 4.26.1
What version of protobuf and what language are you using?
C++ - Ubuntu 22.04
5.26.1 libprotoc 26.1
~/Desktop$ protoc --version
libprotoc 26.1
Sending protobuf message to:
Java - macOS
Java 4.26.1 libprotoc 26.1
Desktop % protoc --version
libprotoc 26.1
What operating system (Linux, Windows, ...) and version?
Linux - C++
macOS - Java
What runtime / compiler are you using (e.g., python version or gcc version)
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
CMake?
brew protobuf 26.1
What did you do?
Sending a message from C++ to Java that contains a timestamp? causes the following error in Java console
What did you expect to see
It works correctly
What did you see instead?
The error above
Anything else we should know about your project / environment
I found this following issue (googleapis/google-cloud-java#1239) which led me to believe it was a runtime/compiler mismatch. However, I cannot find anything on either systems that makes me believe that. The two created files that are in the C++ project has
Protobuf C++ Version: 5.26.1
in the heading. On the Java side, the generated class has Protobuf Java Version: 4.26.1 in the heading. Both C++/Java are compiled with libprotoc 26.1.Further verification:
Decompiling the Java jar shows the 4.26.1 dependency in the "shaded" package
Viewing the CMakeCache.txt on the C++ project shows
//The directory containing a CMake configuration file for Protobuf.
Protobuf_DIR:PATH=/usr/local/lib/cmake/protobuf
and running
cat protobuf-config-version.cmake
in that directory showsset(PACKAGE_VERSION "26.1.0")
and echo'ing Protobuf_VERSION in cmake
message(STATUS "Using protobuf version: ${Protobuf_VERSION}")
Prints this:
Using protobuf version: 26.1.0
Printing the protobuf version inside the program at runtime:
std::cout << "Protocol Buffers version: " << GOOGLE_PROTOBUF_VERSION << std::endl;
prints
Protocol Buffers version: 5026001
The text was updated successfully, but these errors were encountered: