Gerber export crashes for sketched pads on fabrication layer if pad dimensions are <= plotting line width
Description
GERBER_PLOTTER::FlashPadRoundRect crashes with assertion failure (with -DKICAD_STDLIB_LIGHT_DEBUG=1
) when plotting fabrication layers with sketch pads enabled if the pad size is equal or smaller than the plotting line size.
outline.Outline( 0 );
assumes the presence of one point, but outline.Inflate()
just above can remove all points of the pad.
https://gitlab.com/kicad/code/kicad/-/blob/master/common/plotters/GERBER_plotter.cpp#L1490
Steps to reproduce
- Compile with
-DKICAD_STDLIB_LIGHT_DEBUG=1
- Use small custom pad on footprint e.g. 0.1mm*0.1mm
- Export fabrication layer with sketch pads enabled
KiCad Version
Application: KiCad
Version: (6.0.4), release build
Libraries:
wxWidgets 3.0.5
libcurl/7.82.0 OpenSSL/1.1.1n zlib/1.2.12 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.10.0 nghttp2/1.47.0
Platform: Linux 5.17.4-arch1-1 x86_64, 64 bit, Little endian, wxGTK, xmonad, x11
Build Info:
Date: Mar 18 2022 08:05:28
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.78.0
OCC: 7.5.3
Curl: 7.82.0
ngspice: 36
Compiler: GCC 11.2.0 with C++ ABI 1016
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON
Edited by Simon Schubert