KiCad crashes on enter subsheet with resolved variables
Description
Attached project crashes KiCad when trying to enter in Make Contact Switches
sub sheet with resolved variables( maybe related? ).
It used to work with v7.99 on my non supported system ( Linux Mint ), a couple of months ago IIRC.
( Asking for feedback on a supported platform on v7.99 )
Steps to reproduce
1.Open root sheet
2.Double click to enter Make Contact Switches
sub sheet.
Backtrace
_#15_
to _#2877_
is the exact same in the same address.
Thread 1 "kicad" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb)
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff53c8859 in __GI_abort () at abort.c:79
#2 0x00007ffff543326e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff555d298 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#3 0x00007ffff543b2fc in malloc_printerr (str=str@entry=0x7ffff555fa78 "malloc(): invalid next size (unsorted)") at malloc.c:5347
#4 0x00007ffff543e10c in _int_malloc (av=av@entry=0x7ffff5592b80 <main_arena>, bytes=bytes@entry=16) at malloc.c:3739
#5 0x00007ffff5440299 in __GI___libc_malloc (bytes=16) at malloc.c:3066
#6 0x00007ffff57acb39 in operator new(unsigned long) () at /lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x00007fffda3e5ab4 in __gnu_cxx::new_allocator<SCH_SHEET*>::allocate(unsigned long, void const*) () at /usr/local/bin/_eeschema.kiface
#8 0x00007fffda3e5944 in std::allocator_traits<std::allocator<SCH_SHEET*> >::allocate(std::allocator<SCH_SHEET*>&, unsigned long) () at /usr/local/bin/_eeschema.kiface
#9 0x00007fffda3e575c in std::_Vector_base<SCH_SHEET*, std::allocator<SCH_SHEET*> >::_M_allocate(unsigned long) () at /usr/local/bin/_eeschema.kiface
#10 0x00007fffdb0becf2 in SCH_SHEET** std::vector<SCH_SHEET*, std::allocator<SCH_SHEET*> >::_M_allocate_and_copy<__gnu_cxx::__normal_iterator<SCH_SHEET* const*, std::vector<SCH_SHEET*, std::allocator<SCH_SHEET*> > > >(unsigned long, __gnu_cxx::__normal_iterator<SCH_SHEET* const*, std::vector<SCH_SHEET*, std::allocator<SCH_SHEET*> > >, __gnu_cxx::__normal_iterator<SCH_SHEET* const*, std::vector<SCH_SHEET*, std::allocator<SCH_SHEET*> > >) () at /usr/local/bin/_eeschema.kiface
#11 0x00007fffdb0bde34 in std::vector<SCH_SHEET*, std::allocator<SCH_SHEET*> >::operator=(std::vector<SCH_SHEET*, std::allocator<SCH_SHEET*> > const&) () at /usr/local/bin/_eeschema.kiface
#12 0x00007fffdb0b2911 in SCH_SHEET_PATH::initFromOther(SCH_SHEET_PATH const&) () at /usr/local/bin/_eeschema.kiface
#13 0x00007fffdb0b27e2 in SCH_SHEET_PATH::SCH_SHEET_PATH(SCH_SHEET_PATH const&) () at /usr/local/bin/_eeschema.kiface
#14 0x00007fffdb0a6685 in SCH_SHEET::ResolveTextVar(SCH_SHEET_PATH const*, wxString*, int) const () at /usr/local/bin/_eeschema.kiface
#15 0x00007fffdb0a66fa in SCH_SHEET::ResolveTextVar(SCH_SHEET_PATH const*, wxString*, int) const () at /usr/local/bin/_eeschema.kiface
...
#2877 0x00007fffdb0a66fa in SCH_SHEET::ResolveTextVar(SCH_SHEET_PATH const*, wxString*, int) const () at /usr/local/bin/_eeschema.kiface
#2878 0x00007fffdb0a66fa in SCH_SHEET::ResolveTextVar(SCH_SHEET_PATH const*, wxString*, int) const () at /usr/local/bin/_eeschema.kiface
#2879 0x00007fffdb0cde41 in SCH_SYMBOL::ResolveTextVar(SCH_SHEET_PATH const*, wxString*, int) const () at /usr/local/bin/_eeschema.kiface
#2880 0x00007fffdb00dd47 in SCH_FIELD::GetShownText(SCH_SHEET_PATH const*, bool, int) const::{lambda(wxString*)#1}::operator()(wxString*) const () at /usr/local/bin/_eeschema.kiface
#2881 0x00007fffdb014b88 in bool std::__invoke_impl<bool, SCH_FIELD::GetShownText(SCH_SHEET_PATH const*, bool, int) const::{lambda(wxString*)#1}&, wxString*>(std::__invoke_other, SCH_FIELD::GetShownText(SCH_SHEET_PATH const*, bool, int) const::{lambda(wxString*)#1}&, wxString*&&) () at /usr/local/bin/_eeschema.kiface
#2882 0x00007fffdb01478b in std::enable_if<is_invocable_r_v<bool, SCH_FIELD::GetShownText(SCH_SHEET_PATH const*, bool, int) const::{lambda(wxString*)#1}&, wxString*>, std::enable_if>::type std::__invoke_r<bool, SCH_FIELD::GetShownText(SCH_SHEET_PATH const*, bool, int) const::{lambda(wxString*)#1}&, wxString*>(bool&&, (SCH_FIELD::GetShownText(SCH_SHEET_PATH const*, bool, int) const::{lambda(wxString*)#1}&)...) () at /usr/local/bin/_eeschema.kiface
#2883 0x00007fffdb014435 in std::_Function_handler<bool (wxString*), SCH_FIELD::GetShownText(SCH_SHEET_PATH const*, bool, int) const::{lambda(wxString*)#1}>::_M_invoke(std::_Any_data const&, wxString*&&) () at /usr/local/bin/_eeschema.kiface
#2884 0x00007fffdb58a3af in std::function<bool (wxString*)>::operator()(wxString*) const () at /usr/local/bin/_eeschema.kiface
#2885 0x00007fffdb5875fa in ExpandTextVars(wxString const&, std::function<bool (wxString*)> const*) () at /usr/local/bin/_eeschema.kiface
#2886 0x00007fffdb00e06a in SCH_FIELD::GetShownText(SCH_SHEET_PATH const*, bool, int) const () at /usr/local/bin/_eeschema.kiface
#2887 0x00007fffda65ccdd in SIM_LIB_MGR::CreateModel(SCH_SHEET_PATH const*, SCH_SYMBOL&) () at /usr/local/bin/_eeschema.kiface
#2888 0x00007fffdaff6eeb in SCH_EDIT_FRAME::RefreshOperatingPointDisplay() () at /usr/local/bin/_eeschema.kiface
#2889 0x00007fffdaffbf0f in SCH_EDIT_FRAME::DisplayCurrentSheet() () at /usr/local/bin/_eeschema.kiface
#2890 0x00007fffdb322a66 in SCH_NAVIGATE_TOOL::changeSheet(SCH_SHEET_PATH) () at /usr/local/bin/_eeschema.kiface
#2891 0x00007fffdb321edc in SCH_NAVIGATE_TOOL::EnterSheet(TOOL_EVENT const&) () at /usr/local/bin/_eeschema.kiface
--Type <RET> for more, q to quit, c to continue without paging--
#2892 0x00007fffdb324d0d in int std::__invoke_impl<int, int (SCH_NAVIGATE_TOOL::*&)(TOOL_EVENT const&), SCH_NAVIGATE_TOOL*&, TOOL_EVENT const&>(std::__invoke_memfun_deref, int (SCH_NAVIGATE_TOOL::*&)(TOOL_EVENT const&), SCH_NAVIGATE_TOOL*&, TOOL_EVENT const&) () at /usr/local/bin/_eeschema.kiface
#2893 0x00007fffdb324c53 in std::__invoke_result<int (SCH_NAVIGATE_TOOL::*&)(TOOL_EVENT const&), SCH_NAVIGATE_TOOL*&, TOOL_EVENT const&>::type std::__invoke<int (SCH_NAVIGATE_TOOL::*&)(TOOL_EVENT const&), SCH_NAVIGATE_TOOL*&, TOOL_EVENT const&>(int (SCH_NAVIGATE_TOOL::*&)(TOOL_EVENT const&), SCH_NAVIGATE_TOOL*&, TOOL_EVENT const&) () at /usr/local/bin/_eeschema.kiface
#2894 0x00007fffdb324b84 in int std::_Bind<int (SCH_NAVIGATE_TOOL::*(SCH_NAVIGATE_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 /usr/local/bin/_eeschema.kiface
#2895 0x00007fffdb324a9e in int std::_Bind<int (SCH_NAVIGATE_TOOL::*(SCH_NAVIGATE_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)>::operator()<TOOL_EVENT const&, int>(TOOL_EVENT const&) ()
at /usr/local/bin/_eeschema.kiface
#2896 0x00007fffdb3248f5 in int std::__invoke_impl<int, std::_Bind<int (SCH_NAVIGATE_TOOL::*(SCH_NAVIGATE_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)>&, TOOL_EVENT const&>(std::__invoke_other, std::_Bind<int (SCH_NAVIGATE_TOOL::*(SCH_NAVIGATE_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)>&, TOOL_EVENT const&) () at /usr/local/bin/_eeschema.kiface
#2897 0x00007fffdb32460b in std::enable_if<is_invocable_r_v<int, std::_Bind<int (SCH_NAVIGATE_TOOL::*(SCH_NAVIGATE_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)>&, TOOL_EVENT const&>, int>::type std::__invoke_r<int, std::_Bind<int (SCH_NAVIGATE_TOOL::*(SCH_NAVIGATE_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)>&, TOOL_EVENT const&>(std::_Bind<int (SCH_NAVIGATE_TOOL::*(SCH_NAVIGATE_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)>&, TOOL_EVENT const&) () at /usr/local/bin/_eeschema.kiface
#2898 0x00007fffdb3241fd in std::_Function_handler<int (TOOL_EVENT const&), std::_Bind<int (SCH_NAVIGATE_TOOL::*(SCH_NAVIGATE_TOOL*, std::_Placeholder<1>))(TOOL_EVENT const&)> >::_M_invoke(std::_Any_data const&, TOOL_EVENT const&) () at /usr/local/bin/_eeschema.kiface
#2899 0x00007fffdb7eae17 in std::function<int (TOOL_EVENT const&)>::operator()(TOOL_EVENT const&) const () at /usr/local/bin/_eeschema.kiface
#2900 0x00007fffdb7e7d28 in COROUTINE<int, TOOL_EVENT const&>::callerStub(long) () at /usr/local/bin/_eeschema.kiface
#2901 0x00007fffdb9bbc11 in make_fcontext () at /usr/local/bin/_eeschema.kiface
#2902 0x0000000000000000 in ()
KiCad Version
Application: KiCad x86_64 on x86_64
Version: 7.99.0-1087-g9ae8255202, release build
Libraries:
wxWidgets 3.2.2
FreeType 2.10.1
HarfBuzz 2.6.4
FontConfig 2.13.1
Platform: Linux Mint 20.3, 64 bit, Little endian, wxGTK, cinnamon, x11
wxWidgets: 3.2.2 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.71.0
OCC: 7.5.2
Curl: 7.68.0
ngspice: 39+
Compiler: GCC 10.3.0 with C++ ABI 1014
Build settings:
KICAD_USE_EGL=ON
KICAD_STDLIB_DEBUG=ON
KICAD_SANITIZE_ADDRESS=OFF
KICAD_SANITIZE_THREADS=OFF