eeschema: referencing sheet variable on instantiation segfaults on load
Description
It was suggested in #10975 (closed) to use sheet variables as a way to keep instance friendly names consistent.
Unfortunately, this causes segfaults on load in 6.0.2.
Steps to reproduce
- Start a new schematic
- Add a hierarchical sheet
- Add a visible property to the instantiation with text
${COMMENT1}
- Save the design
- Close and re-open the schematic
KiCad Version
Application: KiCad
Version: 6.0.2-378541a8eb~116~ubuntu20.04.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.68.0 OpenSSL/1.1.1f 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.13.0-28-generic x86_64, 64 bit, Little endian, wxGTK, xubuntu, x11
Build Info:
Date: Feb 11 2022 08:14:15
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.71.0
OCC: 7.5.2
Curl: 7.81.0
ngspice: 31
Compiler: GCC 9.3.0 with C++ ABI 1013
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON