Bug: pcbnew crashes trying to interpret malformed rule
Description
Pcbnew crashes when trying to check the syntax of the following rule (apart that it does not yet do what I'd like, yet)
# Lower mech. clearance for mounting holes (maintaining 0.6mm Cu to board edge)
(rule "Mech. clearance of mounting holes towards board egde"
(layer "F.Courtyard")
(constraint physical_clearance (min 0.45mm))
(condition "A.memberOfFootprint('H?' && B.Layer == 'Edge.Cuts')"))
The "(H?" closing parenthesis is wrongly located towards the end of the string.
Steps to reproduce
- Insert malformed custom rule into rules
- Either check syntax or close the PCB properties window.
- Program does continue to crash when trying to load the kicad-dru-file; one has to edit it externally to make it work again.
KiCad Version
Version: 7.99.0-1.20230617gitf9d4b75.fc38, release build
Libraries:
wxWidgets 3.2.1
FreeType 2.13.0
HarfBuzz 7.1.0
FontConfig 2.14.2
libcurl/8.0.1 OpenSSL/3.0.9 zlib/1.2.13 brotli/1.0.9 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh/0.10.5/openssl/zlib nghttp2/1.52.0
Platform: Fedora release 38 (Thirty Eight), 64 bit, Little endian, wxGTK, gnome, wayland
Build Info:
Date: Jun 17 2023 17:15:13
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.78.0
OCC: 7.6.3
Curl: 8.0.1
ngspice: 40
Compiler: GCC 13.1.1 with C++ ABI 1018
Build settings:```
Edited by Hans Wurst