pcbnew crash when pad clearance "too negative"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KiCad |
Fix Released
|
Undecided
|
Jean-Samuel Reynaud |
Bug Description
I experience a crash in pcbnew when pad clearance is "too negative"
according to the pad shape.
To reproduce:
- Open pcbnew (In OpenGL canvas)
- Open footprint editor
- Create a new footprint
- Place a new SMD rectangular PAD of 1.5mmx1.5mm size
- Change footprint properties and set "Pad clearance" to -1 (in mm)
=> pcbnew crash
It is crashing because at pcbnew/
based on shape and clearance:
aPad->Transform
But in this case (parameter of clearance) the returned polyset is empty
so code at pcbnew/
m_gal->
always crash because polySet has an empty m_poly property (crash in
COutline in fact...).
To fix this:
Check polySet is not empty:
if( polySet.
other solution:
Modify SHAPE_POLY_
(include/
To deny "aIndex" out of range values...
An other solution:
Perhaps it's not logical to allow negative values but in this case
interface should deny enter a negative value (and check existing values
from footprint/
Application: pcbnew
Version: no-vcs-
Libraries: wxWidgets 3.0.2
Platform: Linux 4.4.0-62-generic x86_64, 64 bit, Little endian, wxGTK
- Build Info -
wxWidgets: 3.0.2 (wchar_t,wx containers,
Boost: 1.58.0
Curl: 7.47.0
KiCad - Compiler: GCC 5.4.0 with C++ ABI 1009
Settings: USE_WX_
Changed in kicad: | |
status: | Fix Committed → Fix Released |
Fixed in revision 3ec6f1d33bd146f eee5b2161d58e88 f979b0e0b7 /git.launchpad. net/kicad/ patch/? id=3ec6f1d33bd1 46feee5b2161d58 e88f979b0e0b7
https:/