I think I can confirm this.
I took 3 intstances of “Opamp_Dual_Generic” and placed them next to each other.
From left to right: A, B and the power pins C on the right.
Then I annotated the schematic and the symbols changed.
The order is now B, C, A
After that I tried to edit U3B to change it back to “Unit A” and I got an “assertion failed”.
ASSERT INFO:
/build/kicad-rFhZT9/kicad-5.0.2+dfsg1/eeschema/sch_edit_frame.cpp(621): assert “m_undoItem != __null” failed in SaveUndoItemInUndoList(): Cannot swap undo item structures. Bad programmer!.
BACKTRACE:
[1] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[2] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[3] wxEvtHandler::TryHereOnly(wxEvent&)
[4] wxEvtHandler::ProcessEventLocally(wxEvent&)
[5] wxEvtHandler::ProcessEvent(wxEvent&)
[6] wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
[7] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[8] g_closure_invoke
[9] g_signal_emit_valist
[10] g_signal_emit
[11] gtk_propagate_event
[12] gtk_main_do_event
[13] g_main_context_dispatch
[14] g_main_loop_run
[15] gtk_main
[16] wxGUIEventLoop::DoRun()
[17] wxEventLoopBase::Run()
[18] wxAppConsoleBase::MainLoop()
[19] wxEntry(int&, wchar_t**)
[20] __libc_start_main
[21] _start
The KiCad version I have is:
Application: kicad
Version: 5.0.2+dfsg1-1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.64.0 OpenSSL/1.1.1a zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Platform: Linux 4.19.0-2-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
Boost: 1.67.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.62.0
Compiler: GCC 8.2.0 with C++ ABI 1013
Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON
After this I did a few more tests.
The swapping of the symbols only seems to happen with the Opamp_Dual_Generic, and mostly when the Units A, B, C are directly chosen from the library. When you first place the opamps and then change them to units B and C the bug is not always triggered.
After more testing I could not get this behaviour triggered with other dual opamps, but with Opamp_Quad_Generic the symbols (sometimes?) also get swapped.
I first drew tye symbols A, B, C, D, E from left to right and then annotated.
It looks now like:
The order in which the symbols get mixed up also changes.
Again, I drew A,B,C,D,E from left to right and annotated:
Then I try to change the power part of the quad_generic, but the most left (which was orignially the power “Unit E” but had “U9A” as name to “U9C” and again I had an “assertion Failed”:
ASSERT INFO:
/build/kicad-rFhZT9/kicad-5.0.2+dfsg1/eeschema/sch_edit_frame.cpp(621): assert “m_undoItem != __null” failed in SaveUndoItemInUndoList(): Cannot swap undo item structures. Bad programmer!.
BACKTRACE:
[1] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[2] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[3] wxEvtHandler::TryHereOnly(wxEvent&)
[4] wxEvtHandler::ProcessEventLocally(wxEvent&)
[5] wxEvtHandler::ProcessEvent(wxEvent&)
[6] wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
[7] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[8] g_closure_invoke
[9] g_signal_emit_valist
[10] g_signal_emit
[11] gtk_propagate_event
[12] gtk_main_do_event
[13] g_main_context_dispatch
[14] g_main_loop_run
[15] gtk_main
[16] wxGUIEventLoop::DoRun()
[17] wxEventLoopBase::Run()
[18] wxAppConsoleBase::MainLoop()
[19] wxEntry(int&, wchar_t**)
[20] __libc_start_main
[21] _start
Bad Programmer! indeed 