Segfault when closing pcbnew
Description
I get a segfault when closing pcbnew. The backtrace indicates that this is the DTOR from JSON_SETTINGS
Thread 1 "pcbnew" received signal SIGSEGV, Segmentation fault.
0x00005555558b2010 in ?? ()
(gdb) up
#1 0x00007ffff1c3edf4 in JSON_SETTINGS::~JSON_SETTINGS (this=0x55555aabcc90, __in_chrg=<optimized out>) at ../../common/settings/json_settings.cpp:63
63 delete param;
(gdb) bt
#0 0x00005555558b2010 in ()
#1 0x00007ffff1c3edf4 in JSON_SETTINGS::~JSON_SETTINGS() (this=0x55555aabcc90, __in_chrg=<optimized out>) at ../../common/settings/json_settings.cpp:63
#2 0x00007ffff1c5f3e2 in NESTED_SETTINGS::~NESTED_SETTINGS() (this=0x55555aabcc90, __in_chrg=<optimized out>) at ../../common/settings/nested_settings.cpp:37
#3 0x00007ffff171718d in BOARD_DESIGN_SETTINGS::~BOARD_DESIGN_SETTINGS() (this=0x55555aabcc90, __in_chrg=<optimized out>) at ../../pcbnew/board_design_settings.cpp:562
#4 0x00007ffff13aa972 in FOOTPRINT_EDITOR_SETTINGS::~FOOTPRINT_EDITOR_SETTINGS() (this=0x55555aabc800, __in_chrg=<optimized out>) at ../../include/footprint_editor_settings.h:41
#5 0x00007ffff13aa99a in FOOTPRINT_EDITOR_SETTINGS::~FOOTPRINT_EDITOR_SETTINGS() (this=0x55555aabc800, __in_chrg=<optimized out>) at ../../include/footprint_editor_settings.h:41
#6 0x000055555564b958 in std::default_delete<JSON_SETTINGS>::operator()(JSON_SETTINGS*) const (this=0x5555559ee078, __ptr=0x55555aabc800) at /usr/include/c++/9/bits/unique_ptr.h:81
#7 0x00005555556474c2 in std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >::~unique_ptr() (this=0x5555559ee078, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/unique_ptr.h:292
#8 0x000055555566190c in std::_Destroy<std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> > >(std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >*) (__pointer=0x5555559ee078)
at /usr/include/c++/9/bits/stl_construct.h:98
#9 0x000055555565aea9 in std::_Destroy_aux<false>::__destroy<std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >*>(std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >*, std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >*) (__first=0x5555559ee078, __last=0x5555559ee080) at /usr/include/c++/9/bits/stl_construct.h:108
#10 0x00005555556516d2 in std::_Destroy<std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >*>(std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >*, std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >*) (__first=0x5555559ee050, __last=0x5555559ee080) at /usr/include/c++/9/bits/stl_construct.h:137
#11 0x000055555564b543 in std::_Destroy<std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >*, std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> > >(std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >*, std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >*, std::allocator<std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> > >&) (__first=0x5555559ee050, __last=0x5555559ee080)
at /usr/include/c++/9/bits/stl_construct.h:206
#12 0x00005555556518d3 in std::__cxx1998::vector<std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >, std::allocator<std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> > > >::_M_erase_at_end(std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >*) (this=0x55555596a850, __pos=0x5555559ee050) at /usr/include/c++/9/bits/stl_vector.h:1793
#13 0x000055555564b7b0 in std::__cxx1998::vector<std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >, std::allocator<std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> > > >::clear() (this=0x55555596a850)
at /usr/include/c++/9/bits/stl_vector.h:1496
#14 0x00005555556473e2 in std::__debug::vector<std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> >, std::allocator<std::unique_ptr<JSON_SETTINGS, std::default_delete<JSON_SETTINGS> > > >::clear() (this=0x55555596a838)
at /usr/include/c++/9/debug/vector:709
#15 0x000055555563a0a6 in SETTINGS_MANAGER::~SETTINGS_MANAGER() (this=0x55555596a830, __in_chrg=<optimized out>) at ../../common/settings/settings_manager.cpp:76
#16 0x00005555556358ca in std::default_delete<SETTINGS_MANAGER>::operator()(SETTINGS_MANAGER*) const (this=0x5555558af5d0 <program+16>, __ptr=0x55555596a830) at /usr/include/c++/9/bits/unique_ptr.h:81
#17 0x000055555563479a in std::unique_ptr<SETTINGS_MANAGER, std::default_delete<SETTINGS_MANAGER> >::~unique_ptr() (this=0x5555558af5d0 <program+16>, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/unique_ptr.h:292
#18 0x000055555562cfb4 in PGM_BASE::~PGM_BASE() (this=0x5555558af5c0 <program>, __in_chrg=<optimized out>) at ../../common/pgm_base.cpp:121
#19 0x0000555555624834 in PGM_SINGLE_TOP::~PGM_SINGLE_TOP() (this=0x5555558af5c0 <program>, __in_chrg=<optimized out>) at ../../common/single_top.cpp:64
#20 0x00007ffff6dd9e47 in __run_exit_handlers (status=0, listp=0x7ffff6f58718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
#21 0x00007ffff6dd9ffa in __GI_exit (status=<optimized out>) at exit.c:139
#22 0x00007ffff6dc2e12 in __libc_start_main (main=0x55555561c039 <main(int, char**)>, argc=1, argv=0x7fffffffe148, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe138) at ../csu/libc-start.c:342
#23 0x000055555561be2a in _start ()
Steps to reproduce
- Launch pcbnew standalone
- Launch modedit
- Click "Create new footprint" then cancel when prompted for a name
- Close both modedit and pcbnew
KiCad Version
Application: Pcbnew
Version: (5.99.0-2127-g33d63185f-dirty), debug build
Libraries:
wxWidgets 3.0.5
libcurl/7.68.0 OpenSSL/1.1.1g zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.8.0 nghttp2/1.41.0 librtmp/2.3
Platform: Linux 5.7.0-1-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
Build date: Jul 3 2020 12:13:29
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.71.0
OCC: 7.3.0
Curl: 7.68.0
Compiler: GCC 9.3.0 with C++ ABI 1013
Build settings:
KICAD_SCRIPTING=OFF
KICAD_SCRIPTING_MODULES=OFF
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=OFF
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=OFF
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCC=ON
KICAD_SPICE=ON
KICAD_STDLIB_DEBUG=ON
KICAD_SANITIZE=OFF