Closed
Description
I'm getting Uncaught RuntimeError: invalid index into function table with the latest version 1.39.0, tried master as well. Also std::string seems to pick up some random garbage memory.
It happens when making calls to functions in static library targets create in cmake add_subdirectory, both of which are compiled with the cmake tool chain file that came with the sdk
I haven't been able to identify where went wrong.
Can confirm the same code works with 1.38.48.
wasm-0f0acda6-2498:1 Uncaught RuntimeError: invalid index into function table
at std::__2::__function::__policy_func<bool (int, nlohmann::detail::parser<nlohmann::basic_json<std::__2::map, std::__2::vector, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, bool, long long, unsigned long long, double, std::__2::allocator, nlohmann::adl_serializer> >::parse_event_t, nlohmann::basic_json<std::__2::map, std::__2::vector, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, bool, long long, unsigned long long, double, std::__2::allocator, nlohmann::adl_serializer>&)>::__policy_func(std::__2::__function::__policy_func<bool (int, nlohmann::detail::parser<nlohmann::basic_json<std::__2::map, std::__2::vector, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, bool, long long, unsigned long long, double, std::__2::allocator, nlohmann::adl_serializer> >::parse_event_t, nlohmann::basic_json<std::__2::map, std::__2::vector, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, bool, long long, unsigned long long, double, std::__2::allocator, nlohmann::adl_serializer>&)> const&) (wasm-function[2498]:0x682ee)
at std::__2::function<bool (int, nlohmann::detail::parser<nlohmann::basic_json<std::__2::map, std::__2::vector, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, bool, long long, unsigned long long, double, std::__2::allocator, nlohmann::adl_serializer> >::parse_event_t, nlohmann::basic_json<std::__2::map, std::__2::vector, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, bool, long long, unsigned long long, double, std::__2::allocator, nlohmann::adl_serializer>&)>::function(std::__2::function<bool (int, nlohmann::detail::parser<nlohmann::basic_json<std::__2::map, std::__2::vector, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, bool, long long, unsigned long long, double, std::__2::allocator, nlohmann::adl_serializer> >::parse_event_t, nlohmann::basic_json<std::__2::map, std::__2::vector, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, bool, long long, unsigned long long, double, std::__2::allocator, nlohmann::adl_serializer>&)> const&) (wasm-function[2032]:0x55961)
at nlohmann::basic_json<std::__2::map, std::__2::vector, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, bool, long long, unsigned long long, double, std::__2::allocator, nlohmann::adl_serializer>::parse(nlohmann::detail::input_adapter&&, std::__2::function<bool (int, nlohmann::detail::parser<nlohmann::basic_json<std::__2::map, std::__2::vector, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, bool, long long, unsigned long long, double, std::__2::allocator, nlohmann::adl_serializer> >::parse_event_t, nlohmann::basic_json<std::__2::map, std::__2::vector, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, bool, long long, unsigned long long, double, std::__2::allocator, nlohmann::adl_serializer>&)>, bool) (wasm-function[2009]:0x54615)
at exec_json(std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > const&) (wasm-function[2002]:0x53b61)
at _exec_json(std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >) (wasm-function[104]:0x6041)
at emscripten::internal::Invoker<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > >::invoke(std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > (*)(std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >), emscripten::internal::BindingType<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, void>::'unnamed'*) (wasm-function[109]:0x6246)
at dynCall_iii (wasm-function[14915]:0x2b5c80)
at Module.dynCall_iii (https://192.168.1.94:4443/gl_camera_web.js:8940:39)
at dynCall_iii_5 (eval at makeDynCaller (https://192.168.1.94:4443/gl_camera_web.js:5607:19), <anonymous>:2:12)
at Object.exec_json (eval at new_ (https://192.168.1.94:4443/gl_camera_web.js:5418:27), <anonymous>:6:10)
Metadata
Metadata
Assignees
Labels
No labels