Crash using custom DRC rule with rule area and hole_to_hole constraint
Description
After adding a custom DRC rule using intersectsArea() and a hole_to_hole constraint and adding a rule area with a matching name, KiCad (both the PCB Editor and the main window) crashes when trying to route a new track.
Steps to reproduce
- Open KiCad and create a new project, open the pcb editor
- Add the following to the custom DRC rules
(version 1)
(rule AreaCrashTest
(constraint hole_to_hole (min 0.05mm))
(condition "A.intersectsArea('MyTestArea')"))
- Create a rule area with the name MyTestArea
- Press X or click "Route tracks" and click anywhere. This causes KiCad to crash.
I also tried the same condition with a few other constraints, as well as the hole_to_hole constraint without a condition. No crash in those cases. When no rule area is present or the name of the area doesn't match the condition, no crash either.
KiCad Version
Application: KiCad PCB Editor x64 on x64
Version: 7.0.9, release build
Libraries:
wxWidgets 3.2.3
FreeType 2.12.1
HarfBuzz 8.2.1
FontConfig 2.14.2
libcurl/8.4.0-DEV Schannel zlib/1.3
Platform: Windows 10 (build 19045), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: Nov 5 2023 19:26:40
wxWidgets: 3.2.3 (wchar_t,wx containers)
Boost: 1.83.0
OCC: 7.7.1
Curl: 8.4.0-DEV
ngspice: 41
Compiler: Visual C++ 1936 without C++ ABI
Build settings:
KICAD_SPICE=ON