ITADN

Python unit test failure with Apple Clang

#311Closedkeceli 创建于 2023-07-16
K
kecelicommented
PluginPlay compiles with Apple Clang on Apple silicon (M1) and passed C++ unit tests without a problem. However, python unit tests throws `bad any cast` exception: ```c++ ....................Subprocess aborted***Exception: 0.35 sec ......................libc++abi: terminating due to uncaught exception of type std::bad_any_cast: bad any cast ``` Below is the backtrace: ```gdb (lldb) bt * thread #2, queue = 'com.apple.main-thread', stop reason = signal SIGABRT * frame #0: 0x000000018962c724 libsystem_kernel.dylib`__pthread_kill + 8 frame #1: 0x0000000189663c28 libsystem_pthread.dylib`pthread_kill + 288 frame #2: 0x0000000189571ae8 libsystem_c.dylib`abort + 180 frame #3: 0x000000018961cb84 libc++abi.dylib`abort_message + 132 frame #4: 0x000000018960c3b4 libc++abi.dylib`demangling_terminate_handler() + 320 frame #5: 0x00000001892e303c libobjc.A.dylib`_objc_terminate() + 160 frame #6: 0x000000018961bf48 libc++abi.dylib`std::__terminate(void (*)()) + 16 frame #7: 0x000000018961beec libc++abi.dylib`std::terminate() + 56 frame #8: 0x000000011c3f80f4 pluginplay.so`__clang_call_terminate + 12 frame #9: 0x000000011c4566d4 pluginplay.so`pluginplay::python::PythonWrapper::has_value(this=0x000000016fdfb398) const at python_wrapper.hpp:77:64 frame #10: 0x000000011c487b5c pluginplay.so`pybind11::object pluginplay::python::PythonWrapper::unwrap<pybind11::object>(this=0x000000016fdfb398) at python_wrapper.hpp:289:9 frame #11: 0x000000011c495608 pluginplay.so`pluginplay::export_module_input(this=0x0000600003001508, i=0x00006000000094a0)::$_3::operator()(pluginplay::ModuleInput&) const at export_module_input.cpp:57:54 frame #12: 0x000000011c4955b4 pluginplay.so`pybind11::object pybind11::detail::argument_loader<pluginplay::ModuleInput&>::call_impl<pybind11::object, pluginplay::export_module_input(this=0x000000016fdfb510, f=0x0000600003001508, (null)=std::__1::index_sequence<0UL> @ 0x000000016fdfb427, (null)=0x000000016fdfb446)::$_3&, 0ul, pybind11::detail::void_type>(pluginplay::export_module_input(pybind11::module_&)::$_3&, std::__1::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && at cast.h:1480:16 frame #13: 0x000000011c495480 pluginplay.so`std::__1::enable_if<!std::is_void<pybind11::object>::value, pybind11::object>::type pybind11::detail::argument_loader<pluginplay::ModuleInput&>::call<pybind11::object, pybind11::detail::void_type, pluginplay::export_module_input(this=0x000000016fdfb510, f=0x0000600003001508)::$_3&>(pluginplay::export_module_input(pybind11::module_&)::$_3&) && at cast.h:1448:42 frame #14: 0x000000011c495368 pluginplay.so`void pybind11::cpp_function::initialize<pluginplay::export_module_input(pybind11::module_&)::$_3, pybind11::object, pluginplay::ModuleInput&, pybind11::name, pybind11::is_method, pybind11::sibling>(this=0x000000016fdfbba0, call=0x000000016fdfbba0)::$_3&&, pybind11::object (*)(pluginplay::ModuleInput&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const at pybind11.h:254:56 frame #15: 0x000000011c495234 pluginplay.so`void pybind11::cpp_function::initialize<pluginplay::export_module_input(pybind11::module_&)::$_3, pybind11::object, pluginplay::ModuleInput&, pybind11::name, pybind11::is_method, pybind11::sibling>(call=0x000000016fdfbba0)::$_3&&, pybind11::object (*)(pluginplay::ModuleInput&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda'(pybind11::detail::function_call&)::__invoke(pybind11::detail::function_call&) at pybind11.h:224:21 frame #16: 0x000000011c4184dc pluginplay.so`pybind11::cpp_function::dispatcher(self=0x0000000102ae67f0, args_in=0x0000000102b32800, kwargs_in=0x0000000000000000) at pybind11.h:946:30 ``` I didn't investigate it further, I just wanted to report it for now.
关闭于 2024-05-03 0 条评论