eeschema crashes on save after pasting-in something copied from another schematic (opened stand-alone)
Description
Eeschema crashes after having pasted some bits from another schematic. It does not crash immediately, but when you try to save the schematic. It's possible to edit the schematic further, but that doesn't stop it from crashing on save.
The bits copied:
And as pasted:
Edit: Clarifications:
- The parts are copied from a hierarchical sub sheet of the standalone opened one.
- Copying a different part / bit and pasting it has the same result.
Steps to reproduce
- Open eeschema with standalone sheet
- Open kicad project, load schematic
- Box-select and copy two components and some wires in the standalone sheet
- Paste above in the project schematic
- Hit save and a segfault shows up
See the attached GDB session for a backtrace with debug symbols.
The relevant bit in the backtrace:
Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
0x00007fffaeef3cc4 in _mm_loadu_si128(long long __vector(2) const*) (__P=<optimized out>, __P=<optimized out>) at /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1335
1335 return (__m128i) ((__v2du)__A ^ (__v2du)__B);
#0 0x00007fffaeef3cc4 in _mm_loadu_si128(long long __vector(2) const*) (__P=<optimized out>, __P=<optimized out>) at /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1335
#1 boost::uuids::detail::load_unaligned_si128(unsigned char const*) (p=<optimized out>, p=<optimized out>) at /usr/include/boost/uuid/detail/uuid_x86.ipp:49
#2 boost::uuids::operator==(boost::uuids::uuid const&, boost::uuids::uuid const&) (rhs=..., lhs=..., lhs=<optimized out>, rhs=<optimized out>) at /usr/include/boost/uuid/detail/uuid_x86.ipp:85
#3 boost::uuids::operator!=(boost::uuids::uuid const&, boost::uuids::uuid const&) (rhs=..., lhs=..., lhs=<optimized out>, rhs=<optimized out>) at /usr/include/boost/uuid/uuid.hpp:156
#4 KIID::operator!=(KIID const&) const (rhs=..., this=0x5555609dc8f0, this=<optimized out>, rhs=<optimized out>) at /usr/src/debug/kicad-7-git/kicad-7-git/include/kiid.h:112
#5 SCH_SEXPR_PLUGIN::saveSymbol(SCH_SYMBOL*, SCHEMATIC const&, int, bool, SCH_SHEET_PATH const*) (this=this@entry=0x5555604eed20, aSymbol=aSymbol@entry=0x55555786e0e0, aSchematic=..., aNestLevel=aNestLevel@entry=1, aForClipboard=aForClipboard@entry=false, aRelativePath=aRelativePath@entry=0x0) at /usr/src/debug/kicad-7-git/kicad-7-git/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp:841
#6 0x00007fffaeef7d98 in SCH_SEXPR_PLUGIN::Format(SCH_SHEET*) (aSheet=0x555557708a60, this=0x5555604eed20) at /usr/src/debug/kicad-7-git/kicad-7-git/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp:427
#7 SCH_SEXPR_PLUGIN::Save(wxString const&, SCH_SHEET*, SCHEMATIC*, STRING_UTF8_MAP const*) (this=0x5555604eed20, aFileName=<optimized out>, aSheet=0x555557708a60, aSchematic=<optimized out>, aProperties=<optimized out>) at /usr/src/debug/kicad-7-git/kicad-7-git/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp:351
#8 0x00007fffaed70381 in SCH_EDIT_FRAME::saveSchematicFile(SCH_SHEET*, wxString const&) (this=this@entry=0x555556717c20, aSheet=0x555557708a60, aSavePath=...) at /usr/src/debug/kicad-7-git/kicad-7-git/eeschema/files-io.cpp:738
#9 0x00007fffaed79139 in SCH_EDIT_FRAME::SaveProject(bool) (this=0x555556717c20, aSaveAs=<optimized out>) at /usr/src/debug/kicad-7-git/kicad-7-git/eeschema/files-io.cpp:1084
#10 0x00007fffaf0c95d2 in SCH_EDITOR_CONTROL::Save(TOOL_EVENT const&) (this=<optimized out>, aEvent=<optimized out>) at /usr/src/debug/kicad-7-git/kicad-7-git/eeschema/tools/sch_editor_control.cpp:94
#11 0x00007fffaf2eb8ac in std::function<int (TOOL_EVENT const&)>::operator()(TOOL_EVENT const&) const (__args#0=<optimized out>, this=0x5555605f2f20) at /usr/include/c++/13.2.1/bits/std_function.h:591
#12 COROUTINE<int, TOOL_EVENT const&>::callerStub(long) (aData=<optimized out>) at /usr/src/debug/kicad-7-git/kicad-7-git/include/tool/coroutine.h:428
#13 0x00007fffaf60ac11 in make_fcontext () at /usr/bin/_eeschema.kiface
#14 0x0000000000000000 in ()
No locals.
KiCad Version
Application: KiCad Schematic Editor x86_64 on x86_64
Version: 7.0.9-77-g1c6390f829, release build
Libraries:
wxWidgets 3.2.3
FreeType 2.13.2
HarfBuzz 8.3.0
FontConfig 2.14.2
libcurl/8.4.0 OpenSSL/3.1.4 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh2/1.11.0 nghttp2/1.58.0
Platform: Arch Linux, 64 bit, Little endian, wxGTK, KDE, wayland
Build Info:
Date: Dec 6 2023 00:23:48
wxWidgets: 3.2.3 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.83.0
OCC: 7.7.2
Curl: 8.4.0
ngspice: 41
Compiler: GCC 13.2.1 with C++ ABI 1018
Build settings:
KICAD_USE_EGL=ON
KICAD_SPICE=ON
Edited by Stefan Hamminga