Segfault tracing advance configuration settings
Description
Running kicad with advanced configuration tracing enabled results in:
10:22:32: Trace: (KICAD_ADVANCED_CONFIG) Init advanced config
10:22:32: Trace: (KICAD_ADVANCED_CONFIG) Loading advanced config from: /home/wayne/.config/kicad/5.99/kicad_advanced
10:22:32: Trace: (KICAD_ADVANCED_CONFIG) 𠀆𰀇𠀆: true
10:22:32: Trace: (KICAD_ADVANCED_CONFIG) 𰀆𰀇: 0.0005
10:22:32: Trace: (KICAD_ADVANCED_CONFIG) 𰀆𰀇: 0.0005
10:22:32: Trace: (KICAD_ADVANCED_CONFIG) 𰀇𰀆𠀆𰀅𠀆: 0.02
10:22:32: Trace: (KICAD_ADVANCED_CONFIG) 𰀆𰀃: 1048576
10:22:32: Trace: (KICAD_ADVANCED_CONFIG) 𠀇𐀁𰀃𠀆𰀅: false
10:22:32: Trace: (KICAD_ADVANCED_CONFIG) 𰀇𐀂𰀃: false
*** Caught unhandled unknown exception; terminating
Segmentation fault (core dumped)
Steps to reproduce
- Open a terminal.
- Enter
export WXTRACE=KICAD_ADVANCED_CONFIG
. - Enter
kicad
. - Segfault.
KiCad Version
Application: KiCad
Version: (5.99.0-10013-ga0a5e93782-dirty), debug build
Libraries:
wxWidgets 3.0.4
libcurl/7.68.0 GnuTLS/3.6.13 zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Platform: Linux 5.4.0-70-generic x86_64, 64 bit, Little endian, wxGTK, gnome-classic, x11
Build Info:
Date: Mar 27 2021 08:20:38
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.71.0
OCC: 7.3.0
Curl: 7.68.0
ngspice: 31
Compiler: GCC 9.3.0 with C++ ABI 1013
Build settings:
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
KICAD_SCRIPTING_ACTION_MENU=ON
KICAD_USE_OCC=ON
KICAD_SPICE=ON
KICAD_STDLIB_DEBUG=OFF
KICAD_STDLIB_LIGHT_DEBUG=OFF
KICAD_SANITIZE=OFF
Backtrace
#0 0x0000555555f275d0 in ()
#1 0x00007ffff73e2110 in wxMBConv::FromWChar(char*, unsigned long, wchar_t const*, unsigned long) const () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#2 0x00007ffff73ee97c in wxString::AsChar(wxMBConv const&) const ()
at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#3 0x00007ffff739c723 in () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#4 0x00007ffff739dfd6 in () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#5 0x00007ffff73a156f in wxFileName::DirExists() const ()
at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#6 0x0000555555895b22 in JSON_SETTINGS::SaveToFile(wxString const&, bool)
(this=0x5555560bd8d0, aDirectory=..., aForce=false)
at /home/wayne/src/kicad-trunk/common/settings/json_settings.cpp:367
#7 0x00005555558c4559 in SETTINGS_MANAGER::FlushAndRelease(JSON_SETTINGS*, bool) (this=0x5555560e4fb0, aSettings=0x5555560bd8d0, aSave=true)
at /home/wayne/src/kicad-trunk/common/settings/settings_manager.cpp:164
#8 0x000055555575e7a2 in BIN_MOD::End() (this=0x555555f01df0 <program+304>)
at /home/wayne/src/kicad-trunk/common/bin_mod.cpp:56
#9 0x00005555556fce4a in PGM_KICAD::Destroy() (this=0x555555f01cc0 <program>)
at /home/wayne/src/kicad-trunk/kicad/kicad.cpp:246
#10 0x00005555556fe52b in PGM_KICAD::~PGM_KICAD()
(this=0x555555f01cc0 <program>, __in_chrg=<optimized out>)
at /home/wayne/src/kicad-trunk/kicad/pgm_kicad.h:47
#11 0x00007ffff5f99a27 in __run_exit_handlers
(status=-1, listp=0x7ffff613b718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
#12 0x00007ffff5f99be0 in __GI_exit (status=<optimized out>) at exit.c:139
#13 0x00007ffff5f770ba in __libc_start_main (main=
0x5555556fce59 <main(int, char**)>, argc=1, argv=0x7fffffffdfe8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdfd8) at ../csu/libc-start.c:342