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

Crash when calling dpp::cluster::threads_get_public_archived #1269

Closed
braindigitalis opened this issue Oct 12, 2024 · 0 comments · Fixed by #1268
Closed

Crash when calling dpp::cluster::threads_get_public_archived #1269

braindigitalis opened this issue Oct 12, 2024 · 0 comments · Fixed by #1268
Assignees
Labels
bug Something isn't working

Comments

@braindigitalis
Copy link
Contributor

Describe the bug
Calling threads_get_public_archived causes a crash due to unhandled nlohmann::json exception.

terminate called after throwing an instance of 'nlohmann::json_abi_v3_11_3::detail::type_error'
  what():  [json.exception.type_error.305] cannot use operator[] with a string argument with boolean
Aborted (core dumped)

To Reproduce
Call the function

Expected behavior
function works as expected

System Details:

  • OS: Reported on AUR version of DPP, 10.0.29

Additional context

#0  0x00007ffff68a53f4 in ?? () from /usr/lib/libc.so.6
#1  0x00007ffff684c120 in raise () from /usr/lib/libc.so.6
#2  0x00007ffff68334c3 in abort () from /usr/lib/libc.so.6
#3  0x00007ffff6a97b2c in __gnu_cxx::__verbose_terminate_handler () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/vterminate.cc:95
#4  0x00007ffff6aadf3a in __cxxabiv1::__terminate (handler=<optimized out>) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48
#5  0x00007ffff6a9752a in std::terminate () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:58
#6  0x00007ffff6aae1f6 in __cxxabiv1::__cxa_throw (obj=<optimized out>, tinfo=0x5555555dac10 <typeinfo for nlohmann::json_abi_v3_11_3::detail::type_error>, dest=0x7ffff7b8e180 <nlohmann::json_abi_v3_11_3::detail::type_error::~type_error()>) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_throw.cc:98
#7  0x00007ffff7b1a04f in nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[] (this=this@entry=0x7fffe0003c00, key="thread_metadata") at /usr/include/c++/14.2.1/bits/allocator.h:182
#8  0x00007ffff7b8b48a in nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[]<char const> (this=0x7fffe0003c00, key=<optimized out>) at /usr/include/nlohmann/json.hpp:2159
#9  0x00007ffff7cf719a in dpp::thread::fill_from_json_impl (this=0x7fffeebff050, j=0x7fffe0003c00) at /usr/src/debug/dpp/DPP-10.0.29/src/dpp/thread.cpp:47
#10 0x00007ffff7c13a36 in dpp::rest_request_list<dpp::thread>(dpp::cluster*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, dpp::http_method, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void (dpp::confirmation_callback_t const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::{lambda(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, dpp::http_request_completion_t const&)#1}::operator()(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, dpp::http_request_completion_t const&) const () at /usr/src/debug/dpp/DPP-10.0.29/library/../include/dpp/json_interface.h:45
#11 0x00007ffff7ba4696 in std::function<void (nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, dpp::http_request_completion_t const&)>::operator()(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, dpp::http_request_completion_t const&) const (this=0x7fffdc01d6a0, __args#0=..., __args#1=...) at /usr/include/c++/14.2.1/bits/std_function.h:591
#12 operator() (__closure=0x7fffdc01d680, rv=...) at /usr/src/debug/dpp/DPP-10.0.29/src/dpp/cluster.cpp:337
#13 0x00007ffff7bb2b59 in std::__invoke_impl<void, dpp::cluster::post_rest(const std::string&, const std::string&, const std::string&, dpp::http_method, const std::string&, dpp::json_encode_t, const std::string&, const std::string&, const std::string&, const std::string&)::<lambda(dpp::http_request_completion_t)>&, const dpp::http_request_completion_t&> (__f=...) at /usr/include/c++/14.2.1/bits/invoke.h:61
#14 std::__invoke_r<void, dpp::cluster::post_rest(const std::string&, const std::string&, const std::string&, dpp::http_method, const std::string&, dpp::json_encode_t, const std::string&, const std::string&, const std::string&, const std::string&)::<lambda(dpp::http_request_completion_t)>&, const dpp::http_request_completion_t&> (__fn=...) at /usr/include/c++/14.2.1/bits/invoke.h:111
#15 std::_Function_handler<void(const dpp::http_request_completion_t&), dpp::cluster::post_rest(const std::string&, const std::string&, const std::string&, dpp::http_method, const std::string&, dpp::json_encode_t, const std::string&, const std::string&, const std::string&, const std::string&)::<lambda(dpp::http_request_completion_t)> >::_M_invoke(const std::_Any_data &, const dpp::http_request_completion_t &) (__functor=..., __args#0=...) at /usr/include/c++/14.2.1/bits/std_function.h:290
#16 0x00007ffff7ce4b3a in dpp::request_queue::out_loop (this=0x5555555f88c0) at /usr/src/debug/dpp/DPP-10.0.29/src/dpp/queues.cpp:370
#17 0x00007ffff6ae1c34 in std::execute_native_thread_routine (__p=0x5555555faac0) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104
#18 0x00007ffff68a339d in ?? () from /usr/lib/libc.so.6
#19 0x00007ffff692849c in ?? () from /usr/lib/libc.so.6
@braindigitalis braindigitalis added the bug Something isn't working label Oct 12, 2024
@braindigitalis braindigitalis self-assigned this Oct 12, 2024
@braindigitalis braindigitalis linked a pull request Oct 12, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants