← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Crash with zero size pads in module editor

 

Good catch. I fixed the same bug but for zero-sized drills a while ago,
apparently the same check was missing for pad sizes.

On Wed, 2014-11-19 at 16:52 +1300, Blair Bonnett wrote:
> Currently, the module editor crashes if the pad size is set to zero
> (e.g., while backspacing the current value to replace it). Note that
> this also happens if the entry is cleared as that is also treated as
> zero. Basically, the previewer tries to set the drawing context scale
> to zero and the drawing library doesn't like this.
> 
> 
> Also, the editor accepts zero as a pad size for surface mount pads.
> 
> 
> The attached patch adds checks for the zero entry case and sets the
> scale to (what I think is) a sensible default -- it uses the drill
> size rather than the pad size, or if the drill size is also zero, it
> arbitrarily uses a size of 1mm. It also adds an error message for
> zero-size pads when checking if the dialog is valid before accepting
> it.
> 
> 
> This closes lp:1378917.
> 
> 
> Regards,
> Blair
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

-- 
Andrew Zonenberg
PhD student, security group
Computer Science Department
Rensselaer Polytechnic Institute
http://colossus.cs.rpi.edu/~azonenberg/

Attachment: signature.asc
Description: This is a digitally signed message part


References