Bug Report
- What is the issue you have?
Crash somtimes, not always
- Please describe the steps to reproduce the issue. Can you provide a small but working code example?
- main application uses 1 shared libraries a.so that uses another library b.so.
- "json" object J is instanciated by a.so
- J is passed by const reference to b.so
- What is the expected behavior?
passed json object J can be used throughout b.so
- And what is the actual behavior instead?
Sometimes it works, sometimes it crashes, ex:
0x00007ffff7b3bd24 in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::basic_json(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> const&) ()
I tried to pass the json object by copy instead but eventually it will crash elsewhere down the road.
gcc version 6.3.0 20170406 (Ubuntu 6.3.0-12ubuntu2)
- Did you use a released version of the library or the version from the
develop branch?
develop branch
Feature Request
- Describe the feature in as much detail as possible.
Right now the only way to work around the issue is to remove json from the shared library interface and just serialize/deserialize with string.
- Include sample usage where appropriate.
Bug Report
Crash somtimes, not always
passed json object J can be used throughout b.so
Sometimes it works, sometimes it crashes, ex:
0x00007ffff7b3bd24 in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::basic_json(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> const&) ()
I tried to pass the json object by copy instead but eventually it will crash elsewhere down the road.
gcc version 6.3.0 20170406 (Ubuntu 6.3.0-12ubuntu2)
developbranch?developbranchFeature Request
Right now the only way to work around the issue is to remove json from the shared library interface and just serialize/deserialize with string.