← Back to team overview

kicad-developers team mailing list archive

Re: PATCH: fix crash in netlist updater


On 2019-06-04 14:23, Andrew Lutsenko wrote:

1. No, it's not needed. At first I didn't find Cast() in BOARD_ITEMS
cpp code so thought it's implemented in descendant classes only and
added the check as safeguard like it was done in DList. But now I
found that Cast() is in swig python extension for BOARD_ITEM so it
will always be defined. See amended patch attached.
2. Yes, it works and it was tested on py3 build. Self reference is
passed implicitly in python.

Hi Andrew-

Thanks for the clear details.

I tested this (Linux/python3) but I'm getting the StopIteration raised rather than handled by the standard python loops. The example code I used was

import pcbnew
b = pcbnew.GetBoard()
d = b.GetDrawings()
for dwg in d:
m = b.GetModules()
for mod in m:

Here, the modules print normally and the StopIteration is handled internally by python. The drawings pass the StopIteration back up to the UI.


Follow ups