Crash in library table mutex when loading symbols
Description
There still seems to be a way to trigger a bad mutex situation / crash in library table loading (LIB_TABLE::findRow
):
6 libc++abi.dylib 0x18db250f4 std::__terminate(void (*)()) + 16
7 libc++abi.dylib 0x18db28348 __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 88
8 libc++abi.dylib 0x18db2828c __cxa_throw + 308
9 libc++.1.dylib 0x18daa6a28 std::__1::__throw_system_error(int, char const*) + 100
10 libc++.1.dylib 0x18da9a72c std::__1::mutex::lock() + 40
11 libc++.1.dylib 0x18da9e43c std::__1::__shared_mutex_base::lock_shared() + 44
12 _eeschema.kiface 0x168d8a048 LIB_TABLE::findRow(wxString const&, bool) const + 92
13 _eeschema.kiface 0x168a7fbb8 SYMBOL_LIB_TABLE::LoadSymbol(wxString const&, wxString const&) + 36
14 _eeschema.kiface 0x1680307c0 SYMBOL_LIB_TABLE::LoadSymbol(LIB_ID const&) + 64
15 _eeschema.kiface 0x1681d6068 SCH_IO_DATABASE::loadSymbolFromRow(wxString const&, DATABASE_LIB_TABLE const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::any, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::any>>> const&) + 372
16 _eeschema.kiface 0x1681d57ac SCH_IO_DATABASE::LoadSymbol(wxString const&, wxString const&, STRING_UTF8_MAP const*) + 2612
17 _eeschema.kiface 0x168a7fc64 SYMBOL_LIB_TABLE::LoadSymbol(wxString const&, wxString const&) + 208
18 _eeschema.kiface 0x1680307c0 SYMBOL_LIB_TABLE::LoadSymbol(LIB_ID const&) + 64
19 _eeschema.kiface 0x16899d91c SchGetLibSymbol(LIB_ID const&, SYMBOL_LIB_TABLE*, SYMBOL_LIB*, wxWindow*, bool) + 56
20 _eeschema.kiface 0x168b10c88 SCH_DRAWING_TOOLS::PlaceSymbol(TOOL_EVENT const&) + 2796
21 _eeschema.kiface 0x168e05668 COROUTINE<int, TOOL_EVENT const&>::callerStub(long) + 60
Steps to reproduce
Haven't found a reliable way yet.
KiCad Version
Application: KiCad Schematic Editor arm64 on arm64
Version: 8.0.2-25-gf15551a6b5, release build
Libraries:
wxWidgets 3.2.4
FreeType 2.13.2
HarfBuzz 8.3.0
FontConfig 2.15.0
Platform: macOS Sonoma Version 14.4.1 (Build 23E224), 64 bit, Little endian, wxMac
wxWidgets: 3.2.4 (wchar_t,wx containers)
Boost: 1.84.0
OCC: 7.7.2
Curl: 7.87.0
ngspice: 42
Compiler: Clang 14.0.3 with C++ ABI 1002
Build settings: