KiCad crashes on consecutively Change Symbol with different pin multitude
Description
Changing a symbol, two times in a row and with different multitude of pins, crashes Schematic Editor.
Mint is not supported but this issue informs in case it affects others.
Steps to reproduce
In Schematic Editor open pic prog demo project
- Enter
pic_sockets
sheet and locateP2
socket at top right with valueSUPP28
- Right click on a connected connector symbol and select
Change Symbol
from the context menu - Change the
New library identifier
from iepic_programmer_schlib:SUPP28
topic_programmer_schlib:SUPP40
- Click
Change
, don't have to close the dialog - Change the
New library identifier
again and backwards this timepic_programmer_schlib:SUPP40
topic_programmer_schlib:SUPP28
- Click
Change
->crash
KiCad v8 (current head):
Assertion from KiCad:
ASSERT INFO:
/home/aris-kimi/swdev/kicad/eeschema/sch_pin.cpp(299): assert ""m_libPin"" failed in IsGlobalPower().
BACKTRACE:
[1] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[2] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[3] wxEvtHandler::TryHereOnly(wxEvent&)
[4] wxEvtHandler::ProcessEventLocally(wxEvent&)
[5] wxEvtHandler::ProcessEvent(wxEvent&)
[6] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[7] g_signal_emit_valist
[8] g_signal_emit
[9] g_signal_emit_valist
[10] g_signal_emit
[11] g_signal_emit_valist
[12] g_signal_emit
[13] g_cclosure_marshal_VOID__BOXEDv
[14] g_signal_emit_valist
[15] g_signal_emit
[16] gtk_event_controller_handle_event
[17] g_closure_invoke
[18] g_signal_emit_valist
[19] g_signal_emit
[20] gtk_main_do_event
[21] g_main_context_dispatch
[22] g_main_loop_run
[23] gtk_main
[24] wxGUIEventLoop::DoRun()
[25] wxEventLoopBase::Run()
[26] make_fcontext
GDB backtrace:
Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ()
#1 0x00007fffbf503859 in SCH_ITEM::Connection(SCH_SHEET_PATH const*) const () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#2 0x00007fffbf32ece0 in CONNECTION_SUBGRAPH::ResolveDrivers(bool) () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#3 0x00007fffbf332052 in CONNECTION_GRAPH::ExtractAffectedItems(std::set<SCH_ITEM*, std::less<SCH_ITEM*>, std::allocator<SCH_ITEM*> > const&)::{lambda(SCH_ITEM*)#1}::operator()(SCH_ITEM*) const ()
at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#4 0x00007fffbf332ed6 in CONNECTION_GRAPH::ExtractAffectedItems(std::set<SCH_ITEM*, std::less<SCH_ITEM*>, std::allocator<SCH_ITEM*> > const&) () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#5 0x00007fffbf4dffe9 in SCH_EDIT_FRAME::RecalculateConnections(SCH_COMMIT*, SCH_CLEANUP_FLAGS) () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#6 0x00007fffbf4c8c1e in SCH_COMMIT::pushSchEdit(wxString const&, int) () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#7 0x00007fffbf4c8ed0 in SCH_COMMIT::Push(wxString const&, int) () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#8 0x00007fffbe3dd8b2 in DIALOG_CHANGE_SYMBOLS::onOkButtonClicked(wxCommandEvent&) () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#9 0x00007ffff738a3d1 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () at /usr/local/lib/libwx_baseu-3.2.so.0
#10 0x00007ffff738a86e in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () at /usr/local/lib/libwx_baseu-3.2.so.0
#11 0x00007ffff738abf4 in wxEvtHandler::TryHereOnly(wxEvent&) () at /usr/local/lib/libwx_baseu-3.2.so.0
#12 0x00007ffff738ac9f in wxEvtHandler::ProcessEventLocally(wxEvent&) () at /usr/local/lib/libwx_baseu-3.2.so.0
#13 0x00007ffff738ada1 in wxEvtHandler::ProcessEvent(wxEvent&) () at /usr/local/lib/libwx_baseu-3.2.so.0
#14 0x00007ffff738c34b in wxEvtHandler::SafelyProcessEvent(wxEvent&) () at /usr/local/lib/libwx_baseu-3.2.so.0
#15 0x00007ffff78a2c92 in wxgtk_button_clicked_callback () at /usr/local/lib/libwx_gtk3u_core-3.2.so.0
#16 0x00007ffff4e7fa56 in () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff4e9eb48 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007ffff4e9f0f3 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007ffff54b418e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#20 0x00007ffff54b41f8 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#21 0x00007ffff4e7fa56 in () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007ffff4e9eb48 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#23 0x00007ffff4e9f0f3 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007ffff54b2634 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#25 0x00007ffff5763861 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#26 0x00007ffff4e7fa56 in () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#27 0x00007ffff4e9eb48 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#28 0x00007ffff4e9f0f3 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#29 0x00007ffff557ae0c in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#30 0x00007ffff4e82c56 in g_cclosure_marshal_VOID__BOXEDv () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#31 0x00007ffff4e7fa56 in () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#32 0x00007ffff4e9eb48 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#33 0x00007ffff4e9f0f3 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#34 0x00007ffff5577e52 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#35 0x00007ffff557949b in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#36 0x00007ffff557c486 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#37 0x00007ffff55439f0 in gtk_event_controller_handle_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#38 0x00007ffff5705efd in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#39 0x00007ffff575d27b in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#40 0x00007ffff4e7f708 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#41 0x00007ffff4e92f96 in () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#42 0x00007ffff4e9e47d in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#43 0x00007ffff4e9f0f3 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--bt
#44 0x00007ffff57079b3 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#45 0x00007ffff55c2ed8 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#46 0x00007ffff55c518b in gtk_main_do_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#47 0x00007ffff52adf69 in () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#48 0x00007ffff52e10f6 in () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#49 0x00007ffff4d9317d in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#50 0x00007ffff4d93400 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#51 0x00007ffff4d936f3 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#52 0x00007ffff55c412d in gtk_main () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#53 0x00007ffff7836375 in wxGUIEventLoop::DoRun() () at /usr/local/lib/libwx_gtk3u_core-3.2.so.0
#54 0x00007ffff7226ad1 in wxEventLoopBase::Run() () at /usr/local/lib/libwx_baseu-3.2.so.0
#55 0x00007fffbf9fd659 in DIALOG_SHIM::ShowQuasiModal() () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#56 0x00007fffbf744ef7 in SCH_EDIT_TOOL::ChangeSymbols(TOOL_EVENT const&) () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#57 0x00007fffbf758cd3 in int std::__invoke_impl<int, int (SCH_EDIT_TOOL::*&)(TOOL_EVENT const&), SCH_EDIT_TOOL*&, TOOL_EVENT const&>(std::__invoke_memfun_deref, int (SCH_EDIT_TOOL::*&)(TOOL_EVENT const&), SCH_EDIT_TOOL*&, TOOL_EVENT const&) () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#58 0x00007fffbf758bed in std::__invoke_result<int (SCH_EDIT_TOOL::*&)(TOOL_EVENT const&), SCH_EDIT_TOOL*&, TOOL_EVENT const&>::type std::__invoke<int (SCH_EDIT_TOOL::*&)(TOOL_EVENT const&), SCH_EDIT_TOOL*&, TOOL_EVENT const&>(int (SCH_EDIT_TOOL::*&)(TOOL_EVENT const&), SCH_EDIT_TOOL*&, TOOL_EVENT const&) () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#59 0x00007fffbf758a6f in int std::_Bind<int (SCH_EDIT_TOOL::*(SCH_EDIT_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)>::__call<int, TOOL_EVENT const&, 0ul, 1ul>(std::tuple<TOOL_EVENT const&>&&, std::_Index_tuple<0ul, 1ul>)
() at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#60 0x00007fffbf75853f in int std::_Bind<int (SCH_EDIT_TOOL::*(SCH_EDIT_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)>::operator()<TOOL_EVENT const&, int>(TOOL_EVENT const&) ()
at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#61 0x00007fffbf75829b in int std::__invoke_impl<int, std::_Bind<int (SCH_EDIT_TOOL::*(SCH_EDIT_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)>&, TOOL_EVENT const&>(std::__invoke_other, std::_Bind<int (SCH_EDIT_TOOL::*(SCH_EDIT_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)>&, TOOL_EVENT const&) () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#62 0x00007fffbf757bc9 in std::enable_if<is_invocable_r_v<int, std::_Bind<int (SCH_EDIT_TOOL::*(SCH_EDIT_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)>&, TOOL_EVENT const&>, int>::type std::__invoke_r<int, std::_Bind<int (SCH_EDIT_TOOL::*(SCH_EDIT_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)>&, TOOL_EVENT const&>(std::_Bind<int (SCH_EDIT_TOOL::*(SCH_EDIT_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)>&, TOOL_EVENT const&) ()
at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#63 0x00007fffbf756eab in std::_Function_handler<int (TOOL_EVENT const&), std::_Bind<int (SCH_EDIT_TOOL::*(SCH_EDIT_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)> >::_M_invoke(std::_Any_data const&, TOOL_EVENT const&) ()
at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#64 0x00007fffbfbfa779 in std::function<int (TOOL_EVENT const&)>::operator()(TOOL_EVENT const&) const () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#65 0x00007fffbfbf7a3a in COROUTINE<int, TOOL_EVENT const&>::callerStub(long) () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#66 0x00007fffbfd4f241 in make_fcontext () at /home/aris-kimi/swdev/kicad/build/RelWithDebInfov8/eeschema/_eeschema.kiface
#67 0x0000000000000000 in ()
Also KiCad master branch has a problematic behavior, same steps same project
GDB verbose while eeschema was closed
12:43:01 PM: Debug: Loaded schematic with root sheet UUID 1fc3a14b-dd92-4e72-a798-a226ce03455a
../src/common/socket.cpp(2126): assert ""m_establishing && m_impl"" failed in WaitOnConnect(): No connection establishment attempt in progress [in thread 7fff41ffb700]
Call stack:
[01] wxSocketClient::WaitOnConnect(long, long)
[02] 0x7fffe7bc5c4c
[03] 0x7fffe7bc718a
[04] 0x7fffe7bc70e9
[05] 0x7fffe7bc7059
[06] 0x7fffe7bc6ff8
[07] 0x7fffe7bc6f70
[08] 0x7ffff4243b63
[09] 0x7ffff5c1a609
[10] clone
[Thread 0x7fff07fff700 (LWP 6959) exited]
../src/generic/grid.cpp(9959): assert "sizeNew == -1" failed in UpdateRowOrColSize(): New size must be positive or -1.
../src/generic/grid.cpp(9959): assert "sizeNew == -1" failed in UpdateRowOrColSize(): New size must be positive or -1.
../src/common/socket.cpp(2126): assert ""m_establishing && m_impl"" failed in WaitOnConnect(): No connection establishment attempt in progress [in thread 7fff41ffb700]
Call stack:
[01] wxSocketClient::WaitOnConnect(long, long)
[02] 0x7fffe7bc5c4c
[03] 0x7fffe7bc718a
[04] 0x7fffe7bc70e9
[05] 0x7fffe7bc7059
[06] 0x7fffe7bc6ff8
[07] 0x7fffe7bc6f70
[08] 0x7ffff4243b63
[09] 0x7ffff5c1a609
[10] clone
/home/aris-kimi/swdev/kicad/eeschema/sch_pin.cpp(298): assert ""m_libPin"" failed in GetType(): Can't inherit without a libPin!
( Version has the additional commit from MR 1924 )
KiCad Version
Application: KiCad x86_64 on x86_64
Version: 8.99.0-812-g69654efa63, release build
Libraries:
wxWidgets 3.2.3
FreeType 2.10.1
HarfBuzz 2.6.4
FontConfig 2.13.1
Platform: Linux Mint 20.3, 64 bit, Little endian, wxGTK, X11, cinnamon, x11
wxWidgets: 3.2.3 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.71.0
OCC: 7.5.2
Curl: 7.68.0
ngspice: 42+
Compiler: GCC 13.2.0 with C++ ABI 1018
Build settings:
KICAD_STDLIB_DEBUG=OFF
KICAD_STDLIB_LIGHT_DEBUG=OFF
KICAD_SANITIZE_ADDRESS=OFF
KICAD_SANITIZE_THREADS=OFF
Locale:
Lang: en_US
Enc: UTF-8
Num: 1.234,5
Edited by aris-kimi