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

MessageToJsonString() always seems to crash when linked statically to protobuf #9286

Closed
saai63 opened this issue Dec 7, 2021 · 4 comments
Closed
Assignees
Labels
c++ inactive Denotes the issue/PR has not seen activity in the last 90 days.

Comments

@saai63
Copy link

saai63 commented Dec 7, 2021

What version of protobuf and what language are you using?
Version: 3.19.0
Language: C++

What operating system (Linux, Windows, ...) and version?
Ubuntu 18.04

What runtime / compiler are you using (e.g., python version or gcc version)
7.5.0

What did you do?

  • I have a protobuf message read from a file.
  • I intend to convert the same to JSON
  • The executable links to protobuf (static library built from source)

What did you expect to see

  • I expect to see the message converted to JSON

What did you see instead?

  • The application crashed with the below backtrace

#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffbcb11a921 in __GI_abort () at abort.c:79
#2 0x00007ffbcb76f957 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffbcb775ae6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffbcb775b21 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffbcb775d54 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffbcb771a23 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x0000558f6fd71dd2 in google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* ()(), std::once_flag, google::protobuf::Metadata const&) ()
#8 0x0000558f6fdb0b69 in google::protobuf::util::MessageToJsonString(google::protobuf::Message const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >*, google::protobuf::util::JsonPrintOptions const&) ()
#9 0x0000558f6fcc25a5 in main ()

The conversion seems to work fine when I link protobuf as dynamic library

@elharo
Copy link
Contributor

elharo commented Dec 8, 2021

Thanks. We probably need a full reproducible test case to investigate this.

@saai63
Copy link
Author

saai63 commented Dec 29, 2021

Sorry for the delay in response.
I have posted the reproducible example here.
https://github.com/saai63/protobuf_to_geojson
Curiously, the crash has gone away now and I just see an exception

Copy link

github-actions bot commented Feb 1, 2024

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 inactive because the last activity was over 90 days ago.

@github-actions github-actions bot added the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Feb 1, 2024
Copy link

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 inactive label was added.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ inactive Denotes the issue/PR has not seen activity in the last 90 days.
Projects
None yet
Development

No branches or pull requests

4 participants